-
-
Notifications
You must be signed in to change notification settings - Fork 250
fix(sourcemaps): Prevent Debug ID collisions #3356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
3f96f9f
bd144fa
4a24cba
6fc203f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| "use strict"; | ||
| !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="a9f9a996-4e6c-5119-b8b8-e64559a6554c")}catch(e){}}(); | ||
| !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="e9628b74-186f-5418-94d8-ce5d7710b414")}catch(e){}}(); | ||
| function t(r,o){r(o)}function n(r,o){t(r,o)}function f(r,o){n(r,o)}f(function(o){throw new Error(o)},"boop"); | ||
| //# sourceMappingURL=cjs.js.map | ||
|
|
||
| //# debugId=a9f9a996-4e6c-5119-b8b8-e64559a6554c | ||
| //# debugId=e9628b74-186f-5418-94d8-ce5d7710b414 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
|
|
||
| !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="dd751360-5eae-531d-87f4-5e00c846a9a3")}catch(e){}}(); | ||
| !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="1376eb8d-6d4f-5c24-8ad7-1120c70dee97")}catch(e){}}(); | ||
| (()=>{function t(r,o){r(o)}function n(r,o){t(r,o)}function f(r,o){n(r,o)}f(function(o){throw new Error(o)},"boop");})(); | ||
| //# sourceMappingURL=iife.js.map | ||
|
|
||
| //# debugId=dd751360-5eae-531d-87f4-5e00c846a9a3 | ||
| //# debugId=1376eb8d-6d4f-5c24-8ad7-1120c70dee97 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| "use strict"; | ||
| !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="0b6cf2c0-b31e-5bb4-9e50-a0c0fd4837db")}catch(e){}}(); | ||
| !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="1dd7a7c9-edd6-53e2-a9ea-fbcb8d7348e4")}catch(e){}}(); | ||
| var n;n=function(n){throw new Error(n)},function(n,o){!function(n,o){n(o)}(n,o)}(n,"boop"); | ||
| //# sourceMappingURL=cjs.js.map | ||
|
|
||
| //# debugId=0b6cf2c0-b31e-5bb4-9e50-a0c0fd4837db | ||
| //# debugId=1dd7a7c9-edd6-53e2-a9ea-fbcb8d7348e4 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
|
|
||
| !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="6cde0fde-8646-5aa5-90be-6540abac2d15")}catch(e){}}(); | ||
| !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b23fffbe-2e84-5ec2-8e51-8d8c5a061e4f")}catch(e){}}(); | ||
| !function(){"use strict";var n;n=function(n){throw new Error(n)},function(n,o){!function(n,o){n(o)}(n,o)}(n,"boop")}(); | ||
| //# sourceMappingURL=iife.js.map | ||
|
|
||
| //# debugId=6cde0fde-8646-5aa5-90be-6540abac2d15 | ||
| //# debugId=b23fffbe-2e84-5ec2-8e51-8d8c5a061e4f |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shared map Debug IDs nondeterministic
Medium Severity
When multiple JS files explicitly reference the same external sourcemap without a Debug ID, the new hash includes the first processed JS file’s bytes. Because
sourcemap_referencesis iterated as aHashMap, that “first” file can change across runs, so the written Debug ID is no longer stable for the same inputs.Additional Locations (1)
src/utils/sourcemaps.rs#L752-L753Reviewed by Cursor Bugbot for commit 6fc203f. Configure here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is probably not a very common occurrence in the real world. We are therefore choosing not to address this unless we receive a bug report