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

DetachCurrentThread doesn't release monitors was taken by MonitorEnter (doc change)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 6
    • 6
    • hotspot
    • None
    • beta
    • x86
    • linux
    • Verified

      JNI spec states that all Java monitors held by thread are released after call of DetachCurrentThread. Test (see attachment) shows that it isn't correct.

      PS Wow, but jrockit works fine.
      ###@###.### 2005-06-08 13:00:11 GMT

      DetachCurrentThread also doesn't free local variables from java frames in thread stack. These frames are unreacheable but GC doesn't collect them until native thread is finished.
      ###@###.### 2005-06-09 14:51:06 GMT

      I'm sorry, i had attached incorrect test case sources. Updated source is correct (no DetachCurrentThread failures).
      Moreover, IBM VM have the same problem as a hotspot. but jrockit still correct one!
      ###@###.### 2005-06-22 13:30:51 GMT

            sbohne Steve Bohne (Inactive)
            azhmursunw Anatoly Zhmur (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: