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

Missing return on nullptr check #92123

Open
apach301 opened this issue May 14, 2024 · 0 comments · May be fixed by #92125
Open

Missing return on nullptr check #92123

apach301 opened this issue May 14, 2024 · 0 comments · May be fixed by #92125

Comments

@apach301
Copy link
Contributor

apach301 commented May 14, 2024

Hi,

I found possible null pointer dereference with Svace static analyzer.

A return statement is missing for nullptr check of variable DI at utils/TableGen/Common/CodeGenDAGPatterns.cpp:

if (Pat->isLeaf()) {
DefInit *DI = dyn_cast<DefInit>(Pat->getLeafValue());
if (!DI)
I.error("Input $" + Pat->getName() + " must be an identifier!");
Rec = DI->getDef();
} else {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants