Stream: git-wasmtime

Topic: wasmtime / PR #7478 Reset sp_offset when resetting stack ...


view this post on Zulip Wasmtime GitHub notifications bot (Nov 03 2023 at 19:30):

jeffcharles opened PR #7478 from jeffcharles:winch-unreachable-reset-sp-offset to bytecodealliance:main:

<!--
Please make sure you include the following information:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
This is a fix for a fuzzer testcase triggering an assertion of sp_offset not equaling locals_size where there was a function which had spilled a local and ended with unreachable. I've added a minimal reproduction of the test case as the filetest with_spilled_local.wat. While investigating, it looks like something similar happens when unreachable is the last instruction in an if followed by an else (covered by the other filetest added). Having reset_stack also reset the sp_offset clears up both assertion failures.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 03 2023 at 19:30):

jeffcharles requested elliottt for a review on PR #7478.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 03 2023 at 19:30):

jeffcharles requested wasmtime-compiler-reviewers for a review on PR #7478.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 03 2023 at 20:37):

saulecabrera submitted PR review:

I left a minor comment the regarding an invariant that we should verify. After fixing it, we can land this.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 03 2023 at 20:37):

saulecabrera submitted PR review:

I left a minor comment the regarding an invariant that we should verify. After fixing it, we can land this.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 03 2023 at 20:37):

saulecabrera created PR review comment:

Can we also assert that masm.sp_offset() - target_sp equals the size of all the Memory entries in the value stack that got dropped?

view this post on Zulip Wasmtime GitHub notifications bot (Nov 03 2023 at 20:47):

jeffcharles updated PR #7478.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 03 2023 at 21:18):

jeffcharles requested saulecabrera for a review on PR #7478.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 03 2023 at 21:26):

saulecabrera submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 03 2023 at 22:12):

saulecabrera merged PR #7478.


Last updated: Nov 22 2024 at 17:03 UTC