From: Zoltan Varga Date: Mon, 23 Feb 2009 21:26:49 +0000 (+0000) Subject: 2009-02-23 Zoltan Varga X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f5d47a121d7d79201d73ad4e2f02b82a2b282837;p=gc 2009-02-23 Zoltan Varga * os_dep.c (GC_init_linux_data_start): Avoid the call to GC_find_limit () if GC_no_dls is TRUE, as it is not needed and it complicates debugging since it causes a SIGSEGV. svn path=/trunk/mono/; revision=127807 --- diff --git a/ChangeLog b/ChangeLog index cbd82f27..d5b6acfb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-02-23 Zoltan Varga + + * os_dep.c (GC_init_linux_data_start): Avoid the call to GC_find_limit () + if GC_no_dls is TRUE, as it is not needed and it complicates debugging since + it causes a SIGSEGV. + 2009-01-18 Zoltan Varga * include/private/gcconfig.h: Applied patch from Koushik Dutta diff --git a/os_dep.c b/os_dep.c index 39cb513f..83b166c4 100644 --- a/os_dep.c +++ b/os_dep.c @@ -336,6 +336,13 @@ char *GC_parse_map_entry(char *buf_ptr, word *start, word *end, { extern ptr_t GC_find_limit(); + if (GC_no_dls) + /* + * Not needed, avoids the SIGSEGV caused by GC_find_limit which + * complicates debugging. + */ + return; + # ifdef LINUX /* Try the easy approaches first: */ if ((ptr_t)__data_start != 0) { @@ -1449,8 +1456,10 @@ void GC_register_data_segments() /* hanging from it. We're on thin ice here ... */ extern caddr_t sbrk(); + GC_ASSERT(DATASTART); GC_add_roots_inner(DATASTART, (char *)sbrk(0), FALSE); # else + GC_ASSERT(DATASTART); GC_add_roots_inner(DATASTART, (char *)(DATAEND), FALSE); # if defined(DATASTART2) GC_add_roots_inner(DATASTART2, (char *)(DATAEND2), FALSE);