Closed
Bug 576828
Opened 14 years ago
Closed 13 years ago
Regexp engines disagree on seemingly nonsensical recursive backreference
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: jruderman, Assigned: cdleary)
References
Details
(Keywords: testcase, Whiteboard: fixed-in-tracemonkey)
Attachments
(1 file)
(deleted),
patch
|
dmandelin
:
review+
|
Details | Diff | Splinter Review |
/(z\1){3}/.exec("zzz");
OLD: ["zzz", "z"]
YARR: null
Comment 1•14 years ago
|
||
According to ES 3 and 5's definition of RepeatMatcher (step 4), ["zzz", "z"] (OLD) is correct, and YARR is wrong. If step 4 is skipped (which appears to be what happens for both YARR and IE), /(z\1){3}/ matches "zzzzzz" only (returning ["zzzzzz", "zzz"]).
(Note that, outside of ECMAScript-based regex implementations where backreferences to nonparticipating groups match the empty string, this regex can't match anything.)
Assignee | ||
Updated•14 years ago
|
Assignee: general → cdleary
Status: NEW → ASSIGNED
Assignee | ||
Updated•14 years ago
|
Severity: normal → minor
Comment 2•14 years ago
|
||
Hi, OOI this seems to be fixed in yarr in ToT WebKit. Not sure when the fix went in I'm afraid, just thought I'd mention in case it hunting down the change would be an easier way to fix.
cheers,
G.
Assignee | ||
Comment 3•13 years ago
|
||
This was fixed by the YARR update (bug 625600). Nice simple test to add to our suite so we can close this out.
Attachment #537269 -
Flags: review?(dmandelin)
Updated•13 years ago
|
Attachment #537269 -
Flags: review?(dmandelin) → review+
Assignee | ||
Comment 4•13 years ago
|
||
Whiteboard: fixed-in-tracemonkey
Assignee | ||
Comment 5•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•