jameysharp requested elliottt for a review on PR #9087.
jameysharp requested wasmtime-core-reviewers for a review on PR #9087.
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.
elliottt submitted PR review:
Looks good to me!
elliottt created PR review comment:
What do you think about removing the
..
to require this match to be re-examined if theTrapRegisters
type changes?
elliottt submitted PR review:
Looks good to me!
jameysharp submitted PR review.
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.
jameysharp merged PR #9087.
Last updated: Dec 23 2024 at 12:05 UTC