building git druntime - range violation in extendedPathThen

Nick Treleaven nick at geany.org
Thu Dec 7 12:25:36 UTC 2017


On Wednesday, 6 December 2017 at 17:11:49 UTC, Nick Treleaven 
wrote:
> 0x005482C2 in nothrow void* 
> ddmd.root.filename.extendedPathThen!(ddmd.root.file.File.read().__lambda1).extendedPathThen(const(char*)) at C:\git\dmd\src\ddmd\root\filename.d(834)
> 0x005480E8 in File at C:\git\dmd\src\ddmd\root\file.d(198)

For now this workaround lets me compile druntime:

--- a/src/ddmd/root/file.d
+++ b/src/ddmd/root/file.d
@@ -193,6 +193,8 @@ nothrow:

              // work around Windows file path length limitation
              // (see documentation for extendedPathThen).
+            if (!name[0])
+                return true;
              HANDLE h = name.extendedPathThen!
                  (p => CreateFileW(&p[0],
                                    GENERIC_READ,



More information about the Digitalmars-d-learn mailing list