tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] Segmentation Faults and test failures on ARM (Raspbia


From: Thomas Preud'homme
Subject: Re: [Tinycc-devel] Segmentation Faults and test failures on ARM (Raspbian/Raspberry Pi)
Date: Mon, 21 Jan 2013 00:40:16 +0100
User-agent: KMail/1.13.7 (Linux/3.2.0-4-amd64; KDE/4.8.4; x86_64; ; )

Le dimanche 20 janvier 2013 04:28:16, Jerry Reed a écrit :
>  Built tiny cc from source at:
> 
> git clone git://repo.or.cz/tinycc.git
> 
> Using the Raspberry Pi with the Raspbian distro as the host and target.
> 
> OS is: Linux raspberrypi 3.1.9+ #168 PREEMPT Sat Jul 14 18:56:31 BST 2012
> armv6l GNU/Linux
> 
> gcc is: Using built-in specs.
> COLLECT_GCC=gcc
> COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/4.6/lto-wrapper
> Target: arm-linux-gnueabihf
> Configured with: ../src/configure -v --with-pkgversion='Debian
> 4.6.3-8+rpi1' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs
> --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr
> --program-suffix=-4.6 --enable-shared --enable-linker-build-id
> --with-system-zlib --libexecdir=/usr/lib --without-included-gettext
> --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6
> --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
> --enable-libstdcxx-debug --enable-libstdcxx-time=yes
> --enable-gnu-unique-object --enable-plugin --enable-objc-gc
> --disable-sjlj-exceptions --with-arch=armv6 --with-fpu=vfp
> --with-float=hard --enable-checking=release --build=arm-linux-gnueabihf
> --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf
> Thread model: posix
> gcc version 4.6.3 (Debian 4.6.3-8+rpi1)
> 
> tcc builds without apparent error.
> 
> I got as far as running the tests with
> 
> make test
> 
> but there is bad news there. Several things of concern occurred.
> 
> First, there were intermittent Segmentation Faults in several of the tests,
> like this:
> 
> address@hidden ~/tinycc $ make test
> make -C tests2 test
> make[1]: Entering directory `/home/pi/tinycc/tests2'
> Test: 00_assignment...
> Test: 01_comment...
> Test: 02_printf...
> Test: 03_struct...
> Test: 04_for...
> Test: 05_array...
> Test: 06_case...
> Test: 07_function...
> Test: 08_while...
> Test: 09_do_while...
> Test: 10_pointer...
> Test: 11_precedence...
> Test: 12_hashdefine...
> Test: 13_integer_literals...
> Segmentation fault
> 
> Sometimes this would happen, and sometimes the test would pass Ok and a
> subsequent test would fail. One math test failed consistently, not with a
> Segmentation fault, although without looking at the source code, I am not
> sure what this actually means.

Yeah this happened to me as well but I wasn't sure it came from tcc or not 
since the computer I was doing it got frozen at some point so I suspected a 
hardware fault. I'm not sure now but I think this didn't happen on the 
softfloat variant of the calling convention (TCC_ARM_HARDFLOAT not set) so 
since the hardfloat variant is new, I consider this not a blocker for the next 
release.


> 
> The stdio test was really odd. Basically it seems as if the getc and fgetc
> library routines don't correctly return what tcc expects for EOF, or the
> generated test in the while loop is faulty code. Code of the form:
> 
> f = fopen("fred.txt", "r");
> while ( (InChar = getc(f)) != EOF)
> {
> ShowChar = InChar;
> if (ShowChar < ' ')
> ShowChar = '.';
> printf("ch: %d '%c'\n", InChar, ShowChar);
> }
> fclose(f);
> 
> loops forever.

Same here, it never worked on the hardfloat variant but it works like a charm 
on the softflate. I should investigate this one as it's fully reproducible.

Thanks for your report.

Best regards,

Thomas Preud'homme

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

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