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

Thomas Schatzl tschatzl at openjdk.org
Wed Aug 10 09:43:56 UTC 2022


On Wed, 3 Aug 2022 16:13:50 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

> 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.

This pull request has now been integrated.

Changeset: 5fce02e3
Author:    Thomas Schatzl <tschatzl at openjdk.org>
URL:       https://git.openjdk.org/jdk19/commit/5fce02e39a6f50e97d7a5c6003ae0220e62933b5
Stats:     3 lines in 1 file changed: 2 ins; 0 del; 1 mod

8291496: Allocating card table before heap causes underflow asserts in CardTable::addr_for()

Co-authored-by: Albert Mingkun Yang <ayang at openjdk.org>
Reviewed-by: kbarrett, iwalulya

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

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



More information about the hotspot-gc-dev mailing list