-
Bug
-
Resolution: Fixed
-
P3
-
None
-
b26
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8011816 | 8 | Coleen Phillimore | P3 | Resolved | Fixed | b87 |
I get a crash when redefining a class and adding some basic instrumentation. Running with a debug build I see that the problem is when trying to get the length of the method annotations:
#0 0x00007ffff6ccdc66 in Array<unsigned char>::length (this=0x0) at main/src/share/vm/utilities/array.hpp:342
#1 0x00007ffff7312604 in ConstMethod::method_annotations_length (this=0x7ffff4465bc0)
at main/src/share/vm/oops/constMethod.hpp:431
#2 0x00007ffff730f47f in Method::clone_with_new_data (m=..., new_code=0x7ffff01ed0e8 "\023\001\224\023\003e\270\003_\262\002\277\231",
new_code_length=112, new_compressed_linenumber_table=0x7ffff01ed238 "\377", new_compressed_linenumber_size=15, __the_thread__=0x7ffff000e000)
at main/src/share/vm/oops/method.cpp:1086
#3 0x00007ffff740a060 in Relocator::insert_space_at (this=0x7ffff7fd4ad0, bci=25, size=3, inst_buffer=0x7ffff7fd4c10 "\023\001\214\367,",
__the_thread__=0x7ffff000e000) at main/src/share/vm/runtime/relocator.cpp:163
#4 0x00007ffff721f200 in VM_RedefineClasses::rewrite_cp_refs_in_method (this=0x7ffff7fd5370, method=..., new_method_p=0x7ffff7fd4c70,
__the_thread__=0x7ffff000e000) at main/src/share/vm/prims/jvmtiRedefineClasses.cpp:1503
#5 0x00007ffff721ed1f in VM_RedefineClasses::rewrite_cp_refs_in_methods (this=0x7ffff7fd5370, scratch_class=..., __the_thread__=0x7ffff000e000)
at main/src/share/vm/prims/jvmtiRedefineClasses.cpp:1419
#6 0x00007ffff721eb75 in VM_RedefineClasses::rewrite_cp_refs (this=0x7ffff7fd5370, scratch_class=..., __the_thread__=0x7ffff000e000)
at main/src/share/vm/prims/jvmtiRedefineClasses.cpp:1363
#7 0x00007ffff721ea5b in VM_RedefineClasses::merge_cp_and_rewrite (this=0x7ffff7fd5370, the_class=..., scratch_class=..., __the_thread__=0x7ffff000e000)
at main/src/share/vm/prims/jvmtiRedefineClasses.cpp:1340
#8 0x00007ffff721d50d in VM_RedefineClasses::load_new_class_versions (this=0x7ffff7fd5370, __the_thread__=0x7ffff000e000)
at main/src/share/vm/prims/jvmtiRedefineClasses.cpp:943
#9 0x00007ffff721a7f7 in VM_RedefineClasses::doit_prologue (this=0x7ffff7fd5370)
at main/src/share/vm/prims/jvmtiRedefineClasses.cpp:98
#10 0x00007ffff754d56b in VMThread::execute (op=0x7ffff7fd5370) at main/src/share/vm/runtime/vmThread.cpp:580
#11 0x00007ffff71f7022 in JvmtiEnv::RetransformClasses (this=0x7ffff0005a88, class_count=1, classes=0x7ffff025acb8)
at main/src/share/vm/prims/jvmtiEnv.cpp:280
#12 0x00007ffff71b441c in jvmti_RetransformClasses (env=0x7ffff0005a90, class_count=1, classes=0x7ffff025acb8)
at ../generated/jvmtifiles/jvmtiEnter.cpp:3829
#13 0x00007ffff5612020 in retransformClasses () from jdk1.8.0-b65/jre/lib/amd64/libinstrument.so
#14 0x00007fffed02378d in ?? ()
Meaning the has_method_annotations flag has been set, but the method_annotations are not (yet) set.
#0 0x00007ffff6ccdc66 in Array<unsigned char>::length (this=0x0) at main/src/share/vm/utilities/array.hpp:342
#1 0x00007ffff7312604 in ConstMethod::method_annotations_length (this=0x7ffff4465bc0)
at main/src/share/vm/oops/constMethod.hpp:431
#2 0x00007ffff730f47f in Method::clone_with_new_data (m=..., new_code=0x7ffff01ed0e8 "\023\001\224\023\003e\270\003_\262\002\277\231",
new_code_length=112, new_compressed_linenumber_table=0x7ffff01ed238 "\377", new_compressed_linenumber_size=15, __the_thread__=0x7ffff000e000)
at main/src/share/vm/oops/method.cpp:1086
#3 0x00007ffff740a060 in Relocator::insert_space_at (this=0x7ffff7fd4ad0, bci=25, size=3, inst_buffer=0x7ffff7fd4c10 "\023\001\214\367,",
__the_thread__=0x7ffff000e000) at main/src/share/vm/runtime/relocator.cpp:163
#4 0x00007ffff721f200 in VM_RedefineClasses::rewrite_cp_refs_in_method (this=0x7ffff7fd5370, method=..., new_method_p=0x7ffff7fd4c70,
__the_thread__=0x7ffff000e000) at main/src/share/vm/prims/jvmtiRedefineClasses.cpp:1503
#5 0x00007ffff721ed1f in VM_RedefineClasses::rewrite_cp_refs_in_methods (this=0x7ffff7fd5370, scratch_class=..., __the_thread__=0x7ffff000e000)
at main/src/share/vm/prims/jvmtiRedefineClasses.cpp:1419
#6 0x00007ffff721eb75 in VM_RedefineClasses::rewrite_cp_refs (this=0x7ffff7fd5370, scratch_class=..., __the_thread__=0x7ffff000e000)
at main/src/share/vm/prims/jvmtiRedefineClasses.cpp:1363
#7 0x00007ffff721ea5b in VM_RedefineClasses::merge_cp_and_rewrite (this=0x7ffff7fd5370, the_class=..., scratch_class=..., __the_thread__=0x7ffff000e000)
at main/src/share/vm/prims/jvmtiRedefineClasses.cpp:1340
#8 0x00007ffff721d50d in VM_RedefineClasses::load_new_class_versions (this=0x7ffff7fd5370, __the_thread__=0x7ffff000e000)
at main/src/share/vm/prims/jvmtiRedefineClasses.cpp:943
#9 0x00007ffff721a7f7 in VM_RedefineClasses::doit_prologue (this=0x7ffff7fd5370)
at main/src/share/vm/prims/jvmtiRedefineClasses.cpp:98
#10 0x00007ffff754d56b in VMThread::execute (op=0x7ffff7fd5370) at main/src/share/vm/runtime/vmThread.cpp:580
#11 0x00007ffff71f7022 in JvmtiEnv::RetransformClasses (this=0x7ffff0005a88, class_count=1, classes=0x7ffff025acb8)
at main/src/share/vm/prims/jvmtiEnv.cpp:280
#12 0x00007ffff71b441c in jvmti_RetransformClasses (env=0x7ffff0005a90, class_count=1, classes=0x7ffff025acb8)
at ../generated/jvmtifiles/jvmtiEnter.cpp:3829
#13 0x00007ffff5612020 in retransformClasses () from jdk1.8.0-b65/jre/lib/amd64/libinstrument.so
#14 0x00007fffed02378d in ?? ()
Meaning the has_method_annotations flag has been set, but the method_annotations are not (yet) set.
- backported by
-
JDK-8011816 Crash when redefining class with annotated method
-
- Resolved
-
- relates to
-
JDK-8019632 Method parameters are not copied in clone_with_new_data
-
- Closed
-
-
JDK-8007320 NPG: move method annotations
-
- Closed
-