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.
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
ifcontrol frame (1 out of 400 chance to generate a stack neutral type; not sure on probability to generate anyifin the program at all) - We need to immediately choose an
elseinstruction (1 out of ~250 or so; not sure how many instructions we support these days) - We need to then immediately choose and
endinstruction (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