Stream: git-wasmtime

Topic: wasmtime / PR #9087 wasmtime: Refactor trap-handling


view this post on Zulip Wasmtime GitHub notifications bot (Aug 07 2024 at 20:42):

jameysharp requested elliottt for a review on PR #9087.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 07 2024 at 20:42):

jameysharp requested wasmtime-core-reviewers for a review on PR #9087.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 07 2024 at 20:42):

jameysharp opened PR #9087 from jameysharp:trap-regs to bytecodealliance:main:

This commit groups together the registers that have to be collected from a signal handler to correctly report a trap: namely, the program counter and frame pointer, as of the time that the trap occurred.

I also moved the call to set_jit_trap inside test_if_trap for every platform that uses both methods. Only the implementation for Mach ports still needs to call set_jit_trap because it doesn't use test_if_trap.

In addition I'm fixing an unrelated doc comment that I stumbled across while working on this.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 07 2024 at 22:02):

elliottt submitted PR review:

Looks good to me!

view this post on Zulip Wasmtime GitHub notifications bot (Aug 07 2024 at 22:02):

elliottt created PR review comment:

What do you think about removing the .. to require this match to be re-examined if the TrapRegisters type changes?

view this post on Zulip Wasmtime GitHub notifications bot (Aug 07 2024 at 22:02):

elliottt submitted PR review:

Looks good to me!

view this post on Zulip Wasmtime GitHub notifications bot (Aug 07 2024 at 22:23):

jameysharp submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 07 2024 at 22:23):

jameysharp created PR review comment:

I absolutely agree it's worth thinking about. My next PR specifically will add a field to this struct :laughing: but this function won't need to look at it. I think it actually makes sense when pattern matching in this particular case to declare "I only care about these registers" even if more get collected later: these two are the ones we need for a backtrace or coredump.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 07 2024 at 22:38):

jameysharp merged PR #9087.


Last updated: Nov 22 2024 at 16:03 UTC