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

ReferenceType.locationsOfLine() returns empty list for lines containing CR

XMLWordPrintable

    • generic
    • generic



      Name: egR10015 Date: 05/24/2001



      HotSpot 1.4.0beta-b65 fails to pass the following tests

      nsk/jdi/EventRequestManager/breakpointRequests/breakpreq001
      nsk/jdi/EventRequestManager/deleteAllBreakpoints/delallbreakp001

      from testbase_nsk on all platforms in all VM modes. The JDI method
      ReferenceType.locationsOfLine() returns an empty list of Location
      objects for a given line number which is valid and corresponds
      to an executable source line of a debuggee. The empty list is
      returned when each line of the debuggee source file (please see
      the file breakpreq001t.java) contains the Windows convention CR symbol
      (ASCII 13 decimal). If the debuggee source file contains only LF
      characters without CR (Unix convention), the locationsOfLine()
      method works fine. Note also that HS 1.3.1-b24 successfully passes
      the tests on all platforms independently of end-of-line characters.

      To reproduce the bug run with HS1.4:

      sh doit.sh $JAVA_HOME

      in
      /net/sqesvr.eng/export/vsn/GammaBase/Bugs/<this bug number>

      -------------- output on Windows 2000 with HS 1.4.0-b65 --------------
      $ sh doit.sh h:/hotspot/jdk1.4/win
      java version "1.4.0-beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta-b65)
      Java HotSpot(TM) Client VM (build 1.4.0-beta-b65, mixed mode)
      binder> Listening for a pipe connection to port: 7000
      binder> Binding to pipe socket
      binder> Listening to pipe server socket
      binder> VirtualMachineManager: version 1.4
      binder> FindingConnector: default
      binder> LaunchingConnector:
      binder> name: com.sun.jdi.CommandLineLaunch
      binder> description: Launches target using Sun Java VM command line and attaches to it
      binder> transport: com.sun.tools.jdi.SharedMemoryTransport@5d173
      binder> Connector arguments:
      binder> home=h:\hotspot\jdk1.4\win
      binder> vmexec=java
      binder> options= -classpath ".;share/classes;h:/hotspot/jdk1.4/win/lib/tools.jar"
      binder> main=nsk.jdi.EventRequestManager.breakpointRequests.breakpreq001t "-verbose"
      binder> quote="
      binder> suspend=true
      binder> Launch debugee
      test.pipe> Waiting for pipe connection
      debugee.err> debugee.pipe> Making pipe connection to socket: localhost:7000
      # ERROR: TEST FAILED: ReferenceType.locationsOfLine() returned 0 JDI Locations
      # ERROR: for the valid debuggee's line #14
      test.pipe> Closing pipe socket
      binder> Closing pipe server socket
      exit code = 97
      ----------------------------------------------------------------------

      -------------- output on Windows 2000 with HS 1.3.1-b24 --------------
      $ sh doit.sh h:/hotspot/jdk1.3.1/win
      java version "1.3.1"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-b24)
      Java HotSpot(TM) Client VM (build 1.3.1-b24, mixed mode)
      binder> Listening for a pipe connection to port: 7000
      binder> Binding to pipe socket
      binder> Listening to pipe server socket
      binder> VirtualMachineManager: version 1.3
      binder> FindingConnector: default
      binder> LaunchingConnector:
      binder> name: com.sun.jdi.CommandLineLaunch
      binder> description: Launches target using Sun Java VM command line and attaches to it
      binder> transport: com.sun.tools.jdi.SharedMemoryTransport@4a5ab2
      binder> Connector arguments:
      binder> home=h:\hotspot\jdk1.3.1\win
      binder> vmexec=java
      binder> options= -classpath ".;share/classes;h:/hotspot/jdk1.3.1/win/lib/tools.jar"
      binder> main=nsk.jdi.EventRequestManager.breakpointRequests.breakpreq001t "-verbose"
      binder> quote="
      binder> suspend=true
      binder> Launch debugee
      test.pipe> Waiting for pipe connection
      debugee.err> debugee.pipe> Making pipe connection to socket: localhost:7000
      Creating BreakpointRequest for the location:
              breakpreq001t.java:14 method: void main
      Creating BreakpointRequest for the location:
              breakpreq001t.java:31 method: byte byteMeth
      Creating BreakpointRequest for the location:
              breakpreq001t.java:34 method: short shortMeth
      Creating BreakpointRequest for the location:
              breakpreq001t.java:37 method: int prMeth
      Creating BreakpointRequest for the location:
              breakpreq001t.java:40 method: long protMeth
      Creating BreakpointRequest for the location:
              breakpreq001t.java:43 method: float floatMeth
      Creating BreakpointRequest for the location:
              breakpreq001t.java:46 method: double doubleMeth
      Creating BreakpointRequest for the location:
              breakpreq001t.java:49 method: char charMeth
      Creating BreakpointRequest for the location:
              breakpreq001t.java:52 method: boolean boolMeth
      Creating BreakpointRequest for the location:
              breakpreq001t.java:55 method: java.lang.String pubMeth

      1) Getting BreakpointRequest objects with disabled event requests...
      Found expected Breakpoint request for the location:
              breakpreq001t.java:14 method: void main
      Found expected Breakpoint request for the location:
              breakpreq001t.java:31 method: byte byteMeth
      Found expected Breakpoint request for the location:
              breakpreq001t.java:34 method: short shortMeth
      Found expected Breakpoint request for the location:
              breakpreq001t.java:37 method: int prMeth
      Found expected Breakpoint request for the location:
              breakpreq001t.java:40 method: long protMeth
      Found expected Breakpoint request for the location:
              breakpreq001t.java:43 method: float floatMeth
      Found expected Breakpoint request for the location:
              breakpreq001t.java:46 method: double doubleMeth
      Found expected Breakpoint request for the location:
              breakpreq001t.java:49 method: char charMeth
      Found expected Breakpoint request for the location:
              breakpreq001t.java:52 method: boolean boolMeth
      Found expected Breakpoint request for the location:
              breakpreq001t.java:55 method: java.lang.String pubMeth

      2) Getting BreakpointRequest objects with enabled event requests...
      Following JDI event occured: VMStartEvent in thread main
      Found expected Breakpoint request for the location:
              breakpreq001t.java:14 method: void main
      Found expected Breakpoint request for the location:
              breakpreq001t.java:31 method: byte byteMeth
      Found expected Breakpoint request for the location:
              breakpreq001t.java:34 method: short shortMeth
      Found expected Breakpoint request for the location:
              breakpreq001t.java:37 method: int prMeth
      Found expected Breakpoint request for the location:
              breakpreq001t.java:40 method: long protMeth
      Found expected Breakpoint request for the location:
              breakpreq001t.java:43 method: float floatMeth
      Found expected Breakpoint request for the location:
              breakpreq001t.java:46 method: double doubleMeth
      Found expected Breakpoint request for the location:
              breakpreq001t.java:49 method: char charMeth
      Found expected Breakpoint request for the location:
              breakpreq001t.java:52 method: boolean boolMeth
      Found expected Breakpoint request for the location:
              breakpreq001t.java:55 method: java.lang.String pubMeth
      Following JDI event occured: VMDeathEvent
      Following JDI event occured: VMDisconnectEvent
      binder> Closing pipe server socket
      test.pipe> Closing pipe socket
      exit code = 95
      ----------------------------------------------------------------------

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

            gafter Neal Gafter (Inactive)
            eugsunw Eug Eug (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: