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

ubsan: relocInfo.cpp:155:30: runtime error: applying non-zero offset to null pointer

XMLWordPrintable

    • b26
    • x86
    • os_x

        When building with ubsan (configure-flag --enable-ubsan) , we run into this issue :
        /jdk/src/hotspot/share/code/relocInfo.cpp:155:30: runtime error: applying non-zero offset 18446744073709551614 to null pointer
            #0 0x102124490 in RelocIterator::RelocIterator(CodeSection*, unsigned char*, unsigned char*) relocInfo.cpp:155
            #1 0x1014770b1 in CodeBuffer::relocate_code_to(CodeBuffer*) const codeBuffer.cpp:799
            #2 0x101476bcb in CodeBuffer::copy_code_to(CodeBlob*) codeBuffer.cpp:736
            #3 0x1014709fe in RuntimeStub::new_runtime_stub(char const*, CodeBuffer*, short, int, OopMapSet*, bool, bool) codeBlob.cpp:408
            #4 0x10131ad11 in Runtime1::generate_blob(BufferBlob*, int, char const*, bool, StubAssemblerCodeGenClosure*) c1_Runtime1.cpp:230
            #5 0x10131ae9c in Runtime1::generate_blob_for(BufferBlob*, Runtime1::StubID) c1_Runtime1.cpp:259
            #6 0x10131b164 in Runtime1::initialize(BufferBlob*) c1_Runtime1.cpp:268
            #7 0x101255b87 in Compiler::init_c1_runtime() c1_Compiler.cpp:53
            #8 0x101255bdf in Compiler::initialize() c1_Compiler.cpp:74
            #9 0x1014db6d1 in CompileBroker::init_compiler_runtime() compileBroker.cpp:1773
            #10 0x1014dbfc7 in CompileBroker::compiler_thread_loop() compileBroker.cpp:1915
            #11 0x101ad5d1f in JavaThread::thread_main_inner() javaThread.cpp:760
            #12 0x101ad59c2 in JavaThread::run() javaThread.cpp:745
            #13 0x102431096 in Thread::call_run() thread.cpp:221

        Seems we do _current = cs->locs_start()-1; in the coding where cs->locs_start() returns a nullptr ; should we somehow improve the nullptr handling here ?

              kvn Vladimir Kozlov
              mbaesken Matthias Baesken
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: