[Issue 3119] New: Segfault combining std.c.linux and passing a ref string

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Jun 30 23:40:16 PDT 2009


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: nobody at puremagic.com
        ReportedBy: Jesse.K.Phillips+D at 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: -------


More information about the Digitalmars-d-bugs mailing list