Bugzilla – Bug 490
unalignedassert fails with gcc 4.7 32Bit
Last modified: 2014-11-03 00:41:54 UTC
both the current development version and 3.0.6
fail the unalignedassert test when compiled
with on Ubuntu 12.10 32Bit and Fedora 17 32Bit,
where gcc 4.7 is default.
With the non-default gcc 4.6, the same test succeeds.
Important: I was let to this bug because our robotics software that includes eigen segfaults in the matrix destructor when being built with gcc 4.7. With gcc 3.6, it works fine.
So this is really a bug relevant to us, not just a failing unit test.
And it occurs both with stable 3.0.6 and development.
How to reproduce (Ubuntu 12.10 32 Bit)
runtest.sh: line 20: 30794 Aborted (core dumped) ./$1 > /dev/null 2> .runtest.log
Test unalignedassert failed:
Test unalignedassert() failed in /home/gaschler/packages/eigen/latest/eigen/test/unalignedassert.cpp (128)
Eigen::should_raise_an_assert && "construct_at_boundary<Vector4f>(8)"
<end of output>
Test time = 0.14 sec
Interesting, gcc 4.6 will succeed on the same platform:
sudo apt-get install g++-4.6 gcc-4.6 cpp-4.6
cmake ../eigen -DCMAKE_CXX_COMPILER=/usr/bin/g++-4.6 -DCMAKE_C_COMPILER=/usr/bin/gcc-4.6
1/1 Test #15: unalignedassert .................. Passed 0.01 sec
Your help is appreciated.
We are aware of that issue, there is nothing serious for the end user. This is actually a gcc regression:
BTW, on the platform Ubuntu 12.10 32Bit,
I got the following testing results:
For Eigen 3.0.6 all succeed except for these two:
The following tests FAILED:
15 - unalignedassert (Failed)
339 - eigensolver_complex_4 (Failed)
because of numerical precision issues, sometimes some tests fail while there is no issue at all. You can check by running eigensolver_complex_4 2 or 3 times:
$ cd build/test
if it consistently fails, then there is an issue. If it fails once, please copy-paste here the associated seed so that we can reproduce.
Workaround had been committed some time ago: