digitalmars.D.learn - open a range of files - segfault
- Stephan Schiffels (12/12) May 22 2013 Hi,
- bearophile (5/14) May 22 2013 If I use the latest 2.063beta5 compiler, and I also import
- John Colvin (3/19) May 22 2013 With git master on linux x64 I get a segfault, see my other
- Stephan Schiffels (4/26) May 22 2013 OK, thanks for confirming. I updated to the latest git master and
- John Colvin (4/16) May 22 2013 A quick gdb run shows that it's segfaulting at the exit of the
Hi, this code crashes with a segfault. I need help to understand what might be wrong with it. import std.array; import std.algorithm; void main() { auto names = ["file1.txt", "file2.txt", "file3.txt"]; // let these files exist auto files = names.map!(f => File(f, "r"))().array(); } Thanks, Stephan
May 22 2013
Stephan Schiffels:this code crashes with a segfault. I need help to understand what might be wrong with it. import std.array; import std.algorithm; void main() { auto names = ["file1.txt", "file2.txt", "file3.txt"]; // let these files exist auto files = names.map!(f => File(f, "r"))().array(); }If I use the latest 2.063beta5 compiler, and I also import std.stdio, then I see no crash on Windows32. Bye, bearophile
May 22 2013
On Wednesday, 22 May 2013 at 11:07:39 UTC, bearophile wrote:Stephan Schiffels:With git master on linux x64 I get a segfault, see my other comment.this code crashes with a segfault. I need help to understand what might be wrong with it. import std.array; import std.algorithm; void main() { auto names = ["file1.txt", "file2.txt", "file3.txt"]; // let these files exist auto files = names.map!(f => File(f, "r"))().array(); }If I use the latest 2.063beta5 compiler, and I also import std.stdio, then I see no crash on Windows32. Bye, bearophile
May 22 2013
On Wednesday, 22 May 2013 at 11:09:49 UTC, John Colvin wrote:On Wednesday, 22 May 2013 at 11:07:39 UTC, bearophile wrote:OK, thanks for confirming. I updated to the latest git master and still get a segfault. I'll file a bug report. StephanStephan Schiffels:With git master on linux x64 I get a segfault, see my other comment.this code crashes with a segfault. I need help to understand what might be wrong with it. import std.array; import std.algorithm; void main() { auto names = ["file1.txt", "file2.txt", "file3.txt"]; // let these files exist auto files = names.map!(f => File(f, "r"))().array(); }If I use the latest 2.063beta5 compiler, and I also import std.stdio, then I see no crash on Windows32. Bye, bearophile
May 22 2013
On Wednesday, 22 May 2013 at 08:38:14 UTC, Stephan Schiffels wrote:Hi, this code crashes with a segfault. I need help to understand what might be wrong with it. import std.array; import std.algorithm; void main() { auto names = ["file1.txt", "file2.txt", "file3.txt"]; // let these files exist auto files = names.map!(f => File(f, "r"))().array(); } Thanks, StephanA quick gdb run shows that it's segfaulting at the exit of the program, when the GC runs its final full collection.
May 22 2013