RFR: 8274632: Possible pointer overflow in PretouchTask chunk claiming
Kim Barrett
kbarrett at openjdk.java.net
Fri Oct 1 19:45:42 UTC 2021
Please review this change to PretouchTask, fixing the mechanism used to
claim chunks for parallel touching. The old mechanism unconditionally added
a potentially large value to the current pointer and then checked the result
for overflow. But since pointer arithmetic overflow is UB, that's not a
reliable approach.
Testing:
mach5 tier1
-------------
Commit messages:
- use cmpxchg to claim chunks
Changes: https://git.openjdk.java.net/jdk/pull/5791/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5791&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8274632
Stats: 8 lines in 1 file changed: 1 ins; 2 del; 5 mod
Patch: https://git.openjdk.java.net/jdk/pull/5791.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/5791/head:pull/5791
PR: https://git.openjdk.java.net/jdk/pull/5791
More information about the hotspot-gc-dev
mailing list