tinycc-devel
[Top][All Lists]
Advanced

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

[Tinycc-devel] 0.9.19 reliable crash (with code :)


From: Tom Morton
Subject: [Tinycc-devel] 0.9.19 reliable crash (with code :)
Date: Wed, 02 Jul 2003 15:13:06 +0000

Hello. I can crash tcc 0.9.19 with the following code:

#include <string.h>

typedef int my_string;
typedef char *char_star;

void crash_tcc (char_star my_string)
{
        int len = strlen(my_string);
}

Compiled with: tcc -c -o tcc_crash.o tcc_crash.c
Backtrace:

Program received signal SIGSEGV, Segmentation fault.
0x0804b93d in sym_push (v=0, type=0x80783d4, r=498, c=8) at tcc.c:1588
1588            s->prev_tok = *ps;
(gdb) bt
#0  0x0804b93d in sym_push (v=0, type=0x80783d4, r=498, c=8) at tcc.c:1588
#1  0x0804976a in gfunc_prolog (func_type=0xbffff2e0) at i386-gen.c:396
#2  0x0805684e in decl (l=240) at tcc.c:8567
#3  0x08056c70 in tcc_compile (s1=0x806adc8) at tcc.c:8721
#4  0x0805ec2c in tcc_add_file_internal (s1=0x806adc8, filename=0xbffffb97 
"tcc_crash.c", flags=1)
    at tcc.c:9321
#5  0x0805edd8 in tcc_add_file (s=0x806adc8, filename=0xbffffb97 "tcc_crash.c") 
at tcc.c:9379
#6  0x0805f925 in main (argc=5, argv=0xbffffa74) at tcc.c:9913
(gdb) 

:-)
-- 
Tom Morton (http://www.moretom.net)




reply via email to

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