[Verifier] Fix the field access issue with putfield/getfield - #18440
Merged
gacholio merged 1 commit intoNov 12, 2023
Merged
Conversation
Author
|
The idea is: for an instance initialization method of the subclass, the access to the superclass's fields must be delayed till the superclass's initialization is finished; otherwise, the fields must belong to the subclass. The correct output (matching the RI's output at #16524 (comment)) is as follows: |
Author
|
The PR is verified in internal & external builds (Java 8, 11, 17, 21, and beyond). Reviewer: @gacholio |
gacholio
reviewed
Nov 10, 2023
gacholio
reviewed
Nov 10, 2023
gacholio
reviewed
Nov 10, 2023
gacholio
reviewed
Nov 10, 2023
gacholio
reviewed
Nov 10, 2023
ChengJin01
force-pushed
the
bcv_fix_field_access_putfield_initialization
branch
from
November 10, 2023 19:59
8c9de2a to
2d5bf3b
Compare
The changes aim to capture the corner case when the specified field doesn't exist in the current class or it is intentionally accessed by a hostile subclass prior to its superclass's initialization when it belongs to one of the superclasses. Related: eclipse-openj9#16524 Signed-off-by: ChengJin01 <jincheng@ca.ibm.com>
ChengJin01
force-pushed
the
bcv_fix_field_access_putfield_initialization
branch
from
November 10, 2023 20:35
2d5bf3b to
e241c4d
Compare
gacholio
approved these changes
Nov 11, 2023
Contributor
|
jenkins test sanity win jdk21 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The changes aim to capture the corner case when
the specified field doesn't exist in the current
class or it is intentionally accessed by a hostile
subclass prior to its superclass's initialization
when it belongs to one of the superclasses.
Related: #16524
Signed-off-by: ChengJin01 jincheng@ca.ibm.com