RFR: 8235119: Incomplete initialization of scan_top values results in out-of-bounds scanning of regions
Kim Barrett
kim.barrett at oracle.com
Thu Dec 19 16:47:47 UTC 2019
> On Dec 19, 2019, at 8:27 AM, Stefan Johansson <stefan.johansson at oracle.com> wrote:
>
> Hi,
>
> Please review this fix for JDK-8235119, it's intended for both JDK 14 and 15.
>
> Webrev: http://cr.openjdk.java.net/~sjohanss/8235119/00/
> Issue: https://bugs.openjdk.java.net/browse/JDK-8235119
>
> Summary
> When we parallelized the evacuation preparation in JDK-8141637 we made a small change to how we initialize the scan state. The problem with this change was that free and unavailable regions didn't get cleared and reset as before. This will lead to regions being allocated during the GC can have an inconsistent state.
>
> This fix reverts a small part of JDK-8141637, so that we continue to clear and reset all regions regardless of state and then just update the state for the regions needing it.
>
> Testing
> Functional testing in mach5 tier1-3 and Kim has done manual verification with tests that previously reproduced the failure.
>
> Also big thanks to Kim, Sangheon and Thomas for all the work with reproducing and digging into the issue.
>
> Cheers,
> Stefan
Looks good.
I dislike the casts, but understand why they are there. It seems there are inconsistencies
regarding the range for number of regions, with some code using size_t and other code
using uint. It would be good to clean that up, but that should be a separate RFE from this
bug fix.
More information about the hotspot-gc-dev
mailing list