Status: Accepted
Owner: [email protected]
CC: [email protected]
Labels: Type-Bug Priority-Medium

New issue 667 by [email protected]: RegExp engine does not handle regexps with alternative captures correctly
http://code.google.com/p/v8/issues/detail?id=667

The following piece of code crashes bleeding_edge shell:

var re = new RegExp('\\\\(?:([^u])|u(.{4}))', 'g');
print("\\u0123".replace(re, function(x) { print(x); }));

#
# Fatal error in src/objects.cc, line 4414
# CHECK(0 <= from && from <= to && to <= source->length()) failed
#

The problem is in SearchRegExpMultiple: it assumes that success of regexp
matching implies success of all captures, which is obviously not true if
regexp contains alternatives.


Attachments:
        test.js  109 bytes

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

To unsubscribe from this group, send email to v8-dev+unsubscribegooglegroups.com or reply 
to this email with the words "REMOVE ME" as the subject.

Reply via email to