digitalmars.D.bugs - [Issue 11775] New: std.regex should check for valid repetition range in assert mode
- d-bugmail puremagic.com (29/30) Dec 19 2013 https://d.puremagic.com/issues/show_bug.cgi?id=11775
- d-bugmail puremagic.com (13/13) Dec 19 2013 https://d.puremagic.com/issues/show_bug.cgi?id=11775
- d-bugmail puremagic.com (11/11) Dec 19 2013 https://d.puremagic.com/issues/show_bug.cgi?id=11775
- d-bugmail puremagic.com (11/11) Dec 20 2013 https://d.puremagic.com/issues/show_bug.cgi?id=11775
https://d.puremagic.com/issues/show_bug.cgi?id=11775 Summary: std.regex should check for valid repetition range in assert mode Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nobody puremagic.com ReportedBy: andrej.mitrovich gmail.com 08:27:52 PST --- ----- import std.regex; void main() { auto m = "12".match(r"\d{1,0}"); // invalid range } ----- $ dmd -run test.dcore.exception.RangeError std.regex(5019): Range violationNote that the exception is internal while trying to access an invalid index in an array. With -noboundscheck there will be no exceptions thrown. I think at least in assert mode ( version(assert) ) the repetition range should be verified to be valid. -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Dec 19 2013
https://d.puremagic.com/issues/show_bug.cgi?id=11775 Dmitry Olshansky <dmitry.olsh gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull CC| |dmitry.olsh gmail.com 10:13:09 PST --- https://github.com/D-Programming-Language/phobos/pull/1791 I think it should throw just like any other parse error, after all patterns are user input in certain systems (like editors). -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Dec 19 2013
https://d.puremagic.com/issues/show_bug.cgi?id=11775 Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/e598f92224db6e28603e1421d3b3e5e47422bbe5 fix issue 11775 std.regex should check for valid repetition range https://github.com/D-Programming-Language/phobos/commit/ff23ea79975e9ffb7edf16370563b3253a882f99 fix issue 11775 std.regex should check for valid repetition range -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Dec 19 2013
https://d.puremagic.com/issues/show_bug.cgi?id=11775 Andrej Mitrovic <andrej.mitrovich gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED 00:48:53 PST --- Thanks! -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Dec 20 2013