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

Fix for missing NULLCHK in Unsafe atomics #3036

Merged
merged 1 commit into from
Sep 27, 2018

Conversation

0dvictor
Copy link
Contributor

NULLCHK on receiver is missing when transforming Unsafe.getAndAdd/Set.
Fixing it.

Signed-off-by: Victor Ding [email protected]

NULLCHK on receiver is missing when transforming Unsafe.getAndAdd/Set.
Fixing it.

Signed-off-by: Victor Ding <[email protected]>
@andrewcraik
Copy link
Contributor

Jenkins test sanity xlinux,win jdk8,jdk11

if (treetop->getNode()->getOpCodeValue() == TR::NULLCHK)
{
auto nullchk = comp()->getSymRefTab()->findOrCreateNullCheckSymbolRef(comp()->getMethodSymbol());
treetop->insertBefore(TR::TreeTop::create(comp(), TR::Node::createWithSymRef(TR::NULLCHK, 1, 1, TR::Node::create(node, TR::PassThrough, 1, node->getChild(0)), nullchk)));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need bc info?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not in this case. TR::Node::createWithSymRef copies bc info from its child.

Copy link
Contributor

@andrewcraik andrewcraik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@andrewcraik andrewcraik merged commit a9a160d into eclipse-openj9:master Sep 27, 2018
@0dvictor 0dvictor deleted the nullchk branch September 27, 2018 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants