sansmoraxz opened PR #15261 from sansmoraxz:witgraph-patches to bytecodealliance:main:
In a component, all the core modules share one frame table. When setting or removing a breakpoint, Wasmtime looked up breakpoint sites by PC alone, and PCs are relative to each module. So if two modules had code at the same PC:
- setting a breakpoint in one module also stopped the other
- removing a breakpoint from one module also removed the other's
- a breakpoint with no later opcode in its own module could slip into another module's code
#15182 and #15194 fixed this for single-stepping by skipping other modules' sites.
This PR fixes it in the frame table itself:
- Breakpoint sites are now sorted by module, then PC, instead of by PC only.
- Every lookup (set, remove, slip, single-step) first narrows to the requested module's range of sites.
The existing two-module component test was padded so the modules' PCs never overlapped, which hid the bug. It now has both modules use the same PCs, and there are new tests for setting, removing and slipping breakpoints in one module without affecting the other.
sansmoraxz removed the review request for wasmtime-compiler-reviewers from PR #15261.
sansmoraxz requested cfallin for a review on PR #15261.
sansmoraxz requested wasmtime-compiler-reviewers for a review on PR #15261.
sansmoraxz requested wasmtime-core-reviewers for a review on PR #15261.
github-actions[bot] added the label wasmtime:api on PR #15261.
sansmoraxz updated PR #15261.
sansmoraxz commented on PR #15261:
oops wrong branch
:cross_mark: sansmoraxz closed without merge PR #15261.
cfallin commented on PR #15261:
@sansmoraxz did you mean to close the PR entirely (rather than undo your additional push)? I agree that there is a real bug here when inlining occurs across modules and I'm happy to review your fix.
cfallin commented on PR #15261:
Ah, nevermind, I see you re-opened this in #15270; LGTM and merging there.
sansmoraxz commented on PR #15261:
My bad, forgot to cross link the PR.
Last updated: Nov 19 2026 at 20:05 UTC