RFR: 8274632: Possible pointer overflow in PretouchTask chunk claiming [v3]

Kim Barrett kbarrett at openjdk.java.net
Tue Oct 5 07:56:30 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

Kim Barrett has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:

 - Merge branch 'master' into pretouch_chunk_claim
 - remove unused _start_addr
 - use cmpxchg to claim chunks

-------------

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/5791/files
  - new: https://git.openjdk.java.net/jdk/pull/5791/files/b3e5e12a..bd976c03

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5791&range=02
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5791&range=01-02

  Stats: 2690 lines in 138 files changed: 1848 ins; 328 del; 514 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