From 75e147886d4d1d7fba25268a921d2b35b54777da Mon Sep 17 00:00:00 2001 From: sspitsyn Date: Wed, 20 May 2015 02:57:25 -0700 Subject: [PATCH] 8079644: memory stomping error with ResourceManagement and TestAgentStress.java Summary: the cached class file structure must be deallocated instead of the cached class file bytes Reviewed-by: coleenp, sla --- src/share/vm/prims/jvmtiRedefineClasses.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/share/vm/prims/jvmtiRedefineClasses.cpp b/src/share/vm/prims/jvmtiRedefineClasses.cpp index c16482616..15916a20e 100644 --- a/src/share/vm/prims/jvmtiRedefineClasses.cpp +++ b/src/share/vm/prims/jvmtiRedefineClasses.cpp @@ -3980,8 +3980,8 @@ void VM_RedefineClasses::redefine_single_class(jclass the_jclass, the_class->get_cached_class_file_bytes()) { // The same class can be present twice in the scratch classes list or there // are multiple concurrent RetransformClasses calls on different threads. - // In such cases we have to deallocate scratch_class cached_class_file_bytes. - os::free(scratch_class->get_cached_class_file_bytes()); + // In such cases we have to deallocate scratch_class cached_class_file. + os::free(scratch_class->get_cached_class_file()); } // NULL out in scratch class to not delete twice. The class to be redefined -- GitLab