Skip to content
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

(v0.14.2) Declare J9RAMVirtualMethodRef methodIndexAndArgCount as volatile #5734

Merged

Conversation

JasonFengJ9
Copy link
Member

Declare J9RAMVirtualMethodRef methodIndexAndArgCount as volatile

Declaring J9RAMVirtualMethodRef.methodIndexAndArgCount as volatile instructs the compiler to generate assembly code that writes to the field atomically.
This fixes the segment error due to zero methodIndex which seems due to separated writes to the field, first one is argCount, and the second one is methodIndex.
In addition, the field J9RAMVirtualMethodRef.method is declared as volatile as well.

More background info is at #4778 (comment)

Backported from #5694

Reviewer: @pshipton

Signed-off-by: Jason Feng fengj@ca.ibm.com

Declaring J9RAMVirtualMethodRef.methodIndexAndArgCount as volatile
instructs the compiler to generate assembly code that writes to the
field atomically.
This fixes the segment error due to zero methodIndex which seems due to
separated writes to the field, first one is argCount, and the second one
is methodIndex.
In addition, the field J9RAMVirtualMethodRef.method is declared as
volatile as well.

Signed-off-by: Jason Feng <fengj@ca.ibm.com>
@pshipton pshipton changed the title Declare J9RAMVirtualMethodRef methodIndexAndArgCount as volatile (v0.14.2) Declare J9RAMVirtualMethodRef methodIndexAndArgCount as volatile May 11, 2019
@pshipton pshipton merged commit 4642c2b into eclipse-openj9:v0.14.2-release May 13, 2019
@JasonFengJ9 JasonFengJ9 deleted the backport-pr5694 branch May 23, 2019 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants