[Issue 5674] AssertError in std.regex
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Apr 6 11:44:56 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5674
Matt Peterson <revcompgeek at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |revcompgeek at gmail.com
--- Comment #2 from Matt Peterson <revcompgeek at gmail.com> 2011-04-06 11:41:18 PDT ---
After some debugging, it looks like Captures is looking for the first unmatched
group and stopping there when giving the length of the captures, which I
believe is the cause of the assert error.
The second problem is that when a group is unmatched the startIdx and endIdx
are stored as size_t.max, and when Captures.front/opIndex as well as
RegexMatch.hit try to slice the input with those numbers causes a range
violation. Most regex engines handle this by returning null if a group is
unmatched.
I'll try to submit a patch soon if I get it working.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list