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

           Summary: Segfault combining std.c.linux and passing a ref
                    string
           Product: D
           Version: 2.030
          Platform: x86_64
        OS/Version: Linux
            Status: NEW
          Severity: minor
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: jesse.k.phillip...@gmail.com


In the code below the compiler will "Segmentation fault." getopt takes a
string[], but is being given just a string. With the included import to
std.c.linux.linux DMD will end with a segfault rather than the appropriate
error message. Removing the import works as expected.

import std.c.linux.linux;
import std.getopt;

string arg1;

void main(string[] args) {

}

void parseArgs(ref string args) {
    getopt(args, "f|file", &arg1);
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to