Summary: Constant pool merging is not thread safe for source_file_name.

This change includes the change for the following bug because they are tested together.

8148772: VM crash in nsk/jvmti/RedefineClasses/StressRedefine: assert failed: Corrupted constant pool Summary: ConstantPool::resolve_constant_at_impl() isn't thread safe for MethodHandleInError and MethodTypeInError.

The parallel constant pool merges are mostly harmless because the old methods constant pool pointers aren't updated. The only case I found where it isn't harmless is that we rely on finding the source_file_name_index from the final merged constant pool, which could be any of the parallel merged constant pools. The code to attempt to dig out the name from redefined classes is removed.

open webrev at http://cr.openjdk.java.net/~coleenp/8151546.01/webrev
bug link https://bugs.openjdk.java.net/browse/JDK-8151546

Tested with rbt, java/lang/instrument tests, com/sun/jdi tests. I tried to write a test with all the conditions of the failure but couldn't make it fail (so noreg-hard).

Thanks,
Coleen

Reply via email to