[Issue 2831] New: DMD segfault with std.algorithm tuple access

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Apr 10 12:43:12 PDT 2009


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

           Summary: DMD segfault with std.algorithm tuple access
           Product: D
           Version: 2.027
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: d at brian.codekitchen.net


actually DMD 2.028, tested on OS X and Ubuntu Linux.
The following code segfaults DMD:

import std.algorithm;

void main() {
    int[] arr = [1];
    auto res = reduce!("a+1", "a+b")(0, 0, arr);
    auto val = res.field[0]; /* segfaults */
    // auto val = res._0; /* this version does not segfault */
}

GDB backtrace on OS X:

#0  0x0008199c in EnumMember::~EnumMember ()
#1  0x000aafaa in Import::~Import ()
#2  0x000550d3 in Objects::~Objects ()
#3  0x00073b60 in EnumMember::~EnumMember ()
#4  0x000eb801 in FileName::~FileName ()
#5  0x000f048f in FileName::~FileName ()
#6  0x0008db2f in CondExp::~CondExp ()
#7  0x000b86f6 in ExpInitializer::~ExpInitializer ()
#8  0x000b6939 in ExpInitializer::~ExpInitializer ()
#9  0x000026c2 in ?? ()
#10 0x000025e9 in ?? ()


-- 



More information about the Digitalmars-d-bugs mailing list