Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8337548: Dumping static archive passes is_superclass true for interfaces #22309

Closed
wants to merge 1 commit into from

Conversation

coleenp
Copy link
Contributor

@coleenp coleenp commented Nov 21, 2024

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).


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8337548: Dumping static archive passes is_superclass true for interfaces (Bug - P4)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/22309/head:pull/22309
$ git checkout pull/22309

Update a local copy of the PR:
$ git checkout pull/22309
$ git pull https://git.openjdk.org/jdk.git pull/22309/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 22309

View PR using the GUI difftool:
$ git pr show -t 22309

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/22309.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 21, 2024

👋 Welcome back coleenp! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Nov 21, 2024

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk openjdk bot added the rfr Pull request is ready for review label Nov 21, 2024
@openjdk
Copy link

openjdk bot commented Nov 21, 2024

@coleenp The following label will be automatically applied to this pull request:

  • hotspot-runtime

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the hotspot-runtime hotspot-runtime-dev@openjdk.org label Nov 21, 2024
@mlbridge
Copy link

mlbridge bot commented Nov 21, 2024

Webrevs

Copy link
Member

@dholmes-ora dholmes-ora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't quite figure out who the top caller is that actually knows whether superclassname is a class or interface???

@coleenp
Copy link
Contributor Author

coleenp commented Nov 22, 2024

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.

@coleenp coleenp closed this Nov 22, 2024
@coleenp coleenp deleted the is-superclass branch November 22, 2024 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot-runtime hotspot-runtime-dev@openjdk.org rfr Pull request is ready for review
Development

Successfully merging this pull request may close these issues.

2 participants