-
Bug
-
Resolution: Fixed
-
P4
-
1.4.0
-
beta
-
generic
-
generic
-
Verified
Name: egR10015 Date: 01/19/2001
HotSpot 1.4.0beta-b47 fails to pass the test
nsk/jvmdi/RedefineClasses/redefclass005
from testbase_nsk on all platforms. The JVMDI function RedefineClasses()
reports wrongly diagnostics that the new class version changes fields.
All sources files of the test are available in
/net/sqesvr/export/vsn/GammaBase/Bugs/<this bug number>.
The main test program (see file redefclass005.java) creates an instance
of tested class redefclass005r from the classfile locating at ./oldclass
directory. Then the test makes classfile redifinition of the loaded
class redefclass005r by calling the native function makeRedefinition().
Bytes defining new version of the class redefclass005r are taken from
the same classfile, i.e. actually the new version is purely identical
with the old version. But the JVMDI function RedefineClasses(),
which actually makes redifinition, fails with the following error:
JVMDI_ERROR_SCHEMA_CHANGE_NOT_IMPLEMENTED.
It means that the new class version changes fields but this is not true.
This wrongly diagnostics is also reported when the new version of
a redifined class is really differ from the old version somewhere
in a method's body but it leaves the class fields unchanged.
Note, that if in the redifined class redefclass005r almost all fields
are commented out except some instance fields, the test will pass
on all platforms.
The file ./oldclass/redefclass005r.java.passed contains this modified
version of the redifined class which lets the test pass.
To reproduce the bug run
doit.ksh <jdk root directory>
in
/net/sqesvr/export/vsn/GammaBase/Bugs/<this bug number>
-------------------------- output on Solaris ----------------------------
$ ./doit.ksh /home/eug/hotspot/jdk1.4/solsparc
java version "1.4.0-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta-b47)
Java HotSpot(TM) Client VM (build 1.4beta-B47, mixed mode)
redefclass005r: inside the checkIt()
Successfully check the class redefclass005r
Trying to redefine a class from the file:
/export/ld24/java/eug/evaluation/GammaBase/bug2file/oldclass/redefclass005r.class
>>>>>>>> List of implemented Class File Redefinition features:
can add method = no
can unrestrictedly redefine classes = no
>>>>>>>> Invoke RedefineClasses():
new class byte count=2135
TEST FAILED: the function RedefineClasses() returned error 64: JVMDI_ERROR_SCHEMA_CHANGE_NOT_IMPLEMENTED
For more info about this error see the JVMDI spec.
Check #2 PASSED: No JVMDI events were generated by the function RedefineClasses()
--------------------------------------------------------------------------
Here is output on Solaris with the modified version of the redifined class
mentioned above.
--------------------------------------------------------------------------
$ ./doit.ksh /home/eug/hotspot/jdk1.4/solsparc
java version "1.4.0-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta-b47)
Java HotSpot(TM) Client VM (build 1.4beta-B47, mixed mode)
redefclass005r: inside the checkIt()
Successfully check the class redefclass005r
Trying to redefine a class from the file:
/export/ld24/java/eug/evaluation/GammaBase/bug2file/oldclass/redefclass005r.class
>>>>>>>> List of implemented Class File Redefinition features:
can add method = no
can unrestrictedly redefine classes = no
>>>>>>>> Invoke RedefineClasses():
new class byte count=1368
Check #1 PASSED: RedefineClasses() is successfully done
Check #2 PASSED: No JVMDI events were generated by the function RedefineClasses()
---------------------------------------------------------------------------
======================================================================