JDK-8344389 : 32-bit builds fail at CDS build time after JDK-8331497
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 24
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2024-11-18
  • Updated: 2024-12-13
  • Resolved: 2024-11-18
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 24
24 b25Fixed
Related Reports
Relates :  
Description
Trying to build 32-bit builds that do not enable `INCLUDE_CDS_JAVA_HEAP` would fail during the build on this assert:

```
#  Internal Error (/home/buildbot/worker/build-jdkX/build/src/hotspot/share/cds/archiveBuilder.cpp:900), pid=267008, tid=267017
#  assert(HeapShared::is_lambda_proxy_klass(ik)) failed: sanity
#
# JRE version: OpenJDK Runtime Environment (24.0) (fastdebug build 24-internal-adhoc.buildbot.build)
# Java VM: OpenJDK Server VM (fastdebug 24-internal-adhoc.buildbot.build, interpreted mode, g1 gc, linux-arm)
# Problematic frame:
# V  [libjvm.so+0x2a3db8]  ArchiveBuilder::make_klasses_shareable()+0x15d0
```

That assert was added by JDK-8331497. Unfortunately, with `!INCLUDE_CDS_JAVA_HEAP`, `HeapShared::is_lambda_proxy_klass` would be compiled as unconditional `false`, which is guaranteed to fail the assert.

I think the minimal fix to unbreak the builds is wrapping those asserts into appropriate macros.
Comments
Changeset: c4e7dc7f Branch: master Author: Aleksey Shipilev <shade@openjdk.org> Date: 2024-11-18 18:08:20 +0000 URL: https://git.openjdk.org/jdk/commit/c4e7dc7ff24809ced7bc3363fc3b462108b992dd
18-11-2024

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/22201 Date: 2024-11-18 11:09:38 +0000
18-11-2024