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

UB: Compile::_phase_optimize_finished is initialized too late

    XMLWordPrintable

Details

    • b08

    Backports

      Description

        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

        /Users/gerard/Work/tmp/jdk/src/hotspot/share/opto/compile.hpp:811 Load of value 32, which is not a valid value for type 'bool'

        Invalid bool load
        #0 0x0000000111b0de77 in Compile::phase_optimize_finished() const at /Users/gerard/Work/tmp/jdk/src/hotspot/share/opto/compile.hpp:811
        #1 0x0000000111b0dc5f in Node::verify_construction() at /Users/gerard/Work/tmp/jdk/src/hotspot/share/opto/node.cpp:89
        #2 0x0000000111b0fba3 in Node::Node(unsigned int) at /Users/gerard/Work/tmp/jdk/src/hotspot/share/opto/node.cpp:338
        #3 0x0000000111887883 in RegionNode::RegionNode(unsigned int) at /Users/gerard/Work/tmp/jdk/src/hotspot/share/opto/cfgnode.hpp:79
        #4 0x0000000111887763 in LoopNode::LoopNode(Node*, Node*) at /Users/gerard/Work/tmp/jdk/src/hotspot/share/opto/loopnode.hpp:143
        #5 0x0000000111c43b4b in RootNode::RootNode() at /Users/gerard/Work/tmp/jdk/src/hotspot/share/opto/rootnode.hpp:37
        #6 0x0000000111c26958 in RootNode::RootNode() at /Users/gerard/Work/tmp/jdk/src/hotspot/share/opto/rootnode.hpp:37
        #7 0x0000000111c2301f in Compile::Init(bool) at /Users/gerard/Work/tmp/jdk/src/hotspot/share/opto/compile.cpp:983
        #8 0x0000000111c26427 in Compile::Compile(ciEnv*, TypeFunc const* (*)(), unsigned char*, char const*, int, bool, bool, DirectiveSet*) at /Users/gerard/Work/tmp/jdk/src/hotspot/share/opto/compile.cpp:940
        #9 0x0000000111ceb407 in OptoRuntime::generate_stub(ciEnv*, TypeFunc const* (*)(), unsigned char*, char const*, int, bool, bool) at /Users/gerard/Work/tmp/jdk/src/hotspot/share/opto/runtime.cpp:175
        #10 0x0000000111ceb093 in OptoRuntime::generate(ciEnv*) at /Users/gerard/Work/tmp/jdk/src/hotspot/share/opto/runtime.cpp:143
        #11 0x0000000111cad217 in C2Compiler::init_c2_runtime() at /Users/gerard/Work/tmp/jdk/src/hotspot/share/opto/c2compiler.cpp:82
        #12 0x0000000111cad2cf in C2Compiler::initialize() at /Users/gerard/Work/tmp/jdk/src/hotspot/share/opto/c2compiler.cpp:95
        #13 0x0000000111e8437b in CompileBroker::init_compiler_runtime() at /Users/gerard/Work/tmp/jdk/src/hotspot/share/compiler/compileBroker.cpp:1730
        #14 0x0000000111e8504f in CompileBroker::compiler_thread_loop() at /Users/gerard/Work/tmp/jdk/src/hotspot/share/compiler/compileBroker.cpp:1867
        #15 0x0000000110eed6cb in JavaThread::thread_main_inner() at /Users/gerard/Work/tmp/jdk/src/hotspot/share/runtime/javaThread.cpp:710
        #16 0x0000000110eed4bb in JavaThread::run() at /Users/gerard/Work/tmp/jdk/src/hotspot/share/runtime/javaThread.cpp:695
        #17 0x0000000110d9837b in Thread::call_run() at /Users/gerard/Work/tmp/jdk/src/hotspot/share/runtime/thread.cpp:224
        #18 0x00000001109abd1f in thread_native_entry(Thread*) at /Users/gerard/Work/tmp/jdk/src/hotspot/os/bsd/os_bsd.cpp:572
        #19 0x00000001000995d3 in _pthread_start ()

        Attachments

          Issue Links

            Activity

              People

                dfenacci Damon Fenacci
                gziemski Gerard Ziemski
                Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: