Bug 10137 – opening multiple file through map generates a seg-fault

Status
RESOLVED
Resolution
DUPLICATE
Severity
major
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
All
Creation time
2013-05-22T14:29:00Z
Last change time
2013-05-22T16:38:56Z
Assigned to
nobody
Creator
stephan.schiffels

Comments

Comment #0 by stephan.schiffels — 2013-05-22T14:29:45Z
This code crashes with a seg-fault: import std.stdio; import std.algorithm; import std.array; void main() { auto filenames = ["base.d", "bclass.d", "dclass.d"]; auto files = filenames.map!(f => File(f, "r"))().array(); } I tested this with the newest git compiler, runtime and phobos on Mac OS X 64bit. As pointed out by John Colvin (http://forum.dlang.org/thread/[email protected]), the bug also occurs on Linux with 64bit. More specifically: "A quick gdb run shows that it's segfaulting at the exit of the program, when the GC runs its final full collection." Stephan
Comment #1 by stephan.schiffels — 2013-05-22T16:38:56Z
sorry, Maxim has already filed this. *** This issue has been marked as a duplicate of issue 10136 ***