Re: malloc problems in -current malloc_usable_size()

From: Jason Evans <jasone_at_freebsd.org>
Date: Tue, 02 Mar 2010 09:16:54 -0800
Mark Atkinson wrote:
> I updated my kernel/world yesterday and thunderbird 3.0.2 started core
> dumping after I completed the upgrade.   It continued to do so on
> previously good operations after a full re-compile.
> 
> I noticed that some jemalloc changes went in and was wondering if anyone
> else was noticing SEGV problems in other apps with malloc_usable_size()
> or ARENA problems in threaded apps?
> 
> (gdb) bt
> #0  0x28eacb14 in malloc_usable_size () from /lib/libc.so.7
> #1  0x28eadbaa in free () from /lib/libc.so.7
> #2  0x2ed9ac22 in gss_release_buffer () from /usr/lib/libgssapi.so.10

This failure (segfault due to accessing an unmapped region of memory) is
more subtle than I would typically expect of a malloc bug.  My approach
to debugging this would be to turn on tracing (see MALLOC_OPTIONS=U
docs) and see if the pointer passed to free() was valid (i.e. returned
by malloc/calloc/realloc, but not yet freed).

Jason
Received on Tue Mar 02 2010 - 16:17:05 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:01 UTC