Skip to content

[SYCL] Do not crash if no matching store found #15658

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

Merged
merged 3 commits into from
Oct 11, 2024

Conversation

LU-JOHN
Copy link
Contributor

@LU-JOHN LU-JOHN commented Oct 10, 2024

In SYCLMutatePrintfAddrspacePass, when analyzing a format pointer to printf, do not crash when analyzing backwards through load/stores if no matching store is found.

@LU-JOHN LU-JOHN requested a review from a team as a code owner October 10, 2024 17:51
Copy link
Contributor

@sarnex sarnex left a comment

Choose a reason for hiding this comment

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

please add [SYCL] to the PR title and maybe more info about the pass/case it happens

if (I!=std::end(Users)) {
auto *Store = cast<StoreInst>(*I);
MemoryAccess = Store->getValueOperand();
}
}
return MemoryAccess->stripPointerCastsAndAliases();
Copy link
Contributor

Choose a reason for hiding this comment

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

could we hit a similar problem here?

Copy link
Contributor Author

@LU-JOHN LU-JOHN Oct 10, 2024

Choose a reason for hiding this comment

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

I don't think it's possible to have a problem. A store must have a value. SpecConstants.cpp has similar code:
V = Store->getValueOperand()->stripPointerCasts();

Copy link
Contributor

Choose a reason for hiding this comment

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

ah ok yeah i see, thanks

Signed-off-by: Lu, John <[email protected]>
@LU-JOHN LU-JOHN changed the title Do not crash if no matching store found [SYCL] Do not crash if no matching store found Oct 10, 2024
Signed-off-by: Lu, John <[email protected]>
@sarnex sarnex merged commit b039ffa into intel:sycl Oct 11, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants