[Top][All Lists]

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

[Tinycc-devel] TCC crash with incorrect syntax in compound literal

From: Pascal Cuoq
Subject: [Tinycc-devel] TCC crash with incorrect syntax in compound literal
Date: Wed, 6 Feb 2019 12:59:44 +0000


as a side-product of working on something else, I found that TCC 0.9.27 (x86_64 
Linux) crashes for me on the following program:

address@hidden:~/tcc-bin$ cat crash.i
void f(char*);

void g(void) {
address@hidden:~/tcc-bin$ bin/tcc crash.i
crash.i:4: warning: assignment makes integer from pointer without a cast
crash.i:4: warning: nonportable conversion from pointer to char/short
crash.i:4: warning: assignment from incompatible pointer type
Erreur de segmentation

The program crash.i is of course syntactically incorrect:

address@hidden:~/tcc-bin$ clang -c crash.i
crash.i:4:14: error: expected expression
1 error generated.
address@hidden:~/tcc-bin$ gcc -c crash.i
crash.i: In function 'g':
crash.i:4:14: error: expected expression before ',' token

However crash.i is close enough to a program that someone may accidentally 
write that TCC developers may be interested in making TCC reject it gracefully. 
The page https://bellard.org/tcc/tcc-doc.html#ISOC99-extensions lists compound 
literals as supported, so the program even has invalid syntax while trying to 
use a feature that TCC supports.

Should I report this crash, or any other TCC crash that I will find in the 
future, to http://savannah.nongnu.org/bugs/?group=tinycc ? I should emphasize 
that I have no interest in compiling this or future programs with TCC. There is 
no urgency to these reports, and I can also not do them at all if there is no 
interest in ensuring that TCC does not crash on mechanically produced input 

reply via email to

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