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

Unsafe handle resolution in ConstantOopWriteValue::write_on() / print_on() and LIR_Assembler::jobject2reg()

    Details

    • Subcomponent:
    • Resolved In Build:
      b36

      Backports

        Description

        There's an assert in ConstantOopWriteValue::write_on() which does JNIHandles::resolve(). The problem is current thread is compiler thread and it isn't in VM (but in native) at that moment. So, it's unsafe to resolve a handle and access the naked oop.

        void ConstantOopWriteValue::write_on(DebugInfoWriteStream* stream) {
          assert(JNIHandles::resolve(value()) == NULL ||
                 Universe::heap()->is_in_reserved(JNIHandles::resolve(value())),
                 "Should be in heap");
          stream->write_int(CONSTANT_OOP_CODE);
          stream->write_handle(value());
        }

        Original report:
        http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/2017-November/027546.html

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  rraghavan Rahul Raghavan
                  Reporter:
                  vlivanov Vladimir Ivanov
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  8 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: