RFR: 8337548: Dumping static archive passes is_superclass true for interfaces
Coleen Phillimore
coleenp at openjdk.org
Fri Nov 22 14:27:23 UTC 2024
On Thu, 21 Nov 2024 21:36:09 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
> Save the setting of is_superclass in the DETECT_CIRCULARITY placeholder entry with the class name in case handle_parallel_super_load is needed. This corrects the is_superclass parameter passed to resolve_with_circularity_detection, which is then used by CDS code.
>
> Tested with tier1-7 (in progress).
The top callers are from classFileParser: resolve_super_or_fail which calls resolve_with_circularity_detection and passes true/false whether it's calling it for a super or interface.
There's also a path in load_shared_class -> check_shared_super_type that calls resolve_with_circularity_detection, but this is for runtime CDS (UseSharedSpaces) so doesn't get to SystemDictionaryShared::lookup_super_for_unregistered_class(), which has the bug.
This latter function is going to be needed to be completely rewritten for loadableConstants in Valhalla, since we may be calling resolve_with_circularity_detection for an inline field declaration in a class, needing to check for CCE in this case also. This will also be wrong in this CDS code.
I think a better approach might be to remove this is_superclass parameter completely and rewrite the CDS code, which I was initially imagining when I filed this bug. I'm going to withdraw this PR.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/22309#issuecomment-2493882021
More information about the hotspot-runtime-dev
mailing list