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

Threads::create_vm() EXCEPTION_MARK is wrong

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • 9
    • None
    • hotspot


      There's an EXCEPTION_MARK and right afterwards, code that has CHECK_0 parameter.

      The CHECK_0 is return 0 if there's a pending exception but before it returns, the EXCEPTION_MARK destructor will assert that there should be no exceptions pending. There are two problems with this code.

      1. CHECK_0 returns 0 which is JNI_OK which makes the caller JNI_CreateJavaVM continue as if there was no error. There's no check for EXCEPTION_PENDING in the caller.

      2. The EXCEPTION_MARK assert isn't as helpful as finding out the real exception. It should probably call vm_exit_during_initialization() with the exception that was thrown.

            coleenp Coleen Phillimore
            coleenp Coleen Phillimore
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: