getsentry / getsentry/sentry-javascript

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

未关闭
#23,781 2 条评论 0 个 reaction 已指派 1 人 已被 @andreiborza 认领 在 GitHub 查看
Bug
主要语言
TypeScript
星标
8.7k
派生
1.8k
平均合并
1 天 17 小时
30 天内合并 PR
515

描述

### Description

### Problem
`fetch` → `arrayBuffer()` → `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/` 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.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。