[Top][All Lists]

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

Re: [Tinycc-devel] "internal compiler error: vstack leak" and crash with

From: Michael Matz
Subject: Re: [Tinycc-devel] "internal compiler error: vstack leak" and crash with VLA of incomplete type
Date: Sun, 7 Apr 2019 04:21:10 +0200 (CEST)
User-agent: Alpine 2.21 (LSU 202 2017-01-01)

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.


reply via email to

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