Re: [Tinycc-devel] Use of uninitalized automatic variable in TCC when parsing “int f ( int ( )”

2019-03-12 Thread Michael Matz
Hello Pascal, On Fri, 8 Mar 2019, Pascal Cuoq wrote: > the simplest way to make this problem visible is to instrument the > functions type_decl and post_type: Thanks for the report, fixed in mob. Ciao, Michael. > > diff --git a/tccgen.c b/tccgen.c > index 87ec798..7fa6c72 100644 > --- a/tcc

Re: [Tinycc-devel] Use of uninitalized automatic variable in TCC when parsing “int f ( int ( )”

2019-03-09 Thread Pascal Cuoq
Finally, adding one more bit of instrumentation shows that TCC can crash because of the uninitialized variable being discussed in this thread. On 08 Mar 2019, at 20:06, Pascal Cuoq mailto:c...@trust-in-soft.com>> wrote: the simplest way to make this problem visible is to instrument the function

Re: [Tinycc-devel] Use of uninitalized automatic variable in TCC when parsing “int f ( int ( )”

2019-03-09 Thread Pascal Cuoq
Update: I have found an input that is accepted by GCC, accepted by Clang, and that makes TCC use the variable n uninitialized in function post_type. On 08 Mar 2019, at 20:06, Pascal Cuoq mailto:c...@trust-in-soft.com>> wrote: the simplest way to make this problem visible is to instrument the fu

[Tinycc-devel] Use of uninitalized automatic variable in TCC when parsing “int f ( int ( )”

2019-03-08 Thread Pascal Cuoq
Hello, the simplest way to make this problem visible is to instrument the functions type_decl and post_type: diff --git a/tccgen.c b/tccgen.c index 87ec798..7fa6c72 100644 --- a/tccgen.c +++ b/tccgen.c @@ -4374,7 +4374,7 @@ static int post_type(CType *type, AttributeDef *ad, int storage, int td