-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8296433: Encountered null CLD while loading shared lambda proxy class #11031
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
8296433: Encountered null CLD while loading shared lambda proxy class #11031
Conversation
|
/label add hotspot-runtime |
|
👋 Welcome back ccheung! A progress list of the required criteria for merging this PR into |
|
@calvinccheung |
iklam
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
I think the reason that we've never crashed is because we return at line 431:
jdk/src/hotspot/share/classfile/classLoaderData.cpp
Lines 420 to 432 in 1169dc0
| void ClassLoaderData::record_dependency(const Klass* k) { | |
| assert(k != NULL, "invariant"); | |
| ClassLoaderData * const from_cld = this; | |
| ClassLoaderData * const to_cld = k->class_loader_data(); | |
| // Do not need to record dependency if the dependency is to a class whose | |
| // class loader data is never freed. (i.e. the dependency's class loader | |
| // is one of the three builtin class loaders and the dependency's class | |
| // loader data has a ClassLoader holder, not a Class holder.) | |
| if (to_cld->is_permanent_class_loader_data()) { | |
| return; | |
| } |
CDS only supports lambda proxy classes for the built-in loaders. So when we call ClassLoaderData::record_dependency with a NULL this, the this pointer is never dereferenced (at least for our current C++ compilers).
Anyway, passing a NULL this is undefined behavior, so it's good to get rid of it.
|
@calvinccheung This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be: You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 5 new commits pushed to the
Please see this link for an up-to-date comparison between the source branch of this pull request and the ➡️ To integrate this PR with the above commit message to the |
dholmes-ora
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Thanks
|
Thanks Ioi and David. /integrate |
|
Going to push as commit d04d656.
Your commit was automatically rebased without conflicts. |
|
@calvinccheung Pushed as commit d04d656. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Please review this simple fix for calling
load_shared_class(), which initializesclass_loader_dataprior toset_nest_host()inSystemDictionary::load_shared_lambda_proxy_class(). Otherwise, a nullclass_loader_datawould be encountered inset_nest_host(); it would fail the added assertion inset_nest_host().Passed tiers 1 and 2 testing on Oracle supported platforms.
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/11031/head:pull/11031$ git checkout pull/11031Update a local copy of the PR:
$ git checkout pull/11031$ git pull https://git.openjdk.org/jdk pull/11031/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 11031View PR using the GUI difftool:
$ git pr show -t 11031Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/11031.diff