[Issue 12076] New: [REG 2.065 HEAD] ctRegex range violation
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Feb 4 15:42:41 PST 2014
https://d.puremagic.com/issues/show_bug.cgi?id=12076
Summary: [REG 2.065 HEAD] ctRegex range violation
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: regression
Priority: P2
Component: Phobos
AssignedTo: nobody at puremagic.com
ReportedBy: mk at krej.cz
--- Comment #0 from Martin Krejcirik <mk at krej.cz> 2014-02-05 00:42:38 CET ---
I get range violation in ctRegex after this commit:
https://github.com/D-Programming-Language/phobos/commit/f1eadb913608ad1e1acd800e6c36b2b50b2a9f12
import std.stdio, std.regex;
void main()
{
auto RE = ctRegex!(r"(?<!x\w+)\s(\w+)");
string s = "one two";
auto m = matchFirst(s, RE);
}
---------------------
core.exception.RangeError at std.regex(5982): Range violation
----------------
./regexbug(_d_array_bounds+0x16) [0x80ea846]
./regexbug() [0x80f2402]
./regexbug(@trusted bool std.regex.ctRegexImpl!("(?<!x\w+)\s(\w+)",
[]).func(ref
std.regex.BacktrackingMatcher!(true).BacktrackingMatcher!(char).BacktrackingMatcher).matcher_0(ref
std.regex.BacktrackingMatcher!(true).BacktrackingMatcher!(char,
std.regex.Input!(char).Input.BackLooper).BacktrackingMatcher)+0x157)
[0x80d1d37]
./regexbug(@trusted bool
std.regex.BacktrackingMatcher!(true).BacktrackingMatcher!(char,
std.regex.Input!(char).Input.BackLooper).BacktrackingMatcher.matchImpl()+0x39)
[0x80e4979]
./regexbug(@trusted bool std.regex.ctRegexImpl!("(?<!x\w+)\s(\w+)",
[]).func(ref
std.regex.BacktrackingMatcher!(true).BacktrackingMatcher!(char).BacktrackingMatcher)+0x1c1)
[0x80d18f1]
./regexbug(@trusted bool
std.regex.BacktrackingMatcher!(true).BacktrackingMatcher!(char).BacktrackingMatcher.matchImpl()+0x39)
[0x80e30b1]
./regexbug(@trusted bool
std.regex.BacktrackingMatcher!(true).BacktrackingMatcher!(char).BacktrackingMatcher.matchFinalize()+0x42)
[0x80e2e6a]
./regexbug(@trusted bool
std.regex.BacktrackingMatcher!(true).BacktrackingMatcher!(char).BacktrackingMatcher.match(std.regex.Group!(uint).Group[])+0xdd)
[0x80e2fcd]
./regexbug(@trusted std.regex.Captures!(immutable(char)[], uint).Captures
std.regex.__T9matchOnceS613std5regex28__T19BacktrackingMatcherVb1Z19BacktrackingMatcherTS3std5regex19__T11StaticRegexTaZ11StaticRegexTAyaZ.matchOnce(immutable(char)[],
std.regex.StaticRegex!(char).StaticRegex)+0xe0) [0x80e37e8]
./regexbug(@safe std.regex.Captures!(immutable(char)[], uint).Captures
std.regex.matchFirst!(immutable(char)[],
std.regex.StaticRegex!(char).StaticRegex).matchFirst(immutable(char)[],
std.regex.StaticRegex!(char).StaticRegex)+0x29) [0x80e36f1]
./regexbug(_Dmain+0x26002) [0x80d1722]
./regexbug(void rt.dmain2._d_run_main(int, char**, extern (C) int
function(char[][])*).runAll().void __lambda1()+0x10) [0x80ec168]
./regexbug(void rt.dmain2._d_run_main(int, char**, extern (C) int
function(char[][])*).tryExec(scope void delegate())+0x18) [0x80ec0e0]
./regexbug(void rt.dmain2._d_run_main(int, char**, extern (C) int
function(char[][])*).runAll()+0x27) [0x80ec12f]
./regexbug(void rt.dmain2._d_run_main(int, char**, extern (C) int
function(char[][])*).tryExec(scope void delegate())+0x18) [0x80ec0e0]
./regexbug(_d_run_main+0x117) [0x80ec077]
./regexbug(main+0x14) [0x80e7fdc]
/lib/i686/cmov/libc.so.6(__libc_start_main+0xe6) [0xeb5f2ca6]
./regexbug() [0x80ab681]
---------------------------
Normal regex() works.
DMD32 D Compiler v2.065-devel-e493324
Linux
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list