When resize is done in smaller side need to move the pointer end
Vector<int> v; v.PushBack(1); v.PushBack(2); v.Size(); // 1 v.Resize(1); v.Size() // 2 but should be 1
Patch by Oleg Doronin
Differential D45605
Resize vector have does not work correctly dorooleg on Apr 12 2018, 7:04 PM. Authored by
Details When resize is done in smaller side need to move the pointer end Vector<int> v; v.PushBack(1); v.PushBack(2); v.Size(); // 1 v.Resize(1); v.Size() // 2 but should be 1 Patch by Oleg Doronin
Diff Detail
Event TimelineComment Actions could you please extend compiler-rt/lib/sanitizer_common/tests/sanitizer_vector_test.cc ? Comment Actions Hm... interesting. how did you find it? what does this affect now? Comment Actions @vitalybuka, @kcc thanks for the comments. ResizeReduction test was added into compiler-rt/lib/sanitizer_common/tests/sanitizer_vector_test.cc Comment Actions LGTM, thanks! |