#798149 Compilation with the -O2 flag on i386 can lead to stuck exec

Package:
gcc
Source:
gcc-defaults
Description:
GNU C compiler
Submitter:
Julien Puydt
Date:
2015-09-21 09:03:12 UTC
Severity:
normal
#798149#5
Date:
2015-09-06 08:58:40 UTC
From:
To:
When compiling flint version 2.5.2 (available from http://flintlib.org
or from the orig tarball of experimental's src:flint package), the
library testsuite fails on two tests (both in d_mat's directory: qr and
gso).

They fail by never returning -- the buildbots which checked my
experimental package terminated after 2h30min or 3h, but I have tried
waiting 12h).

The exact setting to trigger the failure is :
(1) i386 platform (debian arches i386, hurd-i386 or kfreebsd-i386). The
debian buildbots for other arches were ok (except alpha, unsupported by
upstream).
(2) -O2 switch : the debian package uses:
./configure --prefix=/usr --with-ntl CFLAGS='-D_FORTIFY_SOURCE=2 -g -O2
-fstack-protector-strong -Wformat -Werror=format-security'
(well, through dpkg-buildflags) but I was able to bissect those switches
and determined this is enough to trigger the problem :
./configure --prefix=/usr CFLAGS='-O2'

After that, "make" followed by "make check" will run tests, and d_mat's
qr should get stuck.

In the same situation, clang 3.5 and 3.8 fail by producing tests (not
the same ones) which trigger "Illegal instruction".

The previous gcc, 4.9.3-4, also gets stuck, in the same tests.

I hope that is detailed enough -- feel free to ask for more details,

Snark on #debian-science

#798149#10
Date:
2015-09-21 09:01:22 UTC
From:
To:
Hi,

I made more experiments with the code:
- in fact, -O1 already leads to a stuck exec
- but adding -ansi makes things go smooth (even with -O2)

With this, I was able to ship flint 2.5.2-3, working on the same arches
as previously.

I hope that helps,

Snark on #debian-science