[jdk19] RFR: 8291496: Allocating card table before heap causes underflow asserts in CardTable::addr_for() [v2]

Thomas Schatzl tschatzl at openjdk.org
Mon Aug 8 08:59:07 UTC 2022


> Hi all,
> 
>   can I have reviews for sidestepping a wrong assert in `CardTable::addr_for`?
> 
> So if `CardTable::_byte_map_base` gets negative (highest bit set) if it is allocated very much below the heap, the used `pointer_delta` method errors out with an assert that (in unsigned comparison) the "left" address is smaller than the "right" address.
> 
> Testing: tier 1-5, failures without change after modifying the code to allocate the card table at very low addresses and using `HeapBaseMinAddress`, no failures afterwards.
> 
> @albertnetymk analyzed this, so I'll add him as contributor of this patch.

Thomas Schatzl has updated the pull request incrementally with one additional commit since the last revision:

  Add documentation

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

Changes:
  - all: https://git.openjdk.org/jdk19/pull/160/files
  - new: https://git.openjdk.org/jdk19/pull/160/files/eb9cee39..3f76afc0

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk19&pr=160&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk19&pr=160&range=00-01

  Stats: 2 lines in 1 file changed: 2 ins; 0 del; 0 mod
  Patch: https://git.openjdk.org/jdk19/pull/160.diff
  Fetch: git fetch https://git.openjdk.org/jdk19 pull/160/head:pull/160

PR: https://git.openjdk.org/jdk19/pull/160



More information about the hotspot-gc-dev mailing list