Gracefully handle StringBuffer overflow in RegExp replace operator#59595
Merged
webkit-commit-queue merged 1 commit intoWebKit:mainfrom Mar 2, 2026
Merged
Gracefully handle StringBuffer overflow in RegExp replace operator#59595webkit-commit-queue merged 1 commit intoWebKit:mainfrom
webkit-commit-queue merged 1 commit intoWebKit:mainfrom
Conversation
Collaborator
|
EWS run on previous version of this PR (hash 5335073) Details
|
5335073 to
dd37085
Compare
Collaborator
|
EWS run on previous version of this PR (hash dd37085) Details |
Achierius
approved these changes
Feb 27, 2026
dd37085 to
b1f4c50
Compare
Collaborator
|
EWS run on current version of this PR (hash b1f4c50) Details |
https://bugs.webkit.org/show_bug.cgi?id=308836 rdar://171058069 Reviewed by Marcus Plutowski. When the RegExp replace operator is called, if the output string overflows the maximum legal length of a javascript string it is supposed to throw an out-of-memory error, rather than triggering a controlled crash. Test: JSTests/stress/string-regexp-replace-oom.js * JSTests/stress/string-regexp-replace-oom.js: Added. (Object.__proto__.__proto__.Symbol.replace): (catch): * Source/JavaScriptCore/runtime/RegExpPrototype.cpp: (JSC::getSubstitution): Canonical link: https://commits.webkit.org/308478@main
b1f4c50 to
e3c1c12
Compare
Collaborator
|
Committed 308478@main (e3c1c12): https://commits.webkit.org/308478@main Reviewed commits have been landed. Closing PR #59595 and removing active labels. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
e3c1c12
b1f4c50
🛠 win🧪 win-tests🧪 mac-wk1🛠 vision-sim🛠 playstation🧪 vision-wk2