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

Classic VM: native MonitorExit() returns incorrect result if the Monitor is free

XMLWordPrintable

    • x86
    • windows_nt



      Name: dkC59003 Date: 01/27/2000


      The regression test (testbase_nsk) nsk/regression/b4292614 fails
      under the Classic VM (build 1.3.0rc1-T) on win32.

      The test calls the native MonitorExit() method without the MonitorEnter().
      According to the JNI Spesification MonitorExit() method should return
      a negative value but it returns "0" that is correct only on success.

      To reproduce the bug run doit.bat on win32 in
      /net/sqesvr/vsn/GammaBase/Bugs/<this bug number>.

      The first parameter for doit.bat should be JDK root directory
      (e.g. L:/java/jdk1.3/win32) and the other parameter(s) -
      VM option(s) (optional).

      The same results are produced under:

      1. The Classic VM (build JDK-1.2.2-W, native threads, symcjit) on Win32.
      2. The Classic VM (build 1.3.0rc1-T, green threads, nojit) on Solaris.
      3. The Classic VM (build JDK-1.2.2-W, green threads, sunwjit) on Solaris.

      To reproduce the bug on Solaris run doit.sh in
      /net/sqesvr/vsn/GammaBase/Bugs/<this bug number>.


      See log:

      % doit.bat d:/export/java/jdk1.3/win32
      java version "1.3.0rc1"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0rc1-T)
      Classic VM (build 1.3.0rc1-T, native threads, nojit)
      ==> nsk/regression/b4292614 test LOG:
      ----> JNI MonitorExit() is called (without MonitorEnter)
      ==> nsk/regression/b4292614 test FAILED
      ----> Expected result: IllegalMonitorStateException
      ----> MonitorExit_result = <negative value>
      ----> Produced result: IllegalMonitorStateException
      ----> MonitorExit_result = 0


      ======================================================================

            collins Gary Collins (Inactive)
            dkhukhrosunw Dmitry Khukhro (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: