diff dmd/FileName.d @ 5:63623152e82a

Fixed memory corruption bug which was introduced when attempting to restore GC functionality
author dkoroskin <>
date Tue, 08 Dec 2009 21:39:17 +0300
parents d706d958e4e8
children 2cc604139636
line wrap: on
line diff
--- a/dmd/FileName.d	Mon Oct 26 16:28:19 2009 +0300
+++ b/dmd/FileName.d	Tue Dec 08 21:39:17 2009 +0300
@@ -7,7 +7,7 @@
 
 import core.memory;
 
-import core.stdc.stdlib : alloca;
+import core.stdc.stdlib : malloc, alloca;
 import core.stdc.string : memcpy, strlen;
 import core.stdc.ctype : isspace;
 
@@ -412,7 +412,7 @@
 			size_t len = e.ptr - name.ptr;
 			size_t extlen = ext.length;
 
-			char* s = cast(char*)GC.malloc(len + extlen + 1);
+			char* s = cast(char*)malloc(len + extlen + 1);  /// !
 			memcpy(s, name.ptr, len);
 			memcpy(s + len, ext.ptr, extlen + 1);
 			return new FileName(assumeUnique(s[0..len+extlen]));