tinycc-devel
[Top][All Lists]
Advanced

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

[Tinycc-devel] Segmentation Faults and test failures on ARM (Raspbian/Ra


From: Jerry Reed
Subject: [Tinycc-devel] Segmentation Faults and test failures on ARM (Raspbian/Raspberry Pi)
Date: Sat, 19 Jan 2013 22:28:16 -0500

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.

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.

These problems occurred whether or not I built with the --with-libgcc flag to configure.

Same repository builds and passes all tests correctly on:

OS: Linux yffulf 3.2.0-29-generic-pae #46-Ubuntu SMP Fri Jul 27 17:25:43 UTC 2012 i686 i686 i386 GNU/Linux

gcc: Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-linux-gnu/4.6/lto-wrapper
Target: i686-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.3-1ubuntu5' --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 --enable-targets=all --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=i686-linux-gnu
Thread model: posix
gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)

So it looks as if this is something in the ARM version?  Any suggestions for how I might get more information on this problem? Thanks.

--
Interested in bats?  Check out my blog at: http://www.karaokebats.com/
reply via email to

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