Skip to content

fix: format wasm stack traces per W3C spec#32246

Merged
bartlomieju merged 5 commits intodenoland:mainfrom
bartlomieju:fix/wasm-stack-trace-format
Feb 23, 2026
Merged

fix: format wasm stack traces per W3C spec#32246
bartlomieju merged 5 commits intodenoland:mainfrom
bartlomieju:fix/wasm-stack-trace-format

Conversation

@bartlomieju
Copy link
Copy Markdown
Member

@bartlomieju bartlomieju commented Feb 20, 2026

Summary

  • Update wasm stack trace formatting to use the W3C WebAssembly Web API spec format: wasm-function[<funcIndex>]:0x<hexOffset> instead of the generic line:col format
  • Update existing wasm_url test expectation to match
  • Add new integration test (wasm_stack_trace) covering:
    • Basic unreachable trap with correct wasm-function[0]:0x<offset> format
    • Multi-frame wasm call chain verifying correct function indices across frames
    • Error.prepareStackTrace callsite toString() producing correct wasm format

Fixes #32239
Actually fixed in #32293, this just adds a test.

bartlomieju and others added 2 commits February 20, 2026 14:40
…rmat

Wasm stack frames should use the format `wasm-function[N]:0x<offset>` per
the W3C WebAssembly Web API spec, not `line:col`. Updates the existing
wasm_url test expectation and adds a new integration test covering
unreachable traps, multi-frame wasm call chains, and
Error.prepareStackTrace with wasm frames.

Ref: denoland#32239

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@bartlomieju bartlomieju enabled auto-merge (squash) February 23, 2026 19:04
@bartlomieju bartlomieju disabled auto-merge February 23, 2026 19:07
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@bartlomieju bartlomieju enabled auto-merge (squash) February 23, 2026 19:22
@bartlomieju bartlomieju merged commit 578cb26 into denoland:main Feb 23, 2026
110 checks passed
@bartlomieju bartlomieju deleted the fix/wasm-stack-trace-format branch February 23, 2026 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wasm stack traces are not correctly formatted

2 participants