RFR: 8178352: BitMap::get_next_zero_offset may give wrong result on Mac
Stefan Karlsson
stefan.karlsson at oracle.com
Mon Apr 10 07:44:38 UTC 2017
Hi Kim,
On 2017-04-10 00:00, Kim Barrett wrote:
> Please review this change to BitMap::get_next_zero_offset_inline to
> remove its use of left_n_bits, thereby avoiding
> https://bugs.openjdk.java.net/browse/JDK-8178348.
>
> CR:
> https://bugs.openjdk.java.net/browse/JDK-8178352
>
> Webrev:
> http://cr.openjdk.java.net/~kbarrett/8178352/hotspot.00/
The bug fix looks good.
You did a couple of stylistic changes that now make the code inconsistent:
- for (; res & 1; res_offset++) {
- res = res >> 1;
+ for (; (res & 1) == 0; ++res_offset) {
+ res >>= 1;
But the surrounding code uses this format:
271 for (; !(res & 1); res_offset++) {
272 res = res >> 1;
273 }
I think these changes should be kept out of this patch.
Thanks,
StefanK
>
> Testing:
> JPRT, with the test from
> https://bugs.openjdk.java.net/browse/JDK-8169039
> included in the tested repository.
>
More information about the hotspot-dev
mailing list