Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 4a2761ccd07210ab20b88b7f6242b0f32ead3e29
https://github.com/WebKit/WebKit/commit/4a2761ccd07210ab20b88b7f6242b0f32ead3e29
Author: Kai Tamkun <[email protected]>
Date: 2026-05-11 (Mon, 11 May 2026)
Changed paths:
A JSTests/stress/regexp-search-lastIndex.js
M Source/JavaScriptCore/dfg/DFGStrengthReductionPhase.cpp
Log Message:
-----------
[JSC] RegExpSearch DFG constant folding mishandles lastIndex for
global/sticky regular expressions
https://bugs.webkit.org/show_bug.cgi?id=313139
rdar://175066379
Reviewed by Yijia Huang.
This patch ensures RegExpSearch will always match from position 0 without
changing
lastIndex in DFG constant folding, regardless of whether the regex is global or
sticky.
Test: JSTests/stress/regexp-search-lastIndex.js
* JSTests/stress/regexp-search-lastIndex.js: Added.
(test1):
(test2):
(test3):
* Source/JavaScriptCore/dfg/DFGStrengthReductionPhase.cpp:
(JSC::DFG::StrengthReductionPhase::handleNode):
Canonical link: https://commits.webkit.org/313029@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications