getsentry / getsentry/sentry-javascript

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

Đang mở
#23,781 2 bình luận 0 reaction 1 người được giao Được @andreiborza nhận Xem trên GitHub
Bug
Ngôn ngữ chính
TypeScript
Star
8.7k
Fork
1.8k
Merge trung bình
1 ngày 17 giờ
Pull request đã merge (30 ngày)
523

Mô tả

### 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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.