Skip to content

[Native Image] TLABObjectHeaderConstant patching not performed using the LLVM back-endΒ #12274

@koutheir

Description

@koutheir

Describe the Issue

TLABObjectHeaderConstant introduces a new kind of constant that requires patching. Building a native image of a HelloWorld using the LLVM back-end, I was able to locate multiple instances of the poison value (0xDEADDEADDEADDEAD) in the generated binaries, and even in the intermediate files, e.g., b4.o. At runtime, this causes crashes due to an invalid object header given as argument to GenScavengeAllocationSupport.slowNewInstance().

Using the latest version of GraalVM can resolve many issues.

GraalVM Version

GraalVM EE version 25.0.0 built from source, including the LLVM back-end.

Operating System and Version

Linux/AArch64

Build Command

$ bin/native-image -H:+UnlockExperimentalVMOptions -H:CompilerBackend=llvm -H:TempDirectory=$(pwd) -g -H:-StripDebugInfo ... -H:-UnlockExperimentalVMOptions -cp .../playground Hello

Expected Behavior

No poison value present in the generated binary.

Actual Behavior

Many poison values present in the generated binary.

Steps to Reproduce

  1. Write a Hello world Java application.
  2. Build its class file.
  3. Build its native image using the LLVM back-end.

Additional Context

No response

Build Log Output and Error Messages

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions