JDK-8351334 : [ubsan] memoryReserver.cpp:552:60: runtime error: applying non-zero offset 1073741824 to null pointer
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 25
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • OS: os_x
  • CPU: aarch64
  • Submitted: 2025-03-06
  • Updated: 2025-07-02
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 26
26Unresolved
Related Reports
Blocks :  
Relates :  
Description
When running ubsan enabled binaries on macos aarch64, the test
runtime/CommandLine/OptionsValidation/TestOptionsWithRanges_id2

in this coding
552    size_t noaccess_prefix = ((aligned_heap_base_min_address + size) > (char*)OopEncodingHeapMax) ?
553      noaccess_prefix_size : 0;

triggered the following warning because of adding to a nullptr :

stderr content[/priv/jenkins/client-home/workspace/openjdk-jdk-weekly-macos_aarch64-opt/jdk/src/hotspot/share/memory/memoryReserver.cpp:552:60: runtime error: applying non-zero offset 1073741824 to null pointer
    #0 0x1080bfa9c in HeapReserver::Instance::reserve_compressed_oops_heap(unsigned long, unsigned long, unsigned long) memoryReserver.cpp:552
    #1 0x1080bff4c in HeapReserver::reserve(unsigned long, unsigned long, unsigned long, char const*) memoryReserver.cpp:688
    #2 0x10865e024 in Universe::reserve_heap(unsigned long, unsigned long) universe.cpp:959
    #3 0x107a16b50 in G1CollectedHeap::initialize() g1CollectedHeap.cpp:1297
    #4 0x10865d8b0 in universe_init() universe.cpp:880
    #5 0x107bc69e0 in init_globals() init.cpp:132
    #6 0x108627260 in Threads::create_vm(JavaVMInitArgs*, bool*) threads.cpp:576
    #7 0x107d03e68 in JNI_CreateJavaVM jni.cpp:3678
    #8 0x10323e510 in JavaMain java.c:494
    #9 0x10324553c in ThreadJavaMain java_md_macosx.m:679
    #10 0x1936fef90 in _pthread_start+0x84 (libsystem_pthread.dylib:arm64e+0x6f90)
    #11 0x1936f9d30 in thread_start+0x4 (libsystem_pthread.dylib:arm64e+0x1d30)