cfallin opened PR #14677 from cfallin:fix-guest-debug-empty-func to bytecodealliance:main:
Some generated functions (e.g. a module start function) don't have any program points corresponding to a guest Wasm PC address. In this case, our fuzzy "last program point" match finds an unrelated program point in the previous function in the compiled text segment. We should instead return
Nonein this case.Fixes #14563.
<!--
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 alexcrichton for a review on PR #14677.
cfallin requested wasmtime-compiler-reviewers for a review on PR #14677.
cfallin requested wasmtime-core-reviewers for a review on PR #14677.
:thumbs_up: alexcrichton submitted PR review:
The
func_startsfield probably ends up duplicating something within the other function indices we have inCompiledFunctionsTable, but it seems reasonable to me to add them into the debugging information as well as it's probably relatively pretty small and it's laid out slightly differently too based on runtime lookup requirements.
alexcrichton added PR #14677 Guest debugging: handle functions with no program points properly. to the merge queue
cfallin commented on PR #14677:
Yes, it's a bit hazy in memory now but there were a few differences wrt other tables (e.g. trap tables) that caused me to build a debug-specific set of tables initially. At some point I should go back and look at refactoring/sharing more representation...
:check: alexcrichton merged PR #14677.
alexcrichton removed PR #14677 Guest debugging: handle functions with no program points properly. from the merge queue
Last updated: Oct 31 2026 at 23:03 UTC