-
Bug
-
Resolution: Fixed
-
P4
-
14
-
b25
If BitMap::reallocate is called with clear == true, it is possible that some bits in the new array that ought to be cleared won't be.
If new_size_in_bits > old_size_in_bits and old_size_in_bits is not word aligned, the word-copy from old to new will copy the entire last word of old, including possibly set bits beyond old_size_in_bits. The requested clearing of new will start with the word following that last copied word. This leaves the bits of new in the range
[old_size_in_bits, word_align_up(MIN2(new_size_in_bits, old_size_in_bits)))
in an unspecified state.
If new_size_in_bits > old_size_in_bits and old_size_in_bits is not word aligned, the word-copy from old to new will copy the entire last word of old, including possibly set bits beyond old_size_in_bits. The requested clearing of new will start with the word following that last copied word. This leaves the bits of new in the range
[old_size_in_bits, word_align_up(MIN2(new_size_in_bits, old_size_in_bits)))
in an unspecified state.
- relates to
-
JDK-8155043 BitMap set operations assume clear bits beyond unaligned end
-
- Resolved
-