-
Notifications
You must be signed in to change notification settings - Fork 721
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
Support for CP String patching #8460
Conversation
863ad68
to
1e4f060
Compare
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.
minor nitpicks
78a62b8
to
bb94c80
Compare
@fengxue-IS i have verified that these changes work with JEP-370. can we remove the WIP and have the pull request merged? |
@babsingh can you take another look please? |
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.
lgtm. minor formatting change requested.
a97a1e1
to
7f30897
Compare
I've compiled this change locally and passed JEP370 tests (assert null not fixed yet on my local branch). @babsingh could you run the testing with the lastest JEP 370 branch please, thanks marking this as ready for formal review |
These changes yield the correct behavior. No failures seen in JEP-370 testing. Refer to #8292 (comment) for more details. |
The commit messages contain no details on what this change does. It would be helpful for readers such has myself who don't know much about what is being done here to put a description of the change. It also helps future developers looking at the commit history. |
7f30897
to
23f72fb
Compare
Added comments to the code/commit, added new null check after memory allocation. This PR replaces #8369 , the old one will be kept as a WIP draft for future references. @DanHeidinga can you please take a look |
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 looks good over all. Some very minor touchups and it'll be ready to go (assuming the builds pass =)
Jenkins test sanity zlinux jdk8,jdk14 |
@fengxue-IS Can you record the build results / links before pushing new changes to this PR? I'll be on a plane shortly and likely won't see the results in time. |
The builds passed https://ci.eclipse.org/openj9/job/PullRequest-OpenJ9/2621/ |
- New J9ClassPatchMap structure to store patching info - Update defineClassCommon code to accept J9ClassPatchMap - Patch RAM constantpool before returing class object Signed-off-by: Jack Lu <Jack.S.Lu@ibm.com>
For each patch object, apply to all matching String entries in the constantpool Signed-off-by: Jack Lu <Jack.S.Lu@ibm.com>
23f72fb
to
cd81472
Compare
Updated code as suggested by review comments. |
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.
lgtm
- Only allow String CP entries to be patched - Remove redundant VMAccess call when setting OOM exception Signed-off-by: Jack Lu <Jack.S.Lu@ibm.com>
0881059
to
99754a9
Compare
Jenkins test sanity zlinux jdk14 |
New field _patchMap needs to be initialized in all ROMClassCreationContext constructors since accessing the uninitialized field will cause unexpected behavior. Related: eclipse-openj9#8460 Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
Signed-off-by: Jack Lu Jack.S.Lu@ibm.com