[Top][All Lists]

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

[Tinycc-devel] possible bug of tinycc (AMD64) on huge generated C source

Subject: [Tinycc-devel] possible bug of tinycc (AMD64) on huge generated C source [MELT branch of GCC]
Date: Tue, 10 Nov 2009 17:30:14 +0100
User-agent: Mozilla-Thunderbird (X11/20090701)

Hello All

I probably encountered a possible bug of tinycc (on debian linux sid amd64, Intel Core2 Quad CPU Q9550 @ 2.83GHz, 2.6.31 kernel, 8Gb RAM) with either the official 0.9.25 or the latest git of tinycc.

The behavior of the generated *.so is different when compiled with tcc or when compiled with gcc-4.2, gcc-4.3, gcc-4.4, latest gcc-trunk 4.5.0 20091108, latest clang 1.1 (trunk 86296)... When running (i.e. dlopen-ing) the *.so generated by tcc, there is SIGSEGV which does not occur with the same *.so compiled by other cited compilers. So I am strongly suspecting tinycc.

The source code I am compiling is big. It is GPLv3 free software, FSF copyrighted. It is my MELT branch of GCC. It is a file of 160KLOC or 180KLOC of generated C code (gcc/melt/warmelt-normal-0.c)


The idea of MELT is to provide a Lisp dialect specialized for coding GCC plugins, translated into C code suitable for GCC internals. And the MELT translator is bootstrapped, so is coded in MELT (files warmelt*.melt) and generates itself (files warmelt*.c): so warmelt*0.c files are in the source repository. They are compiled into warmelt*0.so files. These files are dlopen-ed by cc1 to generate the warmelt*1.c files in the build tree from the warmelt*.melt file of the source tree. These warmelt*1.c files are compiled into warmelt*1.so files, which are dlopen-ed by cc1 to generated warmelt*2.c. Again, these are compiled into warmelt*2.so. etc.

To reproduce the bug.

Fetch the MELT branch, configure it, build it with GCC (unless you think that tinycc is able to compile GCC). It take time (possibly several hours). The build should go well, and it did run the cc1 dlopen-ing the warmelt*.so to generate eg the warmelt*2.c & warmelt*3.c from the warmelt*melt files.

To make tinycc generate faulty code.

remove all the warmelt*.* files in the build directory of MELT.

Set the GCCMELT_CC environment variable to your tcc path.

Re-run make.

I am really too lazy to try to reduce that big case to something manageable, so I would understand that nobody from the TinyCC community cares about it. If you dare investigating that, I will happily answer questions.


Basile STARYNKEVITCH         http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mines, sont seulement les miennes} ***

reply via email to

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