malloc: bug or feature ?
Marc Olzheim
marcolz at stack.nl
Wed Apr 7 09:25:57 PDT 2004
On Wed, Apr 07, 2004 at 08:37:43AM -0700, Peter Wemm wrote:
> In -current, this is normal. The default MALLOC_OPTIONS setting is
> 'AJ', which intentionally fills new malloc'ed data area with junk, and
> has all the assertions turned on.
>
> The SEGV looks suspicious though. I wonder if malloc is trying to put
> the junk in without checking if malloc failed.
>
> Anyway, try "env MALLOC_OPTIONS=aj ./a.out" See 'man malloc.conf' etc
> for more info.
Exactly the same:
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/libc.so.5...done.
Loaded symbols for /lib/libc.so.5
Reading symbols from /libexec/ld-elf.so.1...done.
Loaded symbols for /libexec/ld-elf.so.1
#0 0x0000000006461000 in ?? ()
(gdb) bt
#0 0x0000000006461000 in ?? ()
#1 0x0000000200681c1d in ldexp () from /lib/libc.so.5
#2 0x00000002006820a1 in ldexp () from /lib/libc.so.5
#3 0x0000000200682285 in ldexp () from /lib/libc.so.5
#4 0x000000020068262d in ldexp () from /lib/libc.so.5
#5 0x00000002006826e4 in malloc () from /lib/libc.so.5
#6 0x00000000004006a1 in main (ac=1, av=0x7fffffffe470) at taille.c:12
(gdb)
Marc
> --
> Peter Wemm - peter at wemm.org; peter at FreeBSD.org; peter at yahoo-inc.com
> "All of this is for nothing if we don't go to the stars" - JMS/B5
--
Bobo goes to heaven,
Zlo goes
anywhere he wants...
More information about the freebsd-amd64
mailing list