-
Notifications
You must be signed in to change notification settings - Fork 793
Check for unreachable in Select::finalize(Type)
#6389
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
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Unfortunately I no longer have the test case the fuzzer produced, but hopefully this is straightforward enough to land anyway. |
Previously selects finalized with explicit types would never be marked unreachable, even when they should have been.
f77328a
to
5e68848
Compare
src/wasm/wasm.cpp
Outdated
void Select::finalize(Type type_) { type = type_; } | ||
void Select::finalize(Type type_) { | ||
assert(ifTrue && ifFalse); | ||
if (ifTrue->type == Type::unreachable || ifFalse->type == Type::unreachable) { |
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.
I think this should also include the condition?
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.
Oh right 😅
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 with that.
Previously selects finalized with explicit types would never be marked
unreachable, even when they should have been.