|
From: | Pascal Cuoq |
Subject: | [Tinycc-devel] unbounded recursion and crash on invalid nested union declaration |
Date: | Sun, 31 Mar 2019 12:39:11 +0000 |
Hello,
On the following (invalid) C program, tcc goes into an unbounded recursion, and crashes when it exhausts the space allowed for the stack. I tried to make a valid C program with the same property, which would be a more interesting bug report, but
I couldn't find one.
Pascal
________
$ cat cr.i
union u {
union u { };
};
$ gcc -c cr.i
cr.i:2:9:
error:
nested redefinition of 'union u'
union u { };
^
cr.i:2:14:
warning:
declaration does not declare anything
union u { };
^
$ clang -c cr.i
cr.i:2:9:
error:
nested redefinition of 'u'
union u { };
^
cr.i:1:7: note:
previous definition is here
union u {
^
1 error generated.
$ ./tcc -c cr.i
Segmentation fault
$
|
[Prev in Thread] | Current Thread | [Next in Thread] |