afonso360 opened PR #6156 from afonso360:interp-call-trap
to bytecodealliance:main
:
:wave: Hey,
Fuzzgen found a bug in the interpreter (#6155) where if a function called another function and the child function trapped, the interpreter was panicking instead of propagating the trap correctly.
This PR fixes that by propagating the trap up instead of panicking.
Fixes: #6155
afonso360 requested cfallin for a review on PR #6156.
afonso360 requested wasmtime-compiler-reviewers for a review on PR #6156.
afonso360 updated PR #6156.
afonso360 edited PR #6156:
:wave: Hey,
Fuzzgen found a bug in the interpreter (#6155) where if a function called another function and the child function trapped, the interpreter was panicking instead of propagating the trap correctly.
This PR fixes that by propagating the trap up instead of panicking.
Fixes: #6155
bjorn3 submitted PR review.
bjorn3 created PR review comment:
Maybe remove the
unwrap_return
method to avoid this footgun for others?
afonso360 submitted PR review.
afonso360 created PR review comment:
We use it a lot in the rest of the tests so it still has some use. But I'll add a
cfg(test)
afonso360 updated PR #6156.
bjorn3 submitted PR review.
bjorn3 created PR review comment:
The tests can wrap the expected return value in
ControlFlow::Return
I think if they avoidunwrap_return
.
afonso360 edited PR review comment.
cfallin submitted PR review.
cfallin has enabled auto merge for PR #6156.
afonso360 submitted PR review.
afonso360 created PR review comment:
ControlFlow
doesen't implementPartialEq
so we can't just do something likeassert_eq!(ControlFlow::Return(vec![...]), rets)
It doesn't implement PartialEq because it has some function pointers in some of the arms.
afonso360 edited PR review comment.
cfallin merged PR #6156.
Last updated: Dec 23 2024 at 12:05 UTC