Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 630d6be8962a1cc6f8158ade1ea590bd5397129e
https://github.com/WebKit/WebKit/commit/630d6be8962a1cc6f8158ade1ea590bd5397129e
Author: Sosuke Suzuki <[email protected]>
Date: 2026-07-01 (Wed, 01 Jul 2026)
Changed paths:
A JSTests/stress/regexp-stringlist-eol-multiline.js
M Source/JavaScriptCore/yarr/YarrPattern.cpp
Log Message:
-----------
[YARR] EOL string list optimization produces incorrect matches with multiline
flag
https://bugs.webkit.org/show_bug.cgi?id=318333
Reviewed by Yusuke Suzuki.
When the multiline flag is set, the EOL string list optimization produces
incorrect matches:
/^(?:a|a\nx)$/m.exec("a\nx") // actual(JIT): "a\nx", expected: "a"
/^(?:a\nb|a)$/m.exec("a\nbQ") // actual(JIT): null, expected: "a"
This patch fixes the bug by disabling the optimization when the multiline
flag is set.
Test: JSTests/stress/regexp-stringlist-eol-multiline.js
* JSTests/stress/regexp-stringlist-eol-multiline.js: Added.
(shouldBe):
* Source/JavaScriptCore/yarr/YarrPattern.cpp:
(JSC::Yarr::YarrPatternConstructor::checkForTerminalParentheses):
Canonical link: https://commits.webkit.org/316345@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications