-
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
8265796: vmTestbase/nsk/jdi/ObjectReference/referringObjects/referringObjects002/referringObjects002.java fails when running with JEP 416 #6402
Conversation
👋 Welcome back lmesnik! A progress list of the required criteria for merging this PR into |
Webrevs
|
...tbase/nsk/jdi/ObjectReference/referringObjects/referringObjects002/referringObjects002a.java
Show resolved
Hide resolved
...stbase/nsk/jdi/ObjectReference/referringObjects/referringObjects002/referringObjects002.java
Outdated
Show resolved
Hide resolved
@lmesnik 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 |
Hi Leonid, Where is the reflective call that you are referring to? I'm wondering why the MH based reflection holds a reference where the previous reflection implementation would not? And whether this is an unintended change in behaviour for core reflection. Thanks, |
@lmesnik I also have the same question as David asks. If the reference is held via the MethodType, is TestClass1 part of the signature of the reflective call? |
The reference is held via MethodType. Debugee loads TestedClass1 using reflection. |
I think the test calls The old implementation has one reference from @lmesnik does the debugger show MemberName::clazz? |
The debugger doesn't show MemberName::clazz, but I could see it in heapdump. It seems because it doesn't have GC root and should be here by JDI spec. |
I believe the Constructor object is already GC'ed. This weak entry should be GC'ed in the subsequent GC cycles and only when |
The triggering GC is enough to clean references. I've updated the test to force GC so we don't have this reference when checking referringObjects(long). |
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 okay to me. Chris should re-review as I'm not close to the jdi tests.
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.
@lmesnik this pull request can not be integrated into git checkout 8265796
git fetch https://git.openjdk.java.net/jdk master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push |
/integrate |
Going to push as commit 7cb56a2. |
The nsk.share.jdi.TestClass1 is used via reflection. The reflective call creates MethodHandle and one more reference to TestClass1. So the number of expected references should be incremented. Thanks to @plummercj and @mlchung for the investigation.
This fix also prints references to inspected class.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/6402/head:pull/6402
$ git checkout pull/6402
Update a local copy of the PR:
$ git checkout pull/6402
$ git pull https://git.openjdk.java.net/jdk pull/6402/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 6402
View PR using the GUI difftool:
$ git pr show -t 6402
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/6402.diff