This is the mail archive of the
libffi-discuss@sourceware.org
mailing list for the libffi project.
Re: how to run the testsuite
- From: Sebastian Reitenbach <sebastia at l00-bugdead-prods dot de>
- To: andreast-list at fgznet dot ch
- Cc: libffi-discuss at sourceware dot org
- Date: Tue, 16 Dec 2008 07:34:02 +0100
- Subject: Re: how to run the testsuite
- Reply-to: Sebastian Reitenbach <sebastia at l00-bugdead-prods dot de>
Andreas Tobler <andreast-list@fgznet.ch> wrote:
> Sebastian Reitenbach wrote:
>
> > The trick with the alias did not worked, therefore I copied the gcc out
of the
> > way, and created a symlink to egcc where the gcc was before.
> >
> > Now running make check produces 8 instead of 9 unexpected failures:
> >
> > === libffi Summary ===
> >
> > # of expected passes 1373
> > # of unexpected failures 8
> > # of unsupported tests 15
> > *** Error code 1
> >
> > log file attached.
>
> Fine, having a look at the log file tells me that the attribute thing
> has gone.
> The failure is now in the executing step of the test case.
> Here you have to take gdb at hand to find out more.
OK, I compiled one of the tests:
gcc
/usr/ports/devel/libffi/w-libffi-3.0.7/libffi-3.0.7/testsuite/libffi.special/unwindtest.cc
-shared-libgcc -lstdc++ -O0 -W -Wall
-I/usr/ports/devel/libffi/w-libffi-3.0.7/libffi-3.0.7/testsuite/../include
-I/usr/ports/devel/libffi/w-libffi-3.0.7/libffi-3.0.7/testsuite/../include
-I/usr/ports/devel/libffi/w-libffi-3.0.7/libffi-3.0.7/testsuite/../include/..
-L/usr/ports/devel/libffi/w-libffi-3.0.7/libffi-3.0.7/testsuite/../.libs -lffi
-lm -o ./unwindtest.exe
ldd unwindtest.exe
unwindtest.exe:
Start End Type Open Ref GrpRef Name
0000000000000000 0000000000000000 exe 1 0 0
unwindtest.exe
0000000040f10000 00000000415b4000 rlib 0 1
0 /usr/local/lib/libestdc++.so.7.0
000000004da1c000 000000004e020000 rlib 0 1
0
/usr/ports/devel/libffi/w-libffi-3.0.7/libffi-3.0.7/testsuite/../.libs/libffi.so.5.8
00000000489d4000 0000000048ffe000 rlib 0 2
0 /usr/lib/libm.so.2.3
0000000041d88000 0000000042474000 rlib 0 2
0 /usr/lib/libc.so.43.0
0000000040900000 0000000040900000 rtld 0 1
0 /usr/libexec/ld.so
libestdc++.so.7.0 is the c++ library that comes with gcc-4.2.
I did had to include /usr/local/lib in the LD_LIBRARY_PATH and I moved the
system cpp and g++ out of the way to make sure the eg++ and ecpp from the
gcc-4.2 are used. Otherwise an ldd showed the unwindtest.exe linked against
the system libstdc++ in /usr/lib.
>
> Try with the -O0 tests. Build one of them and run it with gdb. This
> should tell you what is happening.
# gdb unwindtest.exe
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "sparc64-unknown-openbsd4.3"...(no debugging
symbols found)
(gdb) r
Starting
program: /usr/ports/devel/libffi/w-libffi-3.0.7/libffi-3.0.7/unwindtest.exe
terminate called after throwing an instance of 'int'
terminate called recursively
Program received signal SIGABRT, Aborted.
abort () at /usr/src/lib/libc/stdlib/abort.c:74
74 /usr/src/lib/libc/stdlib/abort.c: No such file or directory.
in /usr/src/lib/libc/stdlib/abort.c
(gdb) bt
#0 abort () at /usr/src/lib/libc/stdlib/abort.c:74
#1 0x000000004723c344 in __gnu_cxx::__verbose_terminate_handler() ()
at
/usr/ports/lang/gcc/4.2/w-gcc-4.2.20070307/gcc-4.2-20070307/libstdc++-v3/libsupc++/vterminate.cc:53
#2 0x00000000472399cc in __cxxabiv1::__terminate(void (*)())
(handler=0x4723c200 <__gnu_cxx::__verbose_terminate_handler()>)
at
/usr/ports/lang/gcc/4.2/w-gcc-4.2.20070307/gcc-4.2-20070307/libstdc++-v3/libsupc++/eh_terminate.cc:43
#3 0x0000000047239a24 in std::terminate() ()
at
/usr/ports/lang/gcc/4.2/w-gcc-4.2.20070307/gcc-4.2-20070307/libstdc++-v3/libsupc++/eh_terminate.cc:53
#4 0x0000000047239b30 in __cxa_rethrow ()
at
/usr/ports/lang/gcc/4.2/w-gcc-4.2.20070307/gcc-4.2-20070307/libstdc++-v3/libsupc++/eh_throw.cc:109
#5 0x000000004723c314 in __gnu_cxx::__verbose_terminate_handler() ()
at
/usr/ports/lang/gcc/4.2/w-gcc-4.2.20070307/gcc-4.2-20070307/libstdc++-v3/libsupc++/vterminate.cc:83
#6 0x00000000472399cc in __cxxabiv1::__terminate(void (*)())
(handler=0x4723c200 <__gnu_cxx::__verbose_terminate_handler()>)
at
/usr/ports/lang/gcc/4.2/w-gcc-4.2.20070307/gcc-4.2-20070307/libstdc++-v3/libsupc++/eh_terminate.cc:43
#7 0x0000000047239a24 in std::terminate() ()
at
/usr/ports/lang/gcc/4.2/w-gcc-4.2.20070307/gcc-4.2-20070307/libstdc++-v3/libsupc++/eh_terminate.cc:53
#8 0x0000000047239bcc in __cxa_throw (obj=0x415da070, tinfo=0x7025d0,
dest=0)
at
/usr/ports/lang/gcc/4.2/w-gcc-4.2.20070307/gcc-4.2-20070307/libstdc++-v3/libsupc++/eh_throw.cc:76
#9 0x00000000001018d4 in closure_test_fn(ffi_cif*, void*, void**, void*) ()
#10 0x000000004425eb38 in ffi_closure_sparc_inner_v9 (closure=0x49e4e000,
rvalue=0xffffffffffff89d0, gpr=0xffffffffffff8af0, fpr=0xffffffffffff89f0)
at src/sparc/ffi.c:606
#11 0x000000004425f318 in ffi_closure_v9 ()
from
/usr/ports/devel/libffi/w-libffi-3.0.7/libffi-3.0.7/testsuite/../.libs/libffi.so.5.8
#12 0x0000000000101048 in main ()
(gdb) list vterminate.cc:53
48 {
49 static bool terminating;
50 if (terminating)
51 {
52 fputs("terminate called recursively\n", stderr);
53 abort ();
54 }
55 terminating = true;
56
57 // Make sure there was an exception; terminate is also called
for an
(gdb) list eh_terminate.cc:43
38
39 void
40 __cxxabiv1::__terminate (std::terminate_handler handler)
41 {
42 try {
43 handler ();
44 std::abort ();
45 } catch (...) {
46 std::abort ();
47 }
(gdb) list eh_throw.cc:109
104 #endif
105
106 // Some sort of unwinding error. Note that terminate is a
handler.
107 __cxa_begin_catch (&header->unwindHeader);
108 }
109 std::terminate ();
110 }
(gdb)
Unfortunately, my c++ skills are not well developed, but terminate seems to
be called recursively and that seems to be a problem?
kind regards
Sebastian