[Issue 6790] New: buildPath using std.path.curdir segfaults
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Oct 7 21:38:33 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6790
Summary: buildPath using std.path.curdir segfaults
Product: D
Version: D2
Platform: x86
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Phobos
AssignedTo: nobody at puremagic.com
ReportedBy: jonathansternberg at gmail.com
--- Comment #0 from Jonathan Sternberg <jonathansternberg at gmail.com> 2011-10-07 21:37:46 PDT ---
I am using the dmd compiler and phobos library at version 2.055. This is on
Linux Mint 11 with x86 architecture. To repeat the bug is a bit weird. It seems
to only happen when using std.path.curdir, and only when not in the main
module. The following will NOT produce the error:
import std.path; import std.stdio;
int main() {
writeln(buildPath(curdir, "a.out"));
return 0;
}
This WILL produce the error:
-- main.d
static import foobar;
int main() {
foobar.crash();
return 0;
}
-- foobar.d
module foobar;
import std.path; import std.stdio;
void crash() {
writeln(buildPath(curdir, "a.out"));
}
Compiling and running this results in a segfault. No idea why.
Workaround that seems to work is to use std.path.curdir.idup instead.
--
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