Skip to content

fix(wasm): Register modules loaded via non-streaming WebAssembly APIs - #23661

Draft
andreiborza wants to merge 2 commits into
ab/wasm-patch-plumbingfrom
ab/wasm-nonstreaming-registration
Draft

fix(wasm): Register modules loaded via non-streaming WebAssembly APIs#23661
andreiborza wants to merge 2 commits into
ab/wasm-patch-plumbingfrom
ab/wasm-nonstreaming-registration

Conversation

@andreiborza

@andreiborza andreiborza commented Aug 26, 2026

Copy link
Copy Markdown
Member

What

Registers WASM modules that are loaded through WebAssembly.instantiate(buffer), WebAssembly.compile, and new WebAssembly.Module() so their frames get symbolicated. Those modules carry no URL, so they are registered under the synthetic script name the engine reports in stack frames (wasm://wasm/<hash>), which V8 derives from the byte length for modules above 16383 bytes. Smaller modules get a placeholder name and are matched by elimination instead.

Why

Non-streaming loads (the Emscripten fallback, dynamic linking, Godot Web) produced events without debug_meta, so uploaded debug files were never applied.

Closes: #19564

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 28.57 kB - -
@sentry/browser - with treeshaking flags 26.92 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 26.82 kB - -
@sentry/browser (incl. Tracing) 48.63 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 48.65 kB - -
@sentry/browser (incl. Tracing, Profiling) 51.56 kB - -
@sentry/browser (incl. Tracing, Replay) 88.11 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 77.51 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 92.82 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 105.51 kB - -
@sentry/browser (incl. Feedback) 45.79 kB - -
@sentry/browser (incl. sendFeedback) 33.35 kB - -
@sentry/browser (incl. FeedbackAsync) 38.46 kB - -
@sentry/browser (incl. Metrics) 29.51 kB - -
@sentry/browser (incl. Logs) 29.8 kB - -
@sentry/browser (incl. Metrics & Logs) 30.43 kB - -
@sentry/react 30.31 kB - -
@sentry/react (incl. Tracing) 50.84 kB - -
@sentry/vue 35.69 kB - -
@sentry/vue (incl. Tracing) 50.88 kB - -
@sentry/svelte 28.59 kB - -
CDN Bundle 30.36 kB - -
CDN Bundle (incl. Tracing) 49.12 kB - -
CDN Bundle (incl. Logs, Metrics) 32.56 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 51.01 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 73 kB - -
CDN Bundle (incl. Tracing, Replay) 86.62 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 88.52 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 92.4 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 94.33 kB - -
CDN Bundle - uncompressed 89.97 kB - -
CDN Bundle (incl. Tracing) - uncompressed 146.82 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 96.26 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 152.51 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 225.42 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 266.32 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 272 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 280.01 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 285.68 kB - -
@sentry/nextjs (client) 53.41 kB - -
@sentry/sveltekit (client) 49.08 kB - -
@sentry/core/server 65.3 kB - -
@sentry/core/browser 52.37 kB - -
@sentry/node 122.5 kB +0.02% +22 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 85.22 kB - -
@sentry/node - without tracing 87.66 kB +0.03% +23 B 🔺
@sentry/node - without channel injection 102.19 kB +0.02% +20 B 🔺
@sentry/aws-serverless 95.82 kB +0.03% +25 B 🔺
@sentry/cloudflare (withSentry) - minified 199.61 kB - -
@sentry/cloudflare (withSentry) 495.94 kB - -

View base workflow run

@andreiborza
andreiborza marked this pull request as ready for review August 27, 2026 12:19
@andreiborza
andreiborza requested a review from a team as a code owner August 27, 2026 12:19
@andreiborza
andreiborza requested review from logaretm and msonnb and removed request for a team August 27, 2026 12:19
@andreiborza
andreiborza force-pushed the ab/wasm-nonstreaming-registration branch from b108f49 to ccc54f1 Compare August 27, 2026 12:19
@andreiborza
andreiborza marked this pull request as draft August 27, 2026 12:50
@andreiborza
andreiborza force-pushed the ab/wasm-nonstreaming-registration branch from ccc54f1 to 599115c Compare August 27, 2026 14:01

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 599115c. Configure here.

* Looks up an image by URL in worker images.
*/
function getWorkerImage(url: string): number {
const workerImages = WINDOW._sentryWasmImages || [];

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing fallback for unmatched WASM frames

Medium Severity

patchFrames still matches images only by exact code_file, but buffer-compiled modules at or below V8's 16383-byte cutoff are registered as wasm://wasm/unknown (or wasm://wasm/&lt;name&gt;-unknown) while engine frames use a real content hash. _fromBuffer is stored and stripped, yet never used, so those frames never get addr_mode or debug_meta. Firefox call-site names have the same gap.

Additional Locations (2)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 599115c. Configure here.

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.

Non-streaming WebAssembly APIs are not intercepted breaking symbolication

1 participant