Bug 2831 – DMD segfault with std.algorithm tuple access

Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2009-04-10T14:43:00Z
Last change time
2015-06-09T01:18:03Z
Assigned to
bugzilla
Creator
d

Comments

Comment #0 by d — 2009-04-10T14:43:18Z
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 ?? ()
Comment #1 by bugzilla — 2009-05-02T10:07:34Z
works dmd 2.029