-
Bug
-
Resolution: Fixed
-
P5
-
6
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2133104 | 6 | Kelly Ohair | P4 | Resolved | Fixed | b71 |
FULL PRODUCT VERSION :
1.6.0-rc-b64
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]
All OS.
A DESCRIPTION OF THE PROBLEM :
the static void write_instruction(MethodImage *mi) C functions has two bugs :
at line 1428 :
case JVM_OPC_goto:
new_opcode = JVM_OPC_jsr_w;
has to be replaced by
case JVM_OPC_goto:
new_opcode = JVM_OPC_goto_w;
At line 1493 when writing the new goto offset :
writeU4(ci, new_delta); /* write new and wide delta */
must be replaced by
writeU4(ci, new_delta - 3); /* write new and wide delta */
since the correct new offset is now new_delta - 3 and not new_delta.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
One easy way to reproduce the bug is to modify the line 1282 (adjust_instruction function).
For example replace
if ((new_delta < -32768) || (new_delta > 32767)) {
by
if ((new_delta < -16) || (new_delta > 15)) {
to force call to widen() function.
REPRODUCIBILITY :
This bug can be reproduced always.
CUSTOMER SUBMITTED WORKAROUND :
See description<
1.6.0-rc-b64
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]
All OS.
A DESCRIPTION OF THE PROBLEM :
the static void write_instruction(MethodImage *mi) C functions has two bugs :
at line 1428 :
case JVM_OPC_goto:
new_opcode = JVM_OPC_jsr_w;
has to be replaced by
case JVM_OPC_goto:
new_opcode = JVM_OPC_goto_w;
At line 1493 when writing the new goto offset :
writeU4(ci, new_delta); /* write new and wide delta */
must be replaced by
writeU4(ci, new_delta - 3); /* write new and wide delta */
since the correct new offset is now new_delta - 3 and not new_delta.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
One easy way to reproduce the bug is to modify the line 1282 (adjust_instruction function).
For example replace
if ((new_delta < -32768) || (new_delta > 32767)) {
by
if ((new_delta < -16) || (new_delta > 15)) {
to force call to widen() function.
REPRODUCIBILITY :
This bug can be reproduced always.
CUSTOMER SUBMITTED WORKAROUND :
See description<
- backported by
-
JDK-2133104 JAVA_CRW_DEMO: two bugs in demo\jvmti\java_crw_demo\src\java_crw_demo.c
- Resolved