-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
8263434: Dangling references after MethodComparator::methods_EMCP #2937
8263434: Dangling references after MethodComparator::methods_EMCP #2937
Conversation
👋 Welcome back shade! A progress list of the required criteria for merging this PR into |
Webrevs
|
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.
This is much cleaner! Thank you, and thank you SonarCloud.
@shipilev 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 no new commits pushed to the ➡️ To integrate this PR with the above commit message to the |
/label add serviceability-dev |
@coleenp |
/reviewers 2 |
@shipilev |
Please make sure that you get a review from someone on the Serviceability team. |
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.
Aleksey,
Sorry for being late to the party.
This looks good to me.
One nit: unneeded extra '()' what came from the original code:
if ((old_cp->klass_at_noresolve(cpi_old) != new_cp->klass_at_noresolve(cpi_new)))
Thanks,
Serguei
Sure, updated. Also updated copyrights. |
/integrate |
@shipilev Since your change was applied there have been 5 commits pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit f9f2eef. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
SonarCloud reports the following problem in MethodComparator::methods_EMCP:
"Address of stack memory associated with local variable 's_new' is still referred to by the global variable '_s_new' upon returning to the caller. This will be a dangling reference"
Code inspection reveals the assignment to static variables is only needed to pass them to helper methods. So, while this is not a detectable bug (yet), it is still cleaner not to expose stack variables in globals.
Additional testing:
tier1
vmTestbase_nsk_jvmti
Progress
Issue
Reviewers
Download
$ git fetch https://git.openjdk.java.net/jdk pull/2937/head:pull/2937
$ git checkout pull/2937