strange "fatal errors" with Boost.Test

Dear boost experts,
while adding regression tests to my project I experience very strange
errors. I am using boost 1.40 and g++ 4.4 as packaged in Debian
testing.
The problem is that a very simple test suite, one which does almost
nothing, produces the following runtime error:
################################################################
cwg@argo:/tmp/lg-bug$ ./test_all
Running 1 test case...
unknown location(0): fatal error in "sq_dist": signal: illegal operand; address of failing instruction: 0x00410106
*** 1 failure detected in test suite "lg"
################################################################
A quite minimal program which allows me to reproduce the bug is available from
http://ilorentz.org/~cwg/lg-bug.tar.gz
This is how I can reproduce it on any of my two Debian testing systems.
The problem does not appear on an Ubuntu system to which I have access
(with boost 1.38, but I do not think that this problem is specific to
some boost version).
################################################################
cwg@argo:/tmp$ wget -q http://ilorentz.org/~cwg/lg-bug.tar.gz
cwg@argo:/tmp$ tar xfz lg-bug.tar.gz
cwg@argo:/tmp$ cd lg-bug/
cwg@argo:/tmp/lg-bug$ g++ -g -o test_all test_glass.cc glass.cc
cwg@argo:/tmp/lg-bug$ gdb test_all
GNU gdb (GDB) 7.0.1-debian
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/...
Reading symbols from /tmp/lg-bug/test_all...done.
(gdb) run
Starting program: /tmp/lg-bug/test_all
Running 1 test case...
Program received signal SIGILL, Illegal instruction.
0x0000000000410106 in boost::itest::expectations_logger::data_flow (this=Cannot access memory at address 0x3fdffffffffffe38
) at /usr/include/boost/test/impl/logged_expectations.ipp:188
188 BOOST_CHECK_EQUAL( *tit, DATA_SIG ); ++tit;
(gdb) bt
#0 0x0000000000410106 in boost::itest::expectations_logger::data_flow (this=Cannot access memory at address 0x3fdffffffffffe38
) at /usr/include/boost/test/impl/logged_expectations.ipp:188
Cannot access memory at address 0x3fe0000000000008
################################################################
The test case (file test_glass.cc) is just:
################################################################
#define BOOST_TEST_MODULE lg
#include

Christoph Groth
Dear boost experts,
while adding regression tests to my project I experience very strange errors. I am using boost 1.40 and g++ 4.4 as packaged in Debian testing.
Program received signal SIGILL, Illegal instruction. 0x0000000000410106 in boost::itest::expectations_logger::data_flow
(this=Cannot access memory at
address 0x3fdffffffffffe38 ) at /usr/include/boost/test/impl/logged_expectations.ipp:188 188 BOOST_CHECK_EQUAL( *tit, DATA_SIG ); ++tit; (gdb) bt #0 0x0000000000410106 in boost::itest::expectations_logger::data_flow (this=Cannot access memory at address 0x3fdffffffffffe38 ) at /usr/include/boost/test/impl/logged_expectations.ipp:188 Cannot access memory at address 0x3fe0000000000008 ################################################################
The test case (file test_glass.cc) is just: ################################################################ #define BOOST_TEST_MODULE lg #include
#include "defs.hh" #include "glass.hh"
BOOST_AUTO_TEST_CASE(sq_dist) { Levy::Vecd a(2, 1); Levy::Glass sys(Levy::Vecd(1, 1), Levy::Vecb(true, true)); }
This makes no sense. Your test program does not refer to the itest facilities. There is single testing tool involved as well. Something seriously screwing up the stack. Can you try to go step by step in the debugger? Can you also try build UTF as external library? Gennadiy

Gennadiy Rozental
This makes no sense. Your test program does not refer to the itest facilities. There is single testing tool involved as well. Something seriously screwing up the stack.
Can you try to go step by step in the debugger?
I did. The stack gets corrupted when returning from
cfc::operator/
Can you also try build UTF as external library?
What would that help? The error also appears when I link dynamically
against the library provided in Debian (only the backtrace is less
useful).
Thanks,
Christoph
The gdb backtrace:
################################################################
(gdb) br tiny_vector.hh:185
Breakpoint 1 at 0x47d56e: file tiny_vector.hh, line 185.
(gdb) run
Starting program: /tmp/lg-bug/test_all
Running 1 test case...
Breakpoint 1, cfc::operator/
participants (2)
-
Christoph Groth
-
Gennadiy Rozental