realloc problem

David Relson relson at osagesoftware.com
Thu Oct 20 00:47:08 CEST 2005


Hi Clint,

Looks like flex's buffer got nuked and that blew a hole in the free
memory list.  'Tis an interesting situation and one I can't reproduce.
Can you gzip and email a copy of /tmp/testmsg to me?

David

On Wed, 19 Oct 2005 11:05:28 -0400
Clint Adams wrote:

> Starting program: /tmp/bogofilter-0.96.2/obj-db/src/bogofilter -vv </tmp/testmsg
> *** glibc detected *** realloc(): invalid next size: 0x080afb20 ***
> 
> Program received signal SIGABRT, Aborted.
> 0xffffe410 in __kernel_vsyscall ()
> (gdb) bt
> #0  0xffffe410 in __kernel_vsyscall ()
> #1  0xb7cd4921 in raise () from /lib/tls/i686/cmov/libc.so.6
> #2  0xb7cd627b in abort () from /lib/tls/i686/cmov/libc.so.6
> #3  0xb7d0af77 in __fsetlocking () from /lib/tls/i686/cmov/libc.so.6
> #4  0xb7d13309 in free () from /lib/tls/i686/cmov/libc.so.6
> #5  0xb7d13d8f in realloc () from /lib/tls/i686/cmov/libc.so.6
> #6  0xb7d15561 in malloc_get_state () from /lib/tls/i686/cmov/libc.so.6
> #7  0xb7d13cbc in realloc () from /lib/tls/i686/cmov/libc.so.6
> #8  0x08052c86 in yy_flex_realloc (ptr=0x80afb20, size=32770) at lexer_v3.c:3017
> #9  0x0805234c in yy_get_next_buffer () at lexer_v3.c:2367
> #10 0x0805210d in yylex () at lexer_v3.c:2226
> #11 0x08058d3a in get_token (token=0xbff0a61c) at ../../src/token.c:130
> #12 0x0804d9f1 in collect_words (wh=0x8092528) at ../../src/collect.c:50
> #13 0x0804a015 in bogofilter (argc=0, argv=0xbff0a79c) at ../../src/bogofilter.c:97
> #14 0x0804bf7c in bogomain (argc=2, argv=0xbff0a794) at ../../src/bogomain.c:65
> #15 0x0804a307 in main (argc=2, argv=0xbff0a794) at ../../src/main.c:31
> 
> % MALLOC_CHECK_=0 ./bogofilter -vv </tmp/testmsg
> fatal error - scanner input buffer overflow
> 
> % MALLOC_CHECK_=1 ./bogofilter -vv </tmp/testmsg
> malloc: using debugging hooks
> *** glibc detected *** realloc(): invalid pointer: 0x080afc40 ***
> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000015, version=0.96.2
>    int  cnt   prob  spamicity histogram
>   0.00   32 0.002112 0.001739 ################################
>   0.10    0 0.000000 0.001739 
>   0.20    0 0.000000 0.001739 
>   0.30    0 0.000000 0.001739 
>   0.40    0 0.000000 0.001739 
>   0.50    0 0.000000 0.001739 
>   0.60    0 0.000000 0.001739 
>   0.70    0 0.000000 0.001739 
>   0.80    4 0.888149 0.169056 ####
>   0.90    3 0.944741 0.277162 ###
> 
> % MALLOC_CHECK_=2 ./bogofilter -vv </tmp/testmsg
> zsh: 17663 abort      MALLOC_CHECK_=2 ./bogofilter -vv < /tmp/testmsg
> 
> _______________________________________________
> Bogofilter-dev mailing list
> Bogofilter-dev at bogofilter.org
> http://www.bogofilter.org/mailman/listinfo/bogofilter-dev



More information about the bogofilter-dev mailing list