[Gc] GC 6.4 simplified leak detection breaks on SuSE Linux 9.3i386(glibc 2.3.4)

Boehm, Hans hans.boehm at hp.com
Fri May 13 10:56:21 PDT 2005


Oops.

Please add a "return;" as the last line in the "if (GC_in_save_callers)
...".

I think you can fix the warning with a cast to (word), bit it's not
critical.

Thanks.

Hans

> -----Original Message-----
> From: gc-bounces at napali.hpl.hp.com 
> [mailto:gc-bounces at napali.hpl.hp.com] On Behalf Of Matthias Andree
> Sent: Friday, May 13, 2005 12:48 AM
> To: gc at napali.hpl.hp.com
> Subject: Re: [Gc] GC 6.4 simplified leak detection breaks on 
> SuSE Linux 9.3i386(glibc 2.3.4)
> 
> 
> On Thu, 12 May 2005, Boehm, Hans wrote:
> 
> > I attached a completely untested patch.  The intent is to break the 
> > recursion in GC_in_save_callers, where it's only somewhat 
> performance 
> > critical.  Could you let me know if this works (or what you 
> needed to 
> > change to make it compile/work :-) )
> 
> This does not work, same symptom as before - where 
> does/should it avoid the backtrace() call if 
> GC_in_save_callers is set? It seems to run this function 
> regardless. I tried placing a return between lines 4011 and 
> 4012 (see below) but that earned me "exclusion ranges 
> overlap" and an abort().
> 
> It seems to compile though, with one warning:
> 
> os_dep.c: In function `GC_save_callers':
> os_dep.c:4010: warning: assignment makes integer from pointer 
> without a cast
> 
> where os_dep.c 4010 is, in context:
> 
>   4006    /* We retrieve NFRAMES+1 pc values, but discard the 
> first, since it   */
>   4007    /* points to our own frame.                         
>                   */
>   4008  # ifdef REDIRECT_MALLOC
>   4009      if (GC_in_save_callers) {
> > 4010        info[0].ci_pc = &GC_save_callers;
>   4011        for (i = 1; i < NFRAMES; ++i) info[i].ci_pc = 0;
>   4012      }
>   4013      GC_in_save_callers = TRUE;
>   4014  # endif
>   4015    GC_ASSERT(sizeof(struct callinfo) == sizeof(void *));
> 
> The symptoms are the same as before, a 45,000 frames deep 
> stack and a crash, same functions as before:
> 
> #0  0xb7ff71fe in _dl_rtld_di_serinfo () from 
> /lib/ld-linux.so.2 #1  0xb7ff130a in _dl_rtld_di_serinfo () 
> from /lib/ld-linux.so.2 #2  0xb7f4523e in _dl_open () from 
> /lib/tls/libc.so.6 #3  0xb7ff7186 in _dl_rtld_di_serinfo () 
> from /lib/ld-linux.so.2 #4  0xb7f44be0 in _dl_open () from 
> /lib/tls/libc.so.6 #5  0xb7f46d4d in __libc_dlopen_mode () 
> from /lib/tls/libc.so.6 #6  0xb7ff7186 in _dl_rtld_di_serinfo 
> () from /lib/ld-linux.so.2 #7  0xb7f46bd5 in 
> _dl_mcount_wrapper () from /lib/tls/libc.so.6 #8  0xb7f46cfb 
> in __libc_dlopen_mode () from /lib/tls/libc.so.6 #9  
> 0xb7f243ba in __nss_passwd_lookup () from /lib/tls/libc.so.6 
> #10 0xb7f24557 in backtrace () from /lib/tls/libc.so.6 #11 
> 0xb7fd3724 in GC_save_callers (info=0x80be390) at 
> os_dep.c:4016 #12 0xb7fcb570 in GC_debug_malloc (lb=45, 
> s=0xb7fd8266 "unknown", i=0) at dbg_mlc.c:502 #13 0xb7fce294 
> in malloc (lb=45) at malloc.c:349 ... #45417 0xb7fce294 in 
> malloc (lb=19) at malloc.c:349 #45418 0xb7ff14d2 in 
> _dl_rtld_di_serinfo () from /lib/ld-linux.so.2 #45419 
> 0xb7f4523e in _dl_open () from /lib/tls/libc.so.6 #45420 
> 0xb7ff7186 in _dl_rtld_di_serinfo () from /lib/ld-linux.so.2 
> #45421 0xb7f44be0 in _dl_open () from /lib/tls/libc.so.6 
> #45422 0xb7f46d4d in __libc_dlopen_mode () from 
> /lib/tls/libc.so.6 #45423 0xb7ff7186 in _dl_rtld_di_serinfo 
> () from /lib/ld-linux.so.2 #45424 0xb7f46bd5 in 
> _dl_mcount_wrapper () from /lib/tls/libc.so.6 #45425 
> 0xb7f46cfb in __libc_dlopen_mode () from /lib/tls/libc.so.6 
> #45426 0xb7f243ba in __nss_passwd_lookup () from 
> /lib/tls/libc.so.6 #45427 0xb7f24557 in backtrace () from 
> /lib/tls/libc.so.6 #45428 0xb7fd3724 in GC_save_callers 
> (info=0xb7fe9014) at os_dep.c:4016 #45429 0xb7fc9aae in 
> GC_try_to_collect_inner (stop_func=0xb7fc8da0 <GC_never_stop_func>)
>     at alloc.c:363
> #45430 0xb7fd27d3 in GC_init_inner () at misc.c:782
> #45431 0xb7fce535 in GC_generic_malloc_inner (lb=101, k=1) at 
> malloc.c:160 #45432 0xb7fce5cd in GC_generic_malloc (lb=101, 
> k=1) at malloc.c:192 #45433 0xb7fce730 in GC_malloc (lb=101) 
> at malloc.c:311 #45434 0xb7fcb54f in GC_debug_malloc (lb=42, 
> s=0xb7fd8266 "unknown", i=0) at dbg_mlc.c:490 #45435 
> 0xb7fce294 in malloc (lb=42) at malloc.c:349 #45436 
> 0x08048440 in main () at leakmem.c:16
> 
> I used ./configure '--enable-full-debug' 
> '--enable-redirect-malloc' \ '--disable-threads' as usual.
> 
> -- 
> Matthias Andree
> _______________________________________________
> Gc mailing list
> Gc at linux.hpl.hp.com 
> http://www.hpl.hp.com/hosted/linux/mail-archives/gc/
> 



More information about the Gc mailing list