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

Wrong location reported for a thread stopped on a contended monitor

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.4.0, 1.4.1, 1.4.2
    • hotspot
    • None
    • x86, sparc
    • solaris_7, solaris_9, windows_2000

      A test for this is in regressionTestsInWaiting/SyncLineNumberTest.sh.

      Basically, it uses jdb to stop at a line (eg line 12) that contains
         synchronized(object1) {
      where the monitor for object1 is already locked. It then does
      a 'next' which causes the thread to wait for the monitor. If the thread is
      suspended, we find that its location is now the BCI for line 13. It should
      still be the BCI of the monitorenter which will cause the line
      number to be reported as 12.

      This test passes on IA64.
      See also
         4787861 JDI: wrong location of step event after thrown exception

            sspitsyn Serguei Spitsyn
            jjh James Holmlund (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: