From 33fe431ffe84d57679a00a21da04ff0facc67a15 Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Mon, 19 Jan 2009 19:34:51 +0100 Subject: [PATCH] Don't use /proc/self/map for finding the static data segment on x86-64 for now. Probably breaks shared libraries. Parsing the file needs to be rewritten! --- runtime/internal/memory.d | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/runtime/internal/memory.d b/runtime/internal/memory.d index 9c53ed33..31efd165 100644 --- a/runtime/internal/memory.d +++ b/runtime/internal/memory.d @@ -30,7 +30,11 @@ version = GC_Use_Dynamic_Ranges; // does Posix suffice? version(Posix) { - version = GC_Use_Data_Proc_Maps; + //FIXME: proc map parsing is too naive to work on x86-64 + version(X86) + { + version = GC_Use_Data_Proc_Maps; + } } version(GC_Use_Data_Proc_Maps) @@ -278,6 +282,7 @@ void initStaticDataPtrs() else version( GC_Use_Data_Proc_Maps ) { // TODO: Exclude zero-mapped regions + //FIXME: proc map parsing is too naive to work on x86-64 int fd = open("/proc/self/maps", O_RDONLY); ptrdiff_t count; // %% need to configure ret for read..