Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 426236 (PR53900)

Summary: [4.7] wrong assertation on aligned arrays for 32bit (was: dev-cpp/eigen:2 fails tests)
Product: Gentoo Linux Reporter: Patrick Lauer <patrick>
Component: New packagesAssignee: Gentoo Science Related Packages <sci>
Status: RESOLVED CANTFIX    
Severity: normal CC: ainsaar, b.brachaczek, bureau, heroxbd, kde, orzel, quantheory
Priority: Normal Keywords: TESTFAILURE
Version: unspecified   
Hardware: All   
OS: Linux   
URL: http://eigen.tuxfamily.org/bz/show_bug.cgi?id=490
See Also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53900
Whiteboard: tracking upstream
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 390247    

Description Patrick Lauer gentoo-dev 2012-07-12 03:12:19 UTC
Start 46: prec_inverse_4x4
46/46 Test #46: prec_inverse_4x4 .................   Passed   10.06 sec

98% tests passed, 1 tests failed out of 46

Total Test time (real) =  37.70 sec

The following tests FAILED:
          8 - unalignedassert (Failed)
Errors while running CTest
 * ERROR: dev-cpp/eigen-2.0.17 failed (test phase):
 *   Tests failed. When you file a bug, please attach the following file: 
 *      /var/tmp/portage/dev-cpp/eigen-2.0.17/work/eigen-2.0.17_build/Testing/Temporary/LastTest.log

from that file:

 Test unalignedassert failed: 

Test unalignedassert() failed in "/var/tmp/portage/dev-cpp/eigen-2.0.17/work/eigen-2.0.17/test/unalignedassert.cpp" (113)                                                                                                                    
    Eigen::should_raise_an_assert && "check_unalignedassert_bad<Bad4>()"                                                                                                                                                                     
Portage 2.1.11.5 (default/linux/amd64/10.0, gcc-4.7.1, glibc-2.15-r2, 3.4.1-vs2.3.3.4 x86_64)
=================================================================
System uname: Linux-3.4.1-vs2.3.3.4-x86_64-AMD_Phenom-tm-_II_X4_965_Processor-with-gentoo-2.1
Timestamp of tree: Unknown
app-shells/bash:          4.2_p29
dev-lang/python:          2.7.3-r2, 3.2.3-r1
dev-util/cmake:           2.8.8-r3
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.10.5
sys-apps/sandbox:         2.6
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.12.1
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.7.1
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.4-r1 (virtual/os-headers)
sys-libs/glibc:           2.15-r2
Repositories: gentoo
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0 /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg config-protect-if-modified distlocks ebuild-locks fixlafiles news parallel-fetch parse-eapi-ebuild-head protect-owned sandbox sfperms strict test unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_GB.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acl amd64 apache2 berkdb bzip2 cairo cli consolekit corefonts cracklib crypt cups cxx dbus dri fortran gd gdbm gpm gudev hwdb iconv ipv6 jpeg kdepim minizip mmx modules mudflap multilib ncurses nls nptl objc ogg openmp pam pcre png policykit poppler pppd python qt3support qt4 readline semantic-desktop session sqlite sse sse2 ssl svg tcpd truetype unicode vorbis webkit xa xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="vesa" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Michael Palimaka (kensington) gentoo-dev 2012-07-26 14:45:26 UTC
I agree with upstream's assessment, I can only reproduce with GCC 4.7
Comment 2 Thomas Capricelli 2012-12-20 22:19:26 UTC
as specified in the upstream ticket (linked in 'URL' field), the bug is actually in gcc :
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53900
Comment 3 Kacper Kowalik (Xarthisius) (RETIRED) gentoo-dev 2012-12-21 04:23:02 UTC
(In reply to comment #2)
> as specified in the upstream ticket (linked in 'URL' field), the bug is
> actually in gcc :
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53900

Yeah, but unfortunately it's marked as invalid @ gcc bugzie...
Comment 4 Kacper Kowalik (Xarthisius) (RETIRED) gentoo-dev 2012-12-21 04:48:33 UTC
I'll bisect to find the source regression, maybe this will change upstream's mind.
Comment 5 Sean Santos 2013-02-06 06:47:14 UTC
It looks like the gcc folks are saying that this test should always pass because this alignment should always work, and therefore the compiler is allowed to evaluate the assert at compile-time.

Of course, alignment of dynamically allocated arrays is *not* right, and libstdc++ is probably (?) not standard-conforming in this respect. There's a ticket to improve the situation here:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55727


Eigen has implemented a workaround, whereas the gcc ticket has been closed as INVALID, so I think that this should be treated as an Eigen issue again. The workaround is in Eigen's git (not yet in any released version). See lines 50-70 here:

https://bitbucket.org/eigen/eigen/src/32b190205cfb6a2f0b2989477dfd5e571b237caa/Eigen/src/Core/DenseStorage.h?at=default
Comment 6 Siim Ainsaar 2013-08-06 04:57:28 UTC
If this bug here is to be treated as an Eigen issue, then we should tag it "resolved-fixed", because dev-cpp/eigen-3.1.3 has been in the tree since April. In addition, we should try to stabilize >=dev-cpp/eigen-3.1.3 before gcc-4.7; if so, then bug 467274 needs a new blocker.

Hopefully I am interpreting the situation correctly... If not, then what, specifically, are we waiting for here? A resolution for the bug of libstdc++ (see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53900#c8 and comment 5 here) that is yet to be filed?
Comment 7 Michael Palimaka (kensington) gentoo-dev 2013-08-06 08:22:29 UTC
(In reply to Siim Ainsaar from comment #6)
> If this bug here is to be treated as an Eigen issue, then we should tag it
> "resolved-fixed", because dev-cpp/eigen-3.1.3 has been in the tree since
> April.
There are still a number of packages that depend on slot 2, so unfortunately we could not consider the bug fixed yet.

> In addition, we should try to stabilize >=dev-cpp/eigen-3.1.3 before
> gcc-4.7; if so, then bug 467274 needs a new blocker.
Does 3.0.6 (already stable) fail with gcc-4.7?
Comment 8 Michael Palimaka (kensington) gentoo-dev 2013-08-06 08:40:14 UTC
If there is no objection, I will soon restrict tests for dev-cpp/eigen:2 permanently. There are two other two other test failure bugs reported (which seem to be issues with the testsuite rather than the library. Further, upstream no longer maintains the 2.0 series.
Comment 9 Michael Palimaka (kensington) gentoo-dev 2013-08-14 09:47:18 UTC
Tests permanently restricted wrt bug #426236, 455460, and 467288. Upstream no longer maintains the 2.0 branch.