diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2014-10-22 10:25:24 +0100 |
---|---|---|
committer | Nicolas Geoffray <ngeoffray@google.com> | 2014-10-22 10:28:50 +0100 |
commit | b556761d14e8dd0d41f1cc0f7d19726fe3497e8f (patch) | |
tree | 5c1ad1cbe81e3fe4f23de7e34e3444bd034ca245 /runtime/base/bit_vector.cc | |
parent | 70f4b9929048e71c4231d7976080be6277c3374b (diff) | |
download | android_art-b556761d14e8dd0d41f1cc0f7d19726fe3497e8f.tar.gz android_art-b556761d14e8dd0d41f1cc0f7d19726fe3497e8f.tar.bz2 android_art-b556761d14e8dd0d41f1cc0f7d19726fe3497e8f.zip |
Fix bug in UnionIfNotIn.
Bug: 18066207
Change-Id: Ib9b24802546403b3d5a4da19996034eb45601f53
Diffstat (limited to 'runtime/base/bit_vector.cc')
-rw-r--r-- | runtime/base/bit_vector.cc | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/runtime/base/bit_vector.cc b/runtime/base/bit_vector.cc index 3d2f0deac5..1d67962800 100644 --- a/runtime/base/bit_vector.cc +++ b/runtime/base/bit_vector.cc @@ -145,10 +145,7 @@ bool BitVector::UnionIfNotIn(const BitVector* union_with, const BitVector* not_i // Is the storage size smaller than src's? if (storage_size_ < union_with_size) { - changed = true; - - // Set it to reallocate. - SetBit(highest_bit); + EnsureSize(highest_bit); // Paranoid: storage size should be big enough to hold this bit now. DCHECK_LT(static_cast<uint32_t> (highest_bit), storage_size_ * kWordBits); |