openj9
openj9 copied to clipboard
Ensure deserializer class invalidation is complete
When a class is redefined, the old, invalidated RAM methods may be held in the "oldClass" or the "newClass", depending on whether or not the class was redefined in-place. To ensure that all the old RAM methods from the redefined class are purged from the JITServer AOT deserializer's caches, and to avoid having to detect the type of redefinition, both the old and new classes are now invalidated.
The incomplete invalidation of classes is not currently a problem, as the only place the deserializer's method cache is queried for a stored RAM method during relocation happens to be reachable only if the defining class has not been invalidated. This change avoids a possible bug that would arise if this were ever not the case.