[Issue 10137] New: opening multiple file through map generates a seg-fault

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed May 22 14:29:47 PDT 2013


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

           Summary: opening multiple file through map generates a
                    seg-fault
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: stephan.schiffels at mac.com


--- Comment #0 from Stephan <stephan.schiffels at mac.com> 2013-05-22 14:29:45 PDT ---
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/cwnqmhatxcswevjfpiea@forum.dlang.org), 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

-- 
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