Bug 9678 – std.file.getcwd crash on Win 64, 0xc0000005
Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
x86_64
OS
Windows
Creation time
2013-03-09T11:54:00Z
Last change time
2013-03-10T01:18:18Z
Assigned to
nobody
Creator
pr
Comments
Comment #0 by pr — 2013-03-09T11:54:25Z
One line sample:
auto currDir = getcwd();
On forum:
about getcwd - http://forum.dlang.org/thread/[email protected]
about dirEntries and absolutePath - http://forum.dlang.org/thread/[email protected]
As I assume, all related errors come from bugs in std.utf (or something that used in this module) because:
string cwd()
{
import core.sys.windows.windows;
wchar[] ret = new wchar[10240];
auto n = GetCurrentDirectoryW(to!DWORD(ret.length), ret.ptr);
return ret[0 .. n].to!string();
}
works good on both Win 32 and Win 64.
Win 8 Pro 64 bit
Dmd 2.062
Visual Studio 2012 Express.
Comment #1 by r.sagitario — 2013-03-10T01:18:18Z
*** This issue has been marked as a duplicate of issue 9677 ***