fix(wasm): Match engine-named wasm frames to the single buffer module - #23662
fix(wasm): Match engine-named wasm frames to the single buffer module#23662andreiborza wants to merge 1 commit into
Conversation
size-limit report 📦
|
cf3c40e to
3eb5ff5
Compare
3eb5ff5 to
38529d5
Compare
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
38529d5 to
ae9e41a
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit ae9e41a. Configure here.
| mainImages.forEach((image, i) => collect(image, i)); | ||
| workerImages.forEach((image, i) => collect(image, mainImages.length + i)); | ||
| return buildIds.size === 1 ? index : -1; | ||
| } |
There was a problem hiding this comment.
Fallback mis-attributes overwritten modules
Low Severity
The single-buffer fallback treats the registry as a complete set of buffer-compiled modules, but unnamed modules at or below V8's hashing cutoff all register under the same placeholder code_file (wasm://wasm/unknown), so a later compile replaces an earlier one. getSingleBufferImageIndex then sees one image and attributes every unmatched wasm:// frame to it, including frames from the overwritten module.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit ae9e41a. Configure here.


What
Frames of buffer-compiled modules can carry a name the SDK cannot predict: Firefox derives it from the compile call site, and V8 hashes the content of modules at or below 16383 bytes. Such frames now resolve to the registered module when exactly one distinct module was compiled from raw bytes.
Why
Without this, non-streaming symbolication misses Firefox entirely and small modules on V8.
Related: #19564