Skip to content

@sentry/wasm: wasm://wasm/ frames miss debug_meta on non-streaming instantiate(buffer) #23781

Description

@d2anamaria

Description

Problem

fetcharrayBuffer()WebAssembly.instantiate(buffer) can produce frames like:
wasm://wasm/0bee4c4e:wasm-function[1]:0x8c (no file URL).

Module is registered, but patchFrames fails: streaming regex matches first, getImage('wasm://wasm/…') misses, debug_meta.images never attached.

Works / breaks

  • instantiateStreaming
  • instantiate(buffer) when stack has http://…/file.wasm:wasm-function[…] (Emscripten, dev Rust)
  • instantiate(buffer) + wasm://wasm/… (minimal wasm, e2e simple.wasm)
  • ❌ 2+ registered wasm modules (wasm://wasm/<id> not mappable)
  • ❌ module not registered (no build_id / untagged buffer)

Proposed fix

  1. Handle wasm://wasm/… before streaming regex
  2. Map to sole registered module when count === 1
  3. postprocessEvent hook
  4. Browser e2e: suites/wasm/nonStreaming/

Limitation

Single registered wasm module only until multi-module mapping exists.

Metadata

Metadata

Assignees

Labels

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions