Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 38281d033aee844d56610d9e9b1ea23894f310be
https://github.com/WebKit/WebKit/commit/38281d033aee844d56610d9e9b1ea23894f310be
Author: Sosuke Suzuki <[email protected]>
Date: 2026-08-31 (Mon, 31 Aug 2026)
Changed paths:
A JSTests/stress/regexp-v-flag-character-after-set-operand.js
M Source/JavaScriptCore/yarr/YarrParser.h
Log Message:
-----------
[YARR] A character following a class set operand in a `/v` class adds `U+0000`
https://bugs.webkit.org/show_bug.cgi?id=322962
Reviewed by Yusuke Suzuki.
ClassSetParserDelegate holds back the previous character in m_character
until it knows whether it starts a range; m_character is only meaningful
while the state says a character is pending. After a nested class or a
\q{} string disjunction nothing is pending, but atomPatternCharacter()
still emitted m_character before holding back the new one. When no
character had been seen yet that emitted its initial value, so
/^[\q{ab}c]$/v and /^[[\p{L}]a]$/v matched U+0000; otherwise it
re-emitted a character the class already had.
Test: JSTests/stress/regexp-v-flag-character-after-set-operand.js
* JSTests/stress/regexp-v-flag-character-after-set-operand.js: Added.
(shouldBe):
* Source/JavaScriptCore/yarr/YarrParser.h:
(JSC::Yarr::Parser::ClassSetParserDelegate::atomPatternCharacter):
Canonical link: https://commits.webkit.org/320216@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications