cfallin opened PR #14654 from cfallin:fix-debug-handler-panic to bytecodealliance:main:
If the debugger handles a hostcall-error debug event by panicking, that panic currently happens within the
raise()libcall, which itself must not panic (because previously, it never ran user host code). A panic in that context would abort the process (because it would happen in anextern "C"function).This PR wraps the debug event handler invocation in a
catch_unwindand, if a panic occurs in the debug hook, replaces the unwind reason with that panic.<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease review the Bytecode Alliance's AI tool usage policy at
https://github.com/bytecodealliance/governance/blob/main/AI_TOOL_POLICY.mdPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
cfallin requested dicej for a review on PR #14654.
cfallin requested wasmtime-core-reviewers for a review on PR #14654.
github-actions[bot] added the label wasmtime:api on PR #14654.
:thumbs_up: alexcrichton submitted PR review.
alexcrichton added PR #14654 Debug support: handle panics in hostcall-error debug hook. to the merge queue
:check: alexcrichton merged PR #14654.
alexcrichton removed PR #14654 Debug support: handle panics in hostcall-error debug hook. from the merge queue
Last updated: Oct 11 2026 at 04:10 UTC