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
8267347: CDS record_linking_constraint asserts with unregistered class #4147
8267347: CDS record_linking_constraint asserts with unregistered class #4147
Conversation
|
c5b62ce
to
ee9a22f
Compare
Webrevs
|
String topArchiveName = getNewArchiveName(); | ||
String testCase = Integer.toString(i); | ||
String cmdLine[] = new String[] { | ||
"-cp", appJar, | ||
"--add-modules", | ||
"--add-modules", |
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.
Here is not aligned with below.
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.
Fixed.
@iklam This change now passes all automated pre-integration checks. 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 no new commits pushed to the
|
httpHandlerClass, | ||
httpExchangeClass, | ||
Asserts.class.getName(), |
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.
Why other class names don't need to do replace(".", "/")
?
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.
The problem is that the classlist requires the slash separator. I.e., com/sun/net/httpserver/HttpHandler
must be used. In contrast, ClassFileInstaller.writeJar()
allows both jdk.test.lib.Asserts
and jdk/test/lib/Asserts
. Since the Asserts
class is used only by ClassFileInstaller
, I left it as is.
To make it easier to write test cases, I have filed https://bugs.openjdk.java.net/browse/JDK-8267624 "CDS classlist should allow both . and / in class names"
|
||
|
||
// This is a handy class for running an application inside a custom class loader. This | ||
// is used for testing CDS handling of unregistered classes (i.e., archved classes loaded |
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.
Typo: archved -> archived
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.
Fixed.
Thanks to @calvinccheung and @yminqi for the review. |
@iklam Since your change was applied there has been 1 commit pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit 209769b. |
In CDS terms, "Unregistered classes" are the archived classes that should be loaded by custom class loaders during runtime. Archiving of class loader constraints (JDK-8178349) should be disabled for such classes.
During CDS dump time (-Xshare:dump), unregistered classes are loaded by the boot loader (see also JDK-8261941).
SystemDictionaryShared::record_linking_constraint
doesn't properly recognize such classes, leading to the assert.Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/4147/head:pull/4147
$ git checkout pull/4147
Update a local copy of the PR:
$ git checkout pull/4147
$ git pull https://git.openjdk.java.net/jdk pull/4147/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 4147
View PR using the GUI difftool:
$ git pr show -t 4147
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/4147.diff