Changeset 274945 in webkit
- Timestamp:
- Mar 24, 2021 10:29:02 AM (16 months ago)
- Location:
- trunk
- Files:
-
- 4 edited
-
JSTests/ChangeLog (modified) (1 diff)
-
JSTests/stress/regexp-dot-match-nonBMP.js (modified) (2 diffs)
-
Source/JavaScriptCore/ChangeLog (modified) (1 diff)
-
Source/JavaScriptCore/yarr/YarrInterpreter.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/JSTests/ChangeLog
r274935 r274945 1 2021-03-24 Michael Saboff <msaboff@apple.com> 2 3 [YARR] Interpreter incorrectly matches non-BMP characters with multiple . w/dotAll flag 4 https://bugs.webkit.org/show_bug.cgi?id=223666 5 6 Reviewed by Mark Lam. 7 8 Added tests for dotAll. Also made sure that we test both JIT and non-JIT execution. 9 10 * stress/regexp-dot-match-nonBMP.js: 11 1 12 2021-03-24 Yusuke Suzuki <ysuzuki@apple.com> 2 13 -
trunk/JSTests/stress/regexp-dot-match-nonBMP.js
r274806 r274945 1 //@ runDefault 2 //@ runNoJIT 3 1 4 function shouldMatch(regexp, str) { 2 5 let result = regexp.test(str); … … 19 22 shouldntMatch(/.../, s); 20 23 shouldntMatch(/.../u, s); 24 25 shouldMatch(/./s, s); 26 shouldMatch(/./su, s); 27 shouldMatch(/../s, s); 28 shouldntMatch(/../su, s); 29 shouldntMatch(/.../s, s); 30 shouldntMatch(/.../su, s); -
trunk/Source/JavaScriptCore/ChangeLog
r274942 r274945 1 2021-03-24 Michael Saboff <msaboff@apple.com> 2 3 [YARR] Interpreter incorrectly matches non-BMP characters with multiple . w/dotAll flag 4 https://bugs.webkit.org/show_bug.cgi?id=223666 5 6 Reviewed by Mark Lam. 7 8 In checkCharacterClassDontAdvanceInputForNonBMP(), we need to check for input.readChecked() returning -1 9 and return that the character class didn't match. 10 11 * yarr/YarrInterpreter.cpp: 12 (JSC::Yarr::Interpreter::checkCharacterClassDontAdvanceInputForNonBMP): 13 1 14 2021-03-24 Saam Barati <sbarati@apple.com> 2 15 -
trunk/Source/JavaScriptCore/yarr/YarrInterpreter.cpp
r274806 r274945 437 437 { 438 438 int readCharacter = characterClass->hasOnlyNonBMPCharacters() ? input.readSurrogatePairChecked(negativeInputOffset) : input.readChecked(negativeInputOffset); 439 if (readCharacter < 0) 440 return false; 441 439 442 return testCharacterClass(characterClass, readCharacter); 440 443 }
Note: See TracChangeset
for help on using the changeset viewer.