-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 a panic in table-ops translation #2350
Conversation
I'm a bit curious why the fuzzers haven't found this one yet, @fitzgen do you know if |
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.
wasm-smith
definitely should be able to generate if; else; end
sequences. It might be somewhat low probability, since all of the following need to happen:
- We need to choose to generate a stack neutral
if
control frame (1 out of 400 chance to generate a stack neutral type; not sure on probability to generate anyif
in the program at all) - We need to immediately choose an
else
instruction (1 out of ~250 or so; not sure how many instructions we support these days) - We need to then immediately choose and
end
instruction (1 out of ~250 again)
so that's a 1 out of ~25,000,000 chance, ignoring running up against the entropy limit. Which seems like reasonable odds to hit fairly quickly, given that our fuzzers are running continuously...
So in conclusion: I'm not sure what's up, and I would have expected this to have been triggered earlier.
(Updated comment due to accidental early submit) |
I think you need to split the new test file into one file for each module, which is why the tests are failing I think. |
This fixes an issue where `ensure_inserted_block()` wasn't called before we do some block manipulation in the Wasmtime translation of some table-related instructions. It looks like `ensure_inserted_block()` is otherwise called on most instructions being added, so we just need to call it explicitly it seems here. Closes bytecodealliance#2347
66b1c89
to
77835ce
Compare
Bah I needed to touch |
This fixes an issue where `ensure_inserted_block()` wasn't called before we do some block manipulation in the Wasmtime translation of some table-related instructions. It looks like `ensure_inserted_block()` is otherwise called on most instructions being added, so we just need to call it explicitly it seems here. Closes #2347
This fixes an issue where
ensure_inserted_block()
wasn't called beforewe do some block manipulation in the Wasmtime translation of some
table-related instructions. It looks like
ensure_inserted_block()
isotherwise called on most instructions being added, so we just need to
call it explicitly it seems here.
Closes #2347