Hello,
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:
pascal@TrustInSoft-Box-VII:~/tcc-bin$ cat crash.i
void f(char*);
void g(void) {
f((char[]){,});
}
pascal@TrustInSoft-Box-VII:~/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:
pascal@TrustInSoft-Box-VII:~/tcc-bin$ clang -c crash.i
crash.i:4:14: error: expected expression
f((char[]){,});
^
1 error generated.
pascal@TrustInSoft-Box-VII:~/tcc-bin$ gcc -c crash.i
crash.i: In function 'g':
crash.i:4:14: error: expected expression before ',' token
f((char[]){,});
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
files.
_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel