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

REGRESSION: AWT locking through JAWT broken since b53

XMLWordPrintable

    • 2d
    • b53
    • 6
    • b77
    • generic
    • generic

      The restructuring in 6317330 switching the AWT lock to use
      ReentrantLock has caused a regression in the AWT native interface
      (JAWT)'s ability to lock the AWT on X11 platforms. The logic error is
      in src/solaris/native/sun/awt/awt_DrawingSurface.c and is quite
      obvious:

      ***************
      *** 350,356 ****
        JNIEXPORT void JNICALL
            awt_Lock(JNIEnv* env)
        {
      ! if (awt_lock != NULL) {
                AWT_LOCK();
            }
        }
      --- 350,356 ----
        JNIEXPORT void JNICALL
            awt_Lock(JNIEnv* env)
        {
      ! if (!awtLockInited) {
                AWT_LOCK();
            }
        }
      ***************
      *** 358,364 ****
        JNIEXPORT void JNICALL
            awt_Unlock(JNIEnv* env)
        {
      ! if (awt_lock != NULL) {
                AWT_FLUSH_UNLOCK();
            }
        }
      --- 358,364 ----
        JNIEXPORT void JNICALL
            awt_Unlock(JNIEnv* env)
        {
      ! if (!awtLockInited) {
                AWT_FLUSH_UNLOCK();
            }
        }

      The sense is wrong on the tests of "awtLockInited".

      This has caused the current builds of JOGL (http://jogl.dev.java.net/)
      to break and can cause any application performing native rendering to
      potentially break. This did not become apparent in earlier builds
      because the locking JOGL was doing was overly strict. This is a
      serious regression and must be fixed immediately.

            campbell Christopher Campbell (Inactive)
            kbr Kenneth Russell (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: