Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8300798

UB: Applying non-zero offset 18446744073709551614 to null pointer

XMLWordPrintable

      Undefined Behavior discovered after turning "UndefinedBehaviorSanitizer" in Xcode running simple HelloWorld java app. More info on clang undefined behavior sanitizer can be found https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html

      Nullptr with nonzero offset

      #0 0x0000000110f75a13 in RelocIterator::RelocIterator(CodeSection*, unsigned char*, unsigned char*) at /Users/gerard/Work/tmp/jdk/src/hotspot/share/code/relocInfo.cpp:153
      #1 0x0000000110a0d13f in CodeBuffer::relocate_code_to(CodeBuffer*) const at /Users/gerard/Work/tmp/jdk/src/hotspot/share/asm/codeBuffer.cpp:782
      #2 0x0000000110a0c8a7 in CodeBuffer::copy_code_to(CodeBlob*) at /Users/gerard/Work/tmp/jdk/src/hotspot/share/asm/codeBuffer.cpp:719
      #3 0x0000000110f53753 in RuntimeBlob::RuntimeBlob(char const*, CodeBuffer*, int, int, int, int, OopMapSet*, bool) at /Users/gerard/Work/tmp/jdk/src/hotspot/share/code/codeBlob.cpp:161
      #4 0x0000000110f54e6b in RuntimeStub::RuntimeStub(char const*, CodeBuffer*, int, int, int, OopMapSet*, bool) at /Users/gerard/Work/tmp/jdk/src/hotspot/share/code/codeBlob.cpp:406
      #5 0x0000000110f54ee8 in RuntimeStub::RuntimeStub(char const*, CodeBuffer*, int, int, int, OopMapSet*, bool) at /Users/gerard/Work/tmp/jdk/src/hotspot/share/code/codeBlob.cpp:407
      #6 0x0000000110f54fff in RuntimeStub::new_runtime_stub(char const*, CodeBuffer*, int, int, OopMapSet*, bool) at /Users/gerard/Work/tmp/jdk/src/hotspot/share/code/codeBlob.cpp:422
      #7 0x000000011085c867 in StubGenerator::generate_jfr_write_checkpoint() at /Users/gerard/Work/tmp/jdk/src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp:6967
      #8 0x0000000110856f93 in StubGenerator::generate_phase1() at /Users/gerard/Work/tmp/jdk/src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp:7965
      #9 0x0000000110856d0b in StubGenerator::StubGenerator(CodeBuffer*, int) at /Users/gerard/Work/tmp/jdk/src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp:8121
      #10 0x0000000110856c48 in StubGenerator::StubGenerator(CodeBuffer*, int) at /Users/gerard/Work/tmp/jdk/src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp:8117
      #11 0x0000000110856bfb in StubGenerator_generate(CodeBuffer*, int) at /Users/gerard/Work/tmp/jdk/src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp:8133
      #12 0x0000000110e7095b in StubRoutines::initializeContinuationStubs() at /Users/gerard/Work/tmp/jdk/src/hotspot/share/runtime/stubRoutines.cpp:279
      #13 0x0000000110e71c58 in stubRoutines_initContinuationStubs() at /Users/gerard/Work/tmp/jdk/src/hotspot/share/runtime/stubRoutines.cpp:389
      #14 0x0000000110eb94b7 in init_globals() at /Users/gerard/Work/tmp/jdk/src/hotspot/share/runtime/init.cpp:129
      #15 0x0000000110efb29f in Threads::create_vm(JavaVMInitArgs*, bool*) at /Users/gerard/Work/tmp/jdk/src/hotspot/share/runtime/threads.cpp:564
      #16 0x0000000111111b0b in JNI_CreateJavaVM_inner(JavaVM_**, void**, void*) [inlined] at /Users/gerard/Work/tmp/jdk/src/hotspot/share/prims/jni.cpp:3591
      #17 0x0000000111111a74 in ::JNI_CreateJavaVM(JavaVM **, void **, void *) at /Users/gerard/Work/tmp/jdk/src/hotspot/share/prims/jni.cpp:3677
      #18 0x0000000111111a73 in ::JNI_CreateJavaVM(JavaVM **, void **, void *) at /Users/gerard/Work/tmp/jdk/src/hotspot/share/prims/jni.cpp:3671
      #19 0x00000001001027f7 in InitializeJVM [inlined] at /Users/gerard/Work/tmp/jdk/src/java.base/share/native/libjli/java.c:1459
      #20 0x0000000100102744 in JavaMain at /Users/gerard/Work/tmp/jdk/src/java.base/share/native/libjli/java.c:413
      #21 0x0000000100102743 in JavaMain ()
      #22 0x00000001001053f7 in ThreadJavaMain at /Users/gerard/Work/tmp/jdk/src/java.base/macosx/native/libjli/java_md_macosx.m:720
      #23 0x00000001000995d3 in _pthread_start ()

            Unassigned Unassigned
            gziemski Gerard Ziemski
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: