-
Bug
-
Resolution: Fixed
-
P4
-
1.4.0, 1.4.2, 5.0
-
tiger
-
generic
-
generic
-
Verified
Name: elR10090 Date: 10/11/2001
Ivan Popov <###@###.###>
The test
nsk/jdwp/ReferenceType/NestedTypes/nestedtypes001
failed to pass against all builds of J2DK including last
Merlin-b82 and Ladybird-b24 on all platforms.
This test establishes a raw JDWP socket connection to debuggee VM and
sends a ReferenceType.NestedTypes command packet to it. The failure is
that the reply packet received by the test contains no data.
Specification for ReferenceType.NestedTypes command says:
Out Data
referenceTypeID refType The reference type ID.
Reply Data
int classes The number of nested classes
and interfaces
Repeated classes times:
byte refTypeTag Kind of following reference type.
referenceTypeID typeID The nested class or interface ID.
So the reply packet should contain at least number of nested classes
in the packet data. In this test the reply packet should also contain
three typeID's of nested classes. However, the received reply packet
contains empty data section.
Here is description of the class in debuggee which is queried for
nested classes:
// tested class with nested classes
public static class TestedClass {
public interface NestedInterface {
public int methodFoo();
}
public static class StaticNestedClass implements NestedInterface {
int foo = 0;
public int methodFoo() { return foo; }
}
public class InnerNestedClass extends StaticNestedClass {
public int methodFoo() { return foo + foo; }
}
public TestedClass() {
// ensure all nested classes are loaded
InnerNestedClass foo = new InnerNestedClass();
}
}
Here is citation from the test log:
-------------------------------------------------------------------------
>>> Testing JDWP command
Create command packet:
Command: ReferenceType.NestedTypes
ReferenceTypeID: 2
Sending command packet:
Packet header:
0000 (length) : 0x00000013 (19)
0004 (id) : 0x00000007 (7)
0008 (flags) : 0x00 (0)
0009 (command): 0x0208 (520)
Entire packet bytes:
0000: 00 00 00 13 00 00 00 07 00 02 08 00 00 00 00 00 ................
0010: 00 00 02 ...
Packet end
Waiting for reply packet
Reply packet received:
Packet header:
0000 (length) : 0x0000000b (11)
0004 (id) : 0x00000007 (7)
0008 (flags) : 0x80 (-128)
0009 (error) : 0x0000 (0)
Entire packet bytes:
0000: 00 00 00 0b 00 00 00 07 80 00 00 ....... ..
Packet end
Checking reply packet header
Parsing reply packet:
# ERROR: Unable to extract number of nested classes from reply packet:
# ERROR: Unable to get 4 bytes of int value at 0x000b (available bytes:
0)
>>> Finishing test
-------------------------------------------------------------------------
This log shows that reply packet contains only header without any data,
so it's unable to extract number of nested classes from the packet.
This test will appear in the next r09 release of testbase_nsk
located here:
/net/sqesvr.sfbay/export/vsn/VM/testbase/testbase_nsk.v14
To reproduce the bug run 'doit.sh' script located here:
/net/sqesvr.sfbay/export/vsn/GammaBase/Bugs/<this bug number>
Use:
sh doit.sh $JAVA_HOME
Where:
$JAVA_HOME: points to JDK-1.4 b81
======================================================================
The bug exit in 1.4.2 JDK, the test nsk/jdwp/ReferenceType/NestedTypes/nestedtypes001 fail:
[2008-08-06T17:46:45.05] >>> Finishing test
[2008-08-06T17:46:45.05]
[2008-08-06T17:46:45.05] Sending signal to debugee: quit
[2008-08-06T17:46:45.05] Waiting for debugee exits
[2008-08-06T17:46:45.05] Debugee PASSED with exit code: 95
[2008-08-06T17:46:45.05] # ERROR: TEST FAILED
[2008-08-06T17:46:45.05]
[2008-08-06T17:46:45.05]
[2008-08-06T17:46:45.05] #>
[2008-08-06T17:46:45.05] #> SUMMARY: Following errors occured
[2008-08-06T17:46:45.05] #> during test execution:
[2008-08-06T17:46:45.05] #>
[2008-08-06T17:46:45.05] # ERROR: Unable to extract number of nested classes from reply packet:
[2008-08-06T17:46:45.05] # ERROR: Unable to get 4 bytes of int value at 0x000b (available bytes: 0)
[2008-08-06T17:46:45.05] # ERROR: TEST FAILED
[2008-08-06T17:46:45.05] # Test level exit status: 97
[2008-08-06T17:46:46.08]
http://vice.russia/gtee/1.4.2_17/b06/142_VM/32/vm/solaris-sparc/vm-solaris-sparc_11B9400185A2008-08-05-21-53-24/stt-robot.SunOS.sparc/nestedtypes001/nestedtypes001.log
- relates to
-
JDK-4921260 JDWP: nestedtypes should not include anonymous classes
-
- Resolved
-