Bug 12366 – Range violation in compile-time regex

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-03-14T17:03:00Z
Last change time
2014-05-16T00:04:15Z
Keywords
pull
Assigned to
dmitry.olsh
Creator
dlang-bugzilla

Comments

Comment #0 by dlang-bugzilla — 2014-03-14T17:03:30Z
import std.regex; void main() { auto re = ctRegex!(`^((?=(xx+?)\2+$)((?=\2+$)(?=(x+)(\4+$))\5){2})*x?$`); "xxxxxxxx".match(re); } This program crashes at runtime: [email protected](3108): Range violation
Comment #1 by dmitry.olsh — 2014-05-15T12:11:56Z
Comment #2 by github-bugzilla — 2014-05-16T00:04:15Z
Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/44445cfb9e62640caf5beb1cb0444565534da342 Fix issue 12366 Range violation in compile-time regex Back-references are not a part of "quick-test" in R-T version, neither should they be in C-T. https://github.com/D-Programming-Language/phobos/commit/f77ee1a0150e8c6f7284d4b8535730f457e7d71a Merge pull request #2171 from DmitryOlshansky/issue-12366 Fix issue 12366 Range violation in compile-time regex