-
Notifications
You must be signed in to change notification settings - Fork 767
Fix crash under -Xaot: #22166
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
Fix crash under -Xaot: #22166
Conversation
When running with -Xjit: (i.e., not -Xjit but -Xjit: which has the colon followed by an empty string), the JVM prints out an error message and terminates. However, when running with -Xaot: the error message is printed out but then the JVM crashes. This happens because there is a call to codert_onload between initializing the compiler args for -Xjit and -Xaot. This commit fixes this by invoking codert_onload after initializing both -Xjit and -Xaot. This is ok because the initization does not actually process the options. Rather, it sets the value of a pointer to point to the compiler args. Thus, calling codert_onload after initializing both is safe because the initialization does not depend on any initialization that codert_onload performs. Signed-off-by: Irwin D'Souza <[email protected]>
@hzongaro could you review/merge? |
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!
I'm not sure what will happen if I run sanity.functional once with and once without aot. Giving it whirl. . . . Jenkins test sanity.functional,sanity.functional+aot all jdk8,jdk17,jdk21 |
It looks like some testing was aborted. Restarting those runs: Jenkins test sanity.functional+aot zlinux,win,win32 jdk8 |
Jenkins test sanity.functional+aot aix,plinux jdk17,jdk21 |
Jenkins test sanity.functional+aot zlinux jdk21 |
alinux and xmac failures are crashes in jfr tests, but they are run with Two of the aix failures are due to #17396 One aix failure is due to #21601 The last aix failure is
I can't find an existing issue, but given that there is no |
Thanks for investigating the failures, @dsouzai! As the failures all appear to be unrelated to this change, and the change itself appears to be relatively safe, I will go ahead and merge. |
When running with -Xjit: (i.e., not -Xjit but -Xjit: which has the colon followed by an empty string), the JVM prints out an error message and terminates. However, when running with -Xaot: the error message is printed out but then the JVM crashes. This happens because there is a call to codert_onload between initializing the compiler args for -Xjit and -Xaot.
This PR fixes this by invoking codert_onload after initializing both -Xjit and -Xaot. This is ok because the initization does not actually process the options. Rather, it sets the value of a pointer to point to the compiler args. Thus, calling codert_onload after initializing both is safe because the initialization does not depend on any initialization that codert_onload performs.
Fixes #20601