[Top][All Lists]

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

Re: [Tinycc-devel] A stack-overflow in tinycc-f150f93/tccpp.c

From: Christian Jullien
Subject: Re: [Tinycc-devel] A stack-overflow in tinycc-f150f93/tccpp.c
Date: Mon, 30 Dec 2019 06:12:36 +0100

I once wrote a C++ program using a huge constexpr std::array having a lot a 
ctor (also constexpr). Gcc miserably failed with a core dump after more than 
1mn of compilation.
In a sense, tcc is gcc compatible :o)


-----Original Message-----
From: Tinycc-devel [mailto:tinycc-devel-bounces+eligis=address@hidden] On 
Behalf Of Pascal Cuoq
Sent: Monday, December 30, 2019 05:51
To: address@hidden
Subject: Re: [Tinycc-devel] A stack-overflow in tinycc-f150f93/tccpp.c


> On 29 Dec 2019, at 23:31, Daniel Glöckner <address@hidden> wrote:
> Adding recursion depth limitation into all cycles of this graph is a
> lot of work. 

It would also be counter-productive. Currently it takes a single ulimit command 
to compile a larger-than-usual program, but if tcc enforced its own limits 
there would be several settings to tweak.

I don't know any compiler that does not stack overflow on sufficiently large 
inputs. Tcc is only structured in a way that a dumb fuzzer can find an input 
that produces this behavior by just repeating the character *. This does not 
sound like a security issue, or even an issue.

Tinycc-devel mailing list

reply via email to

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