[Top][All Lists]

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

Re: [Tinycc-devel] Bug in tcc

From: Bernhard Fischer
Subject: Re: [Tinycc-devel] Bug in tcc
Date: Wed, 28 Sep 2005 21:08:42 +0200
User-agent: Mutt/1.5.9i

On Wed, Sep 28, 2005 at 08:41:28PM +0200, Bernhard Fischer wrote:
>On Wed, Sep 28, 2005 at 09:36:02AM +0200, Sven Oliver Moll wrote:
>>On Wed, 28 Sep 2005, PerfectDark wrote:
>>>>>>Just try to compile (tcc -c) following file:
>>>>>>void foo(SomethingUnknownType* x)
>>>May be all that bugs (see my next ask in list) because I use non-patched 
>>>tcc (tcc-0.9.23), or windows version has something bug...
>>>Even though I could compile tcc by tcc and simple windows applications 
>>>(GDI and console). Tcc crushes if it meet that code (see my question).
>>>If you know how I can fix it, tell me please.
>Can you try the attached patch, please an let me know if it fixed that
>particular thing?

erm, no. I thought that 0.9.23 had a plain tokcstr there, but it hasn't.

what does 'bt' say for the segfault below?

>>(gdb) run -c foo.c
>>Starting program: /home/svolli/tcc/tcc-0.9.23/tcc -c foo.c
>>Program received signal SIGSEGV, Segmentation fault.
>>0x0804bc2f in sym_push (v=42, type=0x80804ac, r=498, c=12) at tcc.c:1766
>>1766            s->prev_tok = *ps;
>>(gdb) quit
>>The program is running.  Exit anyway? (y or n) y
>>$ cat foo.c
>>void foo(unknown *x)
>>I'd say that ps is NULL in this case, but that's a rough guess.
>>Hope this helps.
>>Greetings from Germany,
>>|  _______       |
>>| (  /\          | There's no feeling any greater
>>|__)v\/lli a.k.a.| Than to shoot first and ask questions later
>>|Sven Oliver Moll|   -- "Weird Al" Yankovic, "Trigger Happy"

>diff -rup tinycc.oorig/tcc.c tinycc.tmp/tcc.c
>--- tinycc.oorig/tcc.c 2005-09-05 23:04:12.000000000 +0200
>+++ tinycc.tmp/tcc.c   2005-09-28 20:38:40.000000000 +0200
>@@ -1452,7 +1452,8 @@ void warning(const char *fmt, ...)
> void skip(int c)
> {
>     if (tok != c)
>-        error("'%c' expected", c);
>+        error("syntax error before %c token. '%c' expected but saw \"%s\"",
>+              tok, c, tokcstr.data);
>     next();
> }

reply via email to

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