Hello Pascal,

On Sun, 31 Mar 2019, Pascal Cuoq wrote:

With TCC from git (commit 9382a3a), the two following inputs vla0.i and
vla1.i each cause the message “error: internal compiler error: vstack leak”
to be printed. In addition, the input vla1.i makes TCC crash:

$ cat vla0.i
int X=1;

int main(void) {
  int t[][X];
}

Indeed, luckily this use of VLAs is invalid, so we can just diagnose it. The invalid vstack accesses you correctly diagnosed were the result of two paths within TCC disagreeing if the array size for '[]' was pushed or not (it wasn't but the VLA calculation assumed it was).

Fixed in mob. Your other report about the nested definition of a union leading to endless recursion is also fixed in mob, FYI.

Thanks for your reports again.


Ciao,
Michael.
_______________________________________________
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to