Closed
Bug 627609
Opened 13 years ago
Closed 13 years ago
Empty group matching fails on /((a|)+b)+/.exec('bb')
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
Tracking | Status | |
---|---|---|
blocking2.0 | --- | betaN+ |
People
(Reporter: cdleary, Assigned: dmandelin)
References
Details
(Keywords: regression, Whiteboard: softblocker, fixed-in-tracemonkey)
Attachments
(1 file)
37.06 KB,
patch
|
cdleary
:
review+
|
Details | Diff | Splinter Review |
dmandelin and I thought through this example in talking over the patch for bug 599854. We need a more robust way of tracking parens with valid empty group matches.
Reporter | ||
Updated•13 years ago
|
blocking2.0: --- → ?
Assignee | ||
Updated•13 years ago
|
blocking2.0: ? → betaN+
Whiteboard: softblocker
Assignee | ||
Comment 1•13 years ago
|
||
Assignee: general → dmandelin
Status: NEW → ASSIGNED
Assignee | ||
Updated•13 years ago
|
Attachment #506578 -
Flags: review?(cdleary)
Reporter | ||
Comment 2•13 years ago
|
||
Comment on attachment 506578 [details] [diff] [review] Patch This is clearly the right way to do it: if I knew what I was doing a little more when we first imported PCRE or we had a test case like this one, maybe I would have found this solution. :-) Quantified assertions are invalid in the ES5 spec, although the ES3 grammar seems to allow it, which would calls into question examples like |/(?=foo)+/.exec('foofoo')|. Can atOptionalBracket fall off the beginning of the pattern? If not, we should put a comment as to why the negative indexing is safe. IRL we talked about whether BRAMINZERO was needed as a case within atOptionalBracket, but it doesn't seem so: if you lazy match my matching the empty string this situation should be equivalent to not executing the regexp within the lazy match at all. A comment about this within the atOptionalBracket would be nice.
Attachment #506578 -
Flags: review?(cdleary) → review+
Assignee | ||
Comment 3•13 years ago
|
||
http://hg.mozilla.org/tracemonkey/rev/9f58085a9081
Whiteboard: softblocker → softblocker, fixed-in-tracemonkey
Reporter | ||
Comment 4•13 years ago
|
||
cdleary-bot mozilla-central merge info: http://hg.mozilla.org/mozilla-central/rev/9f58085a9081 http://hg.mozilla.org/mozilla-central/rev/0f340f13b171 http://hg.mozilla.org/mozilla-central/rev/68e341f7ac4e
Reporter | ||
Updated•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
•