Bug 222157

Summary: Minor fixes to RegExp match indices after r273086
Product: WebKit Reporter: Michael Saboff <msaboff>
Component: JavaScriptCoreAssignee: Michael Saboff <msaboff>
Status: RESOLVED FIXED    
Severity: Normal CC: ews-watchlist, keith_miller, mark.lam, rmorisset, saam, tzagallo, webkit-bug-importer, ysuzuki
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
ysuzuki: review+
Added local versions of updated but unmarked test262 match-indices test ysuzuki: review+

Michael Saboff
Reported 2021-02-18 20:48:58 PST
Through code inspection found an array size bug in RegExpPrototype.cpp. Also found a compliance bug when populating the "groups" property for indices when there aren't any named groups. In that case "groups" should be undefined instead on non-existent.
Attachments
Patch (5.81 KB, patch)
2021-02-18 20:58 PST, Michael Saboff
ysuzuki: review+
Added local versions of updated but unmarked test262 match-indices test (36.92 KB, patch)
2021-02-19 11:07 PST, Michael Saboff
ysuzuki: review+
Michael Saboff
Comment 1 2021-02-18 20:57:33 PST
Michael Saboff
Comment 2 2021-02-18 20:58:18 PST
Yusuke Suzuki
Comment 3 2021-02-18 21:00:27 PST
Comment on attachment 420915 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=420915&action=review r=me > Source/JavaScriptCore/runtime/RegExpMatchesArray.h:109 > + indicesArray->putDirect(vm, RegExpMatchesIndicesGroupsPropertyOffset, indicesGroups ? indicesGroups : jsUndefined()); Can you add a test for this change?
Yusuke Suzuki
Comment 4 2021-02-18 21:09:33 PST
Comment on attachment 420915 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=420915&action=review > Source/JavaScriptCore/runtime/RegExpPrototype.cpp:165 > +typedef std::array<char, 7 + 1> FlagsString; // 6 different flags and a null character terminator. /6 different flags/7 different flags/
Michael Saboff
Comment 5 2021-02-19 11:07:24 PST
Created attachment 420993 [details] Added local versions of updated but unmarked test262 match-indices test
Michael Saboff
Comment 6 2021-02-19 11:14:19 PST
(In reply to Michael Saboff from comment #5) > Created attachment 420993 [details] > Added local versions of updated but unmarked test262 match-indices test That should be "Added local versions of updated but unmerged test262 match-indices tests."
Yusuke Suzuki
Comment 7 2021-02-19 11:16:07 PST
Comment on attachment 420993 [details] Added local versions of updated but unmarked test262 match-indices test r=me
Michael Saboff
Comment 8 2021-02-19 12:50:51 PST
Robin Morisset
Comment 9 2021-02-22 10:56:04 PST
*** Bug 222278 has been marked as a duplicate of this bug. ***
Note You need to log in before you can comment on or make changes to this bug.