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

vmTestbase/nsk/jdb/stop_at/stop_at002/stop_at002.java failure goes undetected

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P5 P5
    • 24
    • 24
    • core-svc
    • b10

      vmTestbase/nsk/jdb/stop_at/stop_at002/stop_at002.java is testing to make sure a jdb deferred breakpoint on an inner class works. The breakpoint line number information for the debuggee is wrong, so the test should be failing, but isn't. The debugger side has:

          static final String DEBUGGEE_LOCATION1 = DEBUGGEE_CLASS + "$Nested$DeeperNested$DeepestNested:43";
          static final String DEBUGGEE_LOCATION2 = DEBUGGEE_CLASS + "$Inner$MoreInner:57";

      And the debuggee side has:

                          flag = input; /* <-------- This is line number 43 */

      and

                      content += input; /* <-------- This is line number 57 */

      However line numbers (even the ones in the comments) are wrong. They probably have been ever since this file was open sourced and the new copyright header was added. As a result, in the jdb out you see failures like:

      [17:24:22.782] reply[0]: > Unable to set deferred breakpoint nsk.jdb.stop_at.stop_at002.stop_at002a$Nested$DeeperNested$DeepestNested:43 : No code at line 43 in nsk.jdb.stop_at.stop_at002.stop_at002a$Nested$DeeperNested$DeepestNested

      However, this is not caught by the test. The test only checks for the failed setting of the deferred breakpoint when executing the jdb "stop at" command. The failure does not actually happen until after the test continues, allowing the class to be loaded and for jdb to actually attempt to set the breakpoint.

      So there are two issues with the test: wrong breakpoint line number information, and failure to determine that a deferred breakpoint failed to be setup when the class was loaded.

            cjplummer Chris Plummer
            cjplummer Chris Plummer
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: