tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Tinycc-devel] Lcc's yacc.c test crashes tcc


From: charlesrandall4-tinycc
Subject: [Tinycc-devel] Lcc's yacc.c test crashes tcc
Date: Fri, 11 May 2007 00:36:53 -0700 (PDT)

Running Rob's tcc release (tinycc-rl-1.0.0.tar.bz2) to against the Lcc 4.2 test suite, the yacc.c test crashes the tcc compiler.

Crash below. Input file attached. Has this been reported before?

Running valgrind against tcc while compiling yacc.c,

% valgrind tcc yacc.c
==7306== Memcheck, a memory error detector.
==7306== Copyright (C) 2002-2006, and GNU GPL'd, by Julian Seward et al.
==7306== Using LibVEX rev 1658, a library for dynamic binary translation.
==7306== Copyright (C) 2004-2006, and GNU GPL'd, by OpenWorks LLP.
==7306== Using valgrind-3.2.1, a dynamic binary instrumentation framework.
==7306== Copyright (C) 2000-2006, and GNU GPL'd, by Julian Seward et al.
==7306== For more details, rerun with: -v
==7306==
==7306== Invalid free() / delete / delete[]
==7306==    at 0x4004FDA: free (vg_replace_malloc.c:233)
==7306==    by 0x80495B8: (within /tmp/tcc/bin/tcc)
==7306==    by 0x8053678: (within /tmp/tcc/bin/tcc)
==7306==    by 0x8056E45: (within /tmp/tcc/bin/tcc)
==7306==    by 0x805B563: (within /tmp/tcc/bin/tcc)
==7306==    by 0x8056D5E: (within /tmp/tcc/bin/tcc)
==7306==    by 0x805B563: (within /tmp/tcc/bin/tcc)
==7306==    by 0x8056B98: (within /tmp/tcc/bin/tcc)
==7306==    by 0x8056FE9: (within /tmp/tcc/bin/tcc)
==7306==    by 0x805778A: (within /tmp/tcc/bin/tcc)
==7306==    by 0x8058DC8: (within /tmp/tcc/bin/tcc)
==7306==    by 0x805911A: (within /tmp/tcc/bin/tcc)
==7306==  Address 0x409E9F0 is 0 bytes inside a block of size 32 free'd
==7306==    at 0x4004FDA: free (vg_replace_malloc.c:233)
==7306==    by 0x80495B8: (within /tmp/tcc/bin/tcc)
==7306==    by 0x8053678: (within /tmp/tcc/bin/tcc)
==7306==    by 0x80564B6: (within /tmp/tcc/bin/tcc)
==7306==    by 0x805B791: (within /tmp/tcc/bin/tcc)
==7306==    by 0x805653D: (within /tmp/tcc/bin/tcc)
==7306==    by 0x8057302: (within /tmp/tcc/bin/tcc)
==7306==    by 0x8058DC8: (within /tmp/tcc/bin/tcc)
==7306==    by 0x805911A: (within /tmp/tcc/bin/tcc)
==7306==    by 0x805B1F3: (within /tmp/tcc/bin/tcc)
==7306==    by 0x664DEB: (below main) (in /lib/libc-2.5.so)
==7306==
==7306== Invalid free() / delete / delete[]
==7306==    at 0x4004FDA: free (vg_replace_malloc.c:233)
==7306==    by 0x80495B8: (within /tmp/tcc/bin/tcc)
==7306==    by 0x8053678: (within /tmp/tcc/bin/tcc)
==7306==    by 0x80511DF: (within /tmp/tcc/bin/tcc)
==7306==    by 0x805120C: (within /tmp/tcc/bin/tcc)
==7306==    by 0x805123C: (within /tmp/tcc/bin/tcc)
==7306==    by 0x8051280: (within /tmp/tcc/bin/tcc)
==7306==    by 0x80512B3: (within /tmp/tcc/bin/tcc)
==7306==    by 0x80512DB: (within /tmp/tcc/bin/tcc)
==7306==    by 0x8051303: (within /tmp/tcc/bin/tcc)
==7306==    by 0x805132B: (within /tmp/tcc/bin/tcc)
==7306==    by 0x805136E: (within /tmp/tcc/bin/tcc)
==7306==  Address 0x409E9F0 is 0 bytes inside a block of size 32 free'd
==7306==    at 0x4004FDA: free (vg_replace_malloc.c:233)
==7306==    by 0x80495B8: (within /tmp/tcc/bin/tcc)
==7306==    by 0x8053678: (within /tmp/tcc/bin/tcc)
==7306==    by 0x80564B6: (within /tmp/tcc/bin/tcc)
==7306==    by 0x805B791: (within /tmp/tcc/bin/tcc)
==7306==    by 0x805653D: (within /tmp/tcc/bin/tcc)
==7306==    by 0x8057302: (within /tmp/tcc/bin/tcc)
==7306==    by 0x8058DC8: (within /tmp/tcc/bin/tcc)
==7306==    by 0x805911A: (within /tmp/tcc/bin/tcc)
==7306==    by 0x805B1F3: (within /tmp/tcc/bin/tcc)
==7306==    by 0x664DEB: (below main) (in /lib/libc-2.5.so)
yacc.c:138: identifier expected
==7306==
==7306== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 14 from 1)
==7306== malloc/free: in use at exit: 50,188 bytes in 9 blocks.
==7306== malloc/free: 3,527 allocs, 3,520 frees, 431,157 bytes allocated.
==7306== For counts of detected errors, rerun with: -v
==7306== searching for pointers to 9 not-freed blocks.
==7306== checked 130,796 bytes.
==7306==
==7306== LEAK SUMMARY:
==7306==    definitely lost: 1,024 bytes in 1 blocks.
==7306==      possibly lost: 0 bytes in 0 blocks.
==7306==    still reachable: 49,164 bytes in 8 blocks.
==7306==         suppressed: 0 bytes in 0 blocks.
==7306== Use --leak-check=full to see details of leaked memory.



 
Charles F. Randall, IV
address@hidden (always forwarded)


