[prev in list] [next in list] [prev in thread] [next in thread] 

List:       perl6-internals
Subject:    [perl #47978] [C99] [IMCC] double free
From:       Will Coleda (via RT) <parrotbug-followup () parrotcode ! org>
Date:       2007-11-30 4:34:17
Message-ID: rt-3.6.HEAD-28750-1196397257-1269.47978-72-0 () perl ! org
[Download RAW message or body]

# New Ticket Created by  Will Coleda 
# Please include the string:  [perl #47978]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=47978 >


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.

--
Will "Coke" Coleda
will@coleda.com


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic