tinycc-devel
[Top][All Lists]
Advanced

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

[Tinycc-devel] Segmentation fault at tcc.c:5384 ( tcc-0.9.19 )


From: some one
Subject: [Tinycc-devel] Segmentation fault at tcc.c:5384 ( tcc-0.9.19 )
Date: Thu, 12 Jun 2003 15:22:09 -0700 (PDT)

tcc Segmentation fault when I try to compile a very
large file (generated by SmartEiffel).

I was unable to isolate the bug, but it seems at file 
tcc.c(:5384)        if (vtop->r & VT_MUSTCAST) {

(vtop == NULL) is not checked:

(gdb) print vtop
$1 = (struct SValue *) 0x0

here is the stack, hope it helps.

Thanks.

-------------------------------------------------------
Program received signal SIGSEGV, Segmentation fault.
0x0804f923 in gen_cast (type=0xbfffe6ec) at tcc.c:5384
5384        if (vtop->r & VT_MUSTCAST) {
(gdb) where
#0  0x0804f923 in gen_cast (type=0xbfffe6ec) at
tcc.c:5384
#1  0x0804f4fd in gen_op (op=1) at tcc.c:5287
#2  0x0804f902 in force_charshort_cast (t=-1073748300)
at tcc.c:5370
#3  0x0804fb2d in gen_cast (type=0xbfffe998) at
tcc.c:5513
#4  0x08050150 in gen_assign_cast (dt=0xbfffe998) at
tcc.c:5807
#5  0x080531f0 in init_putv (type=0x84c2e04,
sec=0x80703e0, c=41605, v=0,
    expr_type=-1073748300) at tcc.c:7856
#6  0x08053927 in decl_initializer (type=0xc,
sec=0x80703e0, c=41593,
    first=138982680, size_only=0) at tcc.c:7996
#7  0x08053b6b in decl_initializer_alloc
(type=0xbfffeab8, ad=0xbfffeae0,
    r=240, has_init=2, v=0, scope=0) at tcc.c:8319
#8  0x08051bfa in unary () at tcc.c:6719
#9  0x08051da5 in uneq () at tcc.c:7014
#10 0x08051e25 in expr_prod () at tcc.c:7037
#11 0x08051e75 in expr_sum () at tcc.c:7050
#12 0x08051eb9 in expr_shift () at tcc.c:7063
#13 0x08051ef9 in expr_cmp () at tcc.c:7076
#14 0x08051f61 in expr_cmpeq () at tcc.c:7090
#15 0x08051fa4 in expr_and () at tcc.c:7101
#16 0x08051fd8 in expr_xor () at tcc.c:7111
#17 0x0805200c in expr_or () at tcc.c:7121
#18 0x080520b9 in expr_land () at tcc.c:7156
#19 0x08052109 in expr_lor () at tcc.c:7175
#20 0x080521d5 in expr_eq () at tcc.c:7217
#21 0x08051521 in unary () at tcc.c:6983
#22 0x08051da5 in uneq () at tcc.c:7014
#23 0x08051e25 in expr_prod () at tcc.c:7037
#24 0x08051e75 in expr_sum () at tcc.c:7050
#25 0x08051eb9 in expr_shift () at tcc.c:7063
#26 0x08051ef9 in expr_cmp () at tcc.c:7076
#27 0x08051f61 in expr_cmpeq () at tcc.c:7090
#28 0x08051fa4 in expr_and () at tcc.c:7101
#29 0x08051fd8 in expr_xor () at tcc.c:7111
#30 0x0805200c in expr_or () at tcc.c:7121
#31 0x080520b9 in expr_land () at tcc.c:7156
#32 0x08052109 in expr_lor () at tcc.c:7175
---Type <return> to continue, or q <return> to quit---
#33 0x080521d5 in expr_eq () at tcc.c:7217
#34 0x08051521 in unary () at tcc.c:6983
#35 0x08051da5 in uneq () at tcc.c:7014
#36 0x08051e25 in expr_prod () at tcc.c:7037
#37 0x08051e75 in expr_sum () at tcc.c:7050
#38 0x08051eb9 in expr_shift () at tcc.c:7063
#39 0x08051ef9 in expr_cmp () at tcc.c:7076
#40 0x08051f61 in expr_cmpeq () at tcc.c:7090
#41 0x08051fa4 in expr_and () at tcc.c:7101
#42 0x08051fd8 in expr_xor () at tcc.c:7111
#43 0x0805200c in expr_or () at tcc.c:7121
#44 0x080520b9 in expr_land () at tcc.c:7156
#45 0x08052109 in expr_lor () at tcc.c:7175
#46 0x080521d5 in expr_eq () at tcc.c:7217
#47 0x08051e19 in uneq () at tcc.c:7023
#48 0x08051e25 in expr_prod () at tcc.c:7037
#49 0x08051e75 in expr_sum () at tcc.c:7050
#50 0x08051eb9 in expr_shift () at tcc.c:7063
#51 0x08051ef9 in expr_cmp () at tcc.c:7076
#52 0x08051f61 in expr_cmpeq () at tcc.c:7090
#53 0x08051fa4 in expr_and () at tcc.c:7101
#54 0x08051fd8 in expr_xor () at tcc.c:7111
#55 0x0805200c in expr_or () at tcc.c:7121
#56 0x080520b9 in expr_land () at tcc.c:7156
#57 0x08052109 in expr_lor () at tcc.c:7175
#58 0x080521d5 in expr_eq () at tcc.c:7217
#59 0x0805242d in gexpr () at tcc.c:7314
#60 0x0805271a in block (bsym=0x0, csym=0x0,
case_sym=0x0, def_sym=0x0,
    case_reg=0, is_expr=0) at tcc.c:7689
#61 0x08052cf7 in block (bsym=0x0, csym=0x0,
case_sym=0x0, def_sym=0x0,
    case_reg=0, is_expr=0) at tcc.c:7469
#62 0x08054362 in decl (l=240) at tcc.c:8574
#63 0x08054605 in tcc_compile (s1=0x8065b28) at
tcc.c:8721
#64 0x0805a552 in tcc_add_file_internal (s1=0x8065b28,
    filename=0xbffff871 "test.c", flags=1) at
tcc.c:9321
#65 0x0805a68c in tcc_add_file (s=0x8065b28,
---Type <return> to continue, or q <return> to quit---
    filename=0xbffff871 "test.c") at tcc.c:9379
#66 0x0805aeb7 in main (argc=4, argv=0xbffff6f4) at
tcc.c:9913
#67 0x420158d4 in __libc_start_main () from
/lib/i686/libc.so.6
(gdb)



__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com




reply via email to

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