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

In a debug build, JNI_GetCreatedJavaVMs cannot be called before JNI_CreateJavaVM

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 1.4.0
    • Component/s: hotspot
    • Subcomponent:
    • Resolved In Build:
      beta2
    • CPU:
      generic
    • OS:
      generic

      Description



      Name: cl74495 Date: 08/30/2000


      The C main program of a particular JNI application calls
      JNI_GetCreatedJavaVMs before calling JNI_CreateJavaVM .
      The JNI_GetCreatedJavaVMs fails with SEGV due to the JNIWrapper
      executing in an uninitialized VM . The stack is
        [1] ThreadLocalStorage::get_thread_via_cache(0x1515d8, 0xfc3b4ec0, 0x64, 0xfce0b, 0xfc36a16c, 0xfce0b5a4), at 0xfbc50784
        [2] GenericGrowableArray::GenericGrowableArray(0x151c98, 0x1515d8, 0xfc0b2fd8, 0x190, 0xfc36a16c, 0x0), at 0xfb9bf9cc
        [3] Histogram::Histogram(0x151c98, 0xfc103db4, 0x64, 0xd27f0, 0x0, 0x0), at 0xfb9c3530
      =>[4] JNIHistogramElement::JNIHistogramElement(this = 0xd27b0, elementName = 0xfc1162fc "GetCreatedJavaVMs"), line 106 in "jni.cpp"
        [5] JNI_GetCreatedJavaVMs(vm_buf = 0xfce0b7e4, bufLen = 1, numVMs = 0xfce0b7e8),
       line 2063 in "jni.cpp"

      The simplest fix is to just comment out the JNIWrapper in
      JNI_GetCreatedJavaVMs . Otherwise some more logic is required
      in JNIWrapper for the debug builds, to detect the "uninitialized VM"
        state.
      (Review ID: 109131)
      ======================================================================

        Attachments

          Activity

            People

            • Assignee:
              jmcilreesunw James Mcilree (Inactive)
              Reporter:
              clucasius Carlos Lucasius (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: