[Issue 11736] New: segfault combining std.parallelism.parallel and std.process.executeShell
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Dec 13 10:17:13 PST 2013
https://d.puremagic.com/issues/show_bug.cgi?id=11736
Summary: segfault combining std.parallelism.parallel and
std.process.executeShell
Product: D
Version: D2
Platform: x86_64
OS/Version: Mac OS X
Status: NEW
Severity: normal
Priority: P2
Component: Phobos
AssignedTo: nobody at puremagic.com
ReportedBy: nikhil.padmanabhan at gmail.com
--- Comment #0 from nikhil.padmanabhan at gmail.com 2013-12-13 10:17:09 PST ---
The following code dies with a segfault :
import std.stdio, std.parallelism, std.process;
void main() {
auto a=["hello","world","goodbye"];
foreach(s; parallel(a,1)) {
auto ls=executeShell("echo "~s);
writeln(ls.output);
}
}
both in ldc and dmd. Removing either the "parallel" or running
something other than executeShell (eg. just doing a writeln)
works, which suggests to me that it's something about the way
executeShell is interacting with parallel.
Pulling it up in lldb, I get :
* thread #2: tid = 0x16738e6, 0x0000000100039198
test`D3std7process7environFNbNdNeZxPPa + 20, stop reason =
EXC_BAD_ACCESS (code=1, address=0x0)
frame #0: 0x0000000100039198
test`D3std7process7environFNbNdNeZxPPa + 20
This appears to only be a problem on OS X (I've tried 10.8.5); I've run both
dmd 2.064.2 and ldc 0.12.1
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list