[Issue 10797] New: std.regex: ctRegex "codegen" bug with certain nested infinite loops

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Aug 11 13:08:21 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=10797

           Summary: std.regex: ctRegex "codegen" bug with certain nested
                    infinite loops
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: dmitry.olsh at gmail.com


--- Comment #0 from Dmitry Olshansky <dmitry.olsh at gmail.com> 2013-08-11 13:08:20 PDT ---
Another bug caught by applying full std.regex test suite to ctRegex.

import std.algorithm, std.regex;

void main()
{
    auto cr = ctRegex!"(a+|b)*";
    auto m  = "ab".match(cr);
    assert(m);
    auto cap = m.front;
    assert(m[0] == "ab" && m[1] == "b"); //instead would match: "a" and ""
}

-- 
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