[Issue 5484] GC segfaults on FreeBSD 64 / scanning issues for .data and .bss sections
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun May 22 22:23:19 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5484
Brad Roberts <braddr at puremagic.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |braddr at puremagic.com
Platform|All |x86_64
Severity|normal |critical
--- Comment #2 from Brad Roberts <braddr at puremagic.com> 2011-05-22 22:19:02 PDT ---
Here's the change I'm proposing for druntime, based on your previous data and
from inspection of current binaries. So far, testing looks promising:
diff --git a/src/rt/memory.d b/src/rt/memory.d
index ccf3c57..b32dfab 100644
--- a/src/rt/memory.d
+++ b/src/rt/memory.d
@@ -202,8 +202,19 @@ private
{
extern __gshared
{
- int etext;
- int _end;
+ size_t etext;
+ size_t _end;
+ }
+ }
+ version (X86_64)
+ {
+ extern (C)
+ {
+ extern __gshared
+ {
+ size_t _deh_end;
+ size_t __progname;
+ }
}
}
}
@@ -237,7 +248,8 @@ void initStaticDataGC()
}
else version( FreeBSD )
{
- gc_addRange( &etext, cast(size_t) &_end - cast(size_t) &etext );
+ gc_addRange( &etext, cast(size_t) &_deh_end - cast(size_t) &etext );
+ gc_addRange( &__progname, cast(size_t) &_end - cast(size_t)
&__progname );
}
else version( Solaris )
{
--
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