www.digitalmars.com         C & C++   DMDScript  

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

reply d-bugmail puremagic.com writes:
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 puremagic.com
        ReportedBy: stephan.schiffels mac.com


--- Comment #0 from Stephan <stephan.schiffels 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: -------
May 22 2013
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10137


Stephan <stephan.schiffels mac.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE


--- Comment #1 from Stephan <stephan.schiffels mac.com> 2013-05-22 16:38:56 PDT
---
sorry, Maxim has already filed this.

*** This issue has been marked as a duplicate of issue 10136 ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 22 2013