% tcc yacc.c
*** glibc detected *** tcc: double free or corruption (fasttop): 0x092d79e8 ***
======= Backtrace: =========
/lib/libc.so.6[0x6b4f5d]
/lib/libc.so.6(cfree+0x90)[0x6b85b0]
tcc[0x80495b9]
tcc[0x8053679]
tcc[0x8056e46]
tcc[0x805b564]
tcc[0x8056d5f]
tcc[0x805b564]
tcc[0x8056b99]
tcc[0x8056fea]
tcc[0x805778b]
tcc[0x8058dc9]
tcc[0x805911b]
tcc[0x805b1f4]
/lib/libc.so.6(__libc_start_main+0xdc)[0x664dec]
tcc[0x8048c91]
======= Memory map: ========
0061b000-00626000 r-xp 00000000 fd:00 821023     /lib/libgcc_s-4.1.1-20070105.so.1
00626000-00627000 rwxp 0000a000 fd:00 821023     /lib/libgcc_s-4.1.1-20070105.so.1
0062d000-00646000 r-xp 00000000 fd:00 366418     /lib/ld-2.5.so
00646000-00647000 r-xp 00018000 fd:00 366418     /lib/ld-2.5.so
00647000-00648000 rwxp 00019000 fd:00 366418     /lib/ld-2.5.so
0064f000-00786000 r-xp 00000000 fd:00 591029     /lib/libc-2.5.so
00786000-00788000 r-xp 00137000 fd:00 591029     /lib/libc-2.5.so
00788000-00789000 rwxp 00139000 fd:00 591029     /lib/libc-2.5.so
00789000-0078c000 rwxp 00789000 00:00 0
0078e000-007b3000 r-xp 00000000 fd:00 591036     /lib/libm-2.5.so
007b3000-007b4000 r-xp 00024000 fd:00 591036     /lib/libm-2.5.so
007b4000-007b5000 rwxp 00025000 fd:00 591036     /lib/libm-2.5.so
007b7000-007b9000 r-xp 00000000 fd:00 591030     /lib/libdl-2.5.so
007b9000-007ba000 r-xp 00001000 fd:00 591030     /lib/libdl-2.5.so
007ba000-007bb000 rwxp 00002000 fd:00 591030     /lib/libdl-2.5.so
008bb000-008bc000 r-xp 008bb000 00:00 0          [vdso]
08048000-08061000 r-xp 00000000 fd:00 655850     /tmp/tcc/bin/tcc
08061000-08062000 rw-p 00018000 fd:00 655850     /tmp/tcc/bin/tcc
08062000-0806c000 rw-p 08062000 00:00 0
092c3000-09304000 rw-p 092c3000 00:00 0
b7e00000-b7e21000 rw-p b7e00000 00:00 0
b7e21000-b7f00000 ---p b7e21000 00:00 0
b7f1d000-b7f1f000 rw-p b7f1d000 00:00 0
bfd6b000-bfd80000 rw-p bfd6b000 00:00 0          [stack]
Aborted


Attachment: yacc.c
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]