During the investigation of
JDK-8200078, it was found that when a class fails to load due to OOM, GC will try to free the class and its _transitive_interfaces. The _transitive_interfaces could be shared with its super class which has been loaded successfully. When GC tries to free the class, InstanceKlass::deallocate_interfaces() mistakenly frees the _transitive_interfaces. It will cause a vm crash in visit_all_interfaces() in klassVTable.cpp when an bad intf is dereferenced.