On Thursday 29 November 2007 20:34:17 Will Coleda wrote:

> On feather, languages/c99 (et al.) fail with:
>
> $ make
> ../../parrot -o src/CPP_PGE2AST.pbc --output-pbc src/CPP_PGE2AST.pir
> *** glibc detected *** ../../parrot: double free or corruption
> (fasttop): 0x0823e328 ***
>
> running this through gdb, I get:
>
> bt
> #0  0xb7f41402 in __kernel_vsyscall ()
> #1  0xb6f77a85 in raise () from /lib/i686/nosegneg/libc.so.6
> #2  0xb6f794e1 in abort () from /lib/i686/nosegneg/libc.so.6
> #3  0xb6faf7dc in __libc_message () from /lib/i686/nosegneg/libc.so.6
> #4  0xb6fb7755 in _int_free () from /lib/i686/nosegneg/libc.so.6
> #5  0xb6fbb270 in free () from /lib/i686/nosegneg/libc.so.6
> #6  0xb7e75ad5 in read_macro (valp=0xbfc40c4c, interp=0x804f008,
>      yyscanner=0x8235678) at compilers/imcc/imcc.l:888
> #7  0xb7e71d71 in yylex (valp=0xbfc40c4c, yyscanner=0x8235678,
> interp=0x804f008)
>      at compilers/imcc/imcc.l:385
> #8  0xb7e6b85d in yyparse (yyscanner=0x8235678, interp=0x804f008)
>      at compilers/imcc/imcparser.c:2598
> #9  0xb7e7856a in compile_to_bytecode (interp=0x804f008,
>      sourcefile=0xbfc41bb5 "src/CPP_PGE2AST.pir",
>      output_file=0xbfc41b94 "src/CPP_PGE2AST.pbc") at compilers/imcc/
> main.c:960
> #10 0xb7e788f6 in imcc_run (interp=0x804f008,
>      sourcefile=0xbfc41bb5 "src/CPP_PGE2AST.pir", argc=1,
> argv=0xbfc40ec4)
>      at compilers/imcc/main.c:1060
> #11 0x0804896d in main (argc=1, argv=0xbfc40ec4) at src/main.c:62
>
> compilers/imcc/imcc.l:888 seems to be where it goes off the rails..
>
> IANACP, but there seems to be several calls to 'free(valp->s)' in
> that function that aren't careful about not freeing that pointer more
> than once.

Andy and I cleaned up a lot of these; can you reproduce it?

-- c

Reply via email to