# HG changeset patch # User coleenp # Date 1367934375 14400 # Node ID 98206e5df09eb70983875b4268abc897c66529e6 # Parent eb7a22d26c532690f00a5bb8d6938bb47606fb68 8013063: nsk/jvmti/RetransformClasses/retransform001 failed debug version on os::free Summary: Clear out class_file_bytes so they aren't deallocated twice Reviewed-by: dcubed, sspitsyn diff -r eb7a22d26c53 -r 98206e5df09e hotspot/src/share/vm/prims/jvmtiRedefineClasses.cpp --- a/hotspot/src/share/vm/prims/jvmtiRedefineClasses.cpp Tue May 07 01:25:21 2013 +0200 +++ b/hotspot/src/share/vm/prims/jvmtiRedefineClasses.cpp Tue May 07 09:46:15 2013 -0400 @@ -3366,6 +3366,10 @@ } #endif + // NULL out in scratch class to not delete twice. The class to be redefined + // always owns these bytes. + scratch_class->set_cached_class_file(NULL, 0); + // Replace inner_classes Array* old_inner_classes = the_class->inner_classes(); the_class->set_inner_classes(scratch_class->inner_classes());