-
Notifications
You must be signed in to change notification settings - Fork 151
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
Check return values from FindNode for null pointers #228
Check return values from FindNode for null pointers #228
Conversation
4046b5d
to
dd620ad
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall, just one small change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not a valid SPIR-V if using spirv-val
seems it has GLSL.std.453
after I see
%21 = OpAccessChain %20 %_ %19
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, this is invalid, I included it specifically as a regression test since it triggers the null pointer dereference. I suspect any SPIR-V that triggers the error will be invalid, since it requires a reference to a node that doesn't exist.
This SPIR-V file is the one that was included in the original report of this issue; I suspect the reporter generated it using a fuzzer. I can try to clean it up more if you think that would be better.
I mention the issues with this file in README.md
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is fair
@chaoticbob what did you want me to change? I don't think it's showing up for me. |
One of the comments was to add parens around the right hand side of a logical expressions. |
Okay, fixed that. Anything else? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Fixes #227