http://d.puremagic.com/issues/show_bug.cgi?id=8725
Summary: segmentation fault with negative-lookahead in module-level regex Product: D Version: D2 Platform: x86_64 OS/Version: Mac OS X Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nob...@puremagic.com ReportedBy: v...@markovic.io --- Comment #0 from Val Markovic <v...@markovic.io> 2012-09-25 22:31:39 PDT --- The following program crashes with a segmentation fault: ------------- #!/usr/bin/env rdmd import std.stdio; import std.regex; auto italic = regex( r"\* (?!\s+) (.*?) (?!\s+) \*", "gx" ); void main() { string input = "this * is* interesting, *very* interesting"; writeln( replace( input, italic, "<i>$1</i>" ) ); } -------------- If one removes the first line with (?!\s+), then the program doesn't crash. I was under the impression that this snippet of code operates under the SafeD subset and therefore shouldn't cause a segmentation fault. A thrown exception on problems or something, that I can understand. But a segfault? In other sad news, these are the first lines of D I've ever written :( ... so much for experimentation... -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------