8076110: VM crash when class is redefined with Instrumentation.redefineClasses

Reviewed-by: coleenp, sspitsyn
This commit is contained in:
Andreas Eriksson 2015-06-16 15:59:57 +02:00
parent a6a13b5344
commit 606468abc4
3 changed files with 146 additions and 3 deletions

View file

@ -381,6 +381,9 @@ void InstanceKlass::deallocate_contents(ClassLoaderData* loader_data) {
if (!constants()->is_shared()) {
MetadataFactory::free_metadata(loader_data, constants());
}
// Delete any cached resolution errors for the constant pool
SystemDictionary::delete_resolution_error(constants());
set_constants(NULL);
}