Stream: git-wasmtime

Topic: wasmtime / PR #9420 Change stack walking to stop at a pr...


view this post on Zulip Wasmtime GitHub notifications bot (Oct 09 2024 at 16:39):

alexcrichton assigned fitzgen to PR #9420.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 09 2024 at 16:39):

alexcrichton requested fitzgen for a review on PR #9420.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 09 2024 at 16:39):

alexcrichton opened PR #9420 from alexcrichton:stop-backtrace-with-fp to bytecodealliance:main (assigned to fitzgen):

Prior to this commit entry trampolines into wasm would record their
stack pointer at the time of the function call to wasm and then this
stack pointer was used to halt the stack walking process. The problem
with this though is that due to the tail ABI it's possible that the
callee will update the caller's stack pointer temporarily. This means
that the recorded stack pointer at the time the trampoline called wasm
may differ from the callee's idea of what the stack pointer is when a
backtrace happens.

To handle this condition when stack walking the frame pointer instead of
the stack pointer is now recorded when wasm is invoked. This frame
pointer is a trusted value as it's managed by Cranelift itself. This
additionally enables the stop condition for frame walking to be a
precise "it must be this value" condition.

Put together this commit fixes an issue where when return_call is used
it's possible for the initial few frames of the stack to get lost in
stack traces. After this the frame pointer chain should always be
precisely walked in its entirety, even in the face of different numbers
of arguments and parameters as return_call instructions are executed.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 09 2024 at 16:39):

alexcrichton requested wasmtime-fuzz-reviewers for a review on PR #9420.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 09 2024 at 16:39):

alexcrichton requested wasmtime-core-reviewers for a review on PR #9420.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 09 2024 at 18:46):

github-actions[bot] commented on PR #9420:

Subscribe to Label Action

cc @fitzgen

<details>
This issue or pull request has been labeled: "fuzzing", "wasmtime:api"

Thus the following users have been cc'd because of the following labels:

To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.

Learn more.
</details>

view this post on Zulip Wasmtime GitHub notifications bot (Oct 09 2024 at 18:53):

fitzgen submitted PR review:

Very nice clean up

view this post on Zulip Wasmtime GitHub notifications bot (Oct 09 2024 at 19:12):

fitzgen merged PR #9420.


Last updated: Dec 23 2024 at 13:07 UTC