Skip to content

Conversation

@iklam
Copy link
Member

@iklam iklam commented Oct 30, 2025

Overview

This PR fixes the problem where the JDK build is not reproducible because the lib/server/classes*.jsa files do not always put the heap objects at the same addresses. This bug affects only +UseCompressedOops.

This bug is in generic code and is not specific to any platform. We hadn't hit this bug because our build platforms always allocated the heap at the same location. However, this is no longer true with macOS 26, which puts the heap at random locations.

The fix

(1) In ArchiveHeapWriter::init(), we check if we need deterministic heap contents.

(2) In ArchiveHeapWriter::set_requested_address_range(), if deterministic heap contents are needed, we always put the archived heap objects to just below 0x100000000, so that we always write the archived oops into the CDS archive with zero-based, zero-shift encoding.

Please see comments in the above two functions for more details.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8363986: Heap region in CDS archive is not at deterministic address (Bug - P3)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/28052/head:pull/28052
$ git checkout pull/28052

Update a local copy of the PR:
$ git checkout pull/28052
$ git pull https://git.openjdk.org/jdk.git pull/28052/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 28052

View PR using the GUI difftool:
$ git pr show -t 28052

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/28052.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Oct 30, 2025

👋 Welcome back iklam! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Oct 30, 2025

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk
Copy link

openjdk bot commented Oct 30, 2025

@iklam The following label will be automatically applied to this pull request:

  • hotspot-runtime

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the rfr Pull request is ready for review label Oct 30, 2025
@mlbridge
Copy link

mlbridge bot commented Oct 30, 2025

Webrevs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hotspot-runtime [email protected] rfr Pull request is ready for review

Development

Successfully merging this pull request may close these issues.

1 participant