tinycc-devel
[Top][All Lists]
Advanced

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

[Tinycc-devel] Segment fault with invalid array initialization


From: Zhuo Zhang
Subject: [Tinycc-devel] Segment fault with invalid array initialization
Date: Tue, 16 Feb 2021 20:57:53 +0000

Hi,


Following code triggers a segment fault on tinycc mob 
(5201312cb242ea943848fcf864adacc44d3d190f) on ubuntu 18.04 x86-64.

It seems that the bug is introduced by 
355897a9203661b5f54dbb634294a66ceef17ae6, without considering the size of a.

$ cat test.c
extern int a;
int a[] = {};

$ ./tcc -c -o tcc.o test.c
[1]    41230 segmentation fault (core dumped)  ./tcc -c -o tcc.o test.c


reply via email to

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