gmp-6.1.0 fat build crashes on Broadwell / Cygwin 64bit

Achim Gratz Stromeko at nexgo.de
Sat Dec 5 20:05:22 UTC 2015


gmp-6.1.0 produces crashes on Cygwin 64bit in user applications and in
the GNU compiler suite as reported on the main Cygwin mailing list.  Of
four such reports, two happened on Broadwell CPU (the other two
reporters didn't follow up with the details of the system used).  One of
the reporters tried his build with both gcc-4.9.3 and gcc-5.2 and ran
into the same problem again, so it's not related to some specific gcc
version.  I have patched out the Broadwell/Skylake support from gmp and
both reporters with the Broadwell CPU have confirmed that this fixes
their problems.

http://thread.gmane.org/gmane.os.cygwin/155988
http://thread.gmane.org/gmane.os.cygwin/156057
http://thread.gmane.org/gmane.os.cygwin/156105
http://thread.gmane.org/gmane.os.cygwin/156107
http://thread.gmane.org/gmane.os.cygwin/156155
http://thread.gmane.org/gmane.os.cygwin/156317

I suspect an issue with the register save/restore or stack corruption
based on what has been reported, since the crashes don't always happen
in the same place and seem to be more reproducible when parallel builds
are performed.  Cygwin does not have support for saving/restoring AVX
registers yet and if the assembly code makes assumptions about the stack
layout it may run into trouble since it's different from both Windows
and Linux on the same architecture AFAIK.  The latest Intel system I can
test on is an IvyBridge Celeron, so unfortunately I am not able to run
any tests myself.

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-cygwin/4.9.3/lto-wrapper.exe
Target: x86_64-pc-cygwin
Configured with: /cygdrive/i/szsz/tmpp/gcc/gcc-4.9.3-1.x86_64/src/gcc-4.9.3/configure --srcdir=/cygdrive/i/szsz/tmpp/gcc/gcc-4.9.3-1.x86_64/src/gcc-4.9.3 --prefix=/usr --exec-prefix=/usr --localstatedir=/var --sysconfdir=/etc --docdir=/usr/share/doc/gcc --htmldir=/usr/share/doc/gcc/html -C --build=x86_64-pc-cygwin --host=x86_64-pc-cygwin --target=x86_64-pc-cygwin --without-libiconv-prefix --without-libintl-prefix --libexecdir=/usr/lib --enable-shared --enable-shared-libgcc --enable-static --enable-version-specific-runtime-libs --enable-bootstrap --enable-__cxa_atexit --with-dwarf2 --with-tune=generic --enable-languages=ada,c,c++,fortran,lto,objc,obj-c++ --enable-graphite --enable-threads=posix --enable-libatomic --enable-libgomp --disable-libitm --enable-libquadmath --enable-libquadmath-support --enable-libssp --enable-libada --enable-libgcj-sublibs --disable-java-awt --disable-symvers --with-ecj-jar=/usr/share/java/ecj.jar --with-gnu-ld --with-gnu-as --with-cloog-include=/usr/include/cloog-isl --without-libiconv-prefix --without-libintl-prefix --with-system-zlib --enable-linker-build-id
Thread model: posix
gcc version 4.9.3 (GCC) 

$ uname -a
CYGWIN_NT-6.3 Cygwin 2.4.0(0.291/5/3) 2015-11-12 12:21 x86_64 Cygwin

Cygport file, the patch applied to remove Broadwell/Skylake support and
the build log are attached.  The patch also contains a change to treat
Broadwell/Skylake like Haswell on 32bit, but that's actually a separate
issue not directly related to this report.  Also unrelated to this
report, but the newest Intel CPU family is named Kaby Lake (different
spelling than what's used in various parts of gmp).

-------------- next part --------------
A non-text attachment was scrubbed...
Name: gmp.cygport
Type: application/x-shellscript
Size: 1740 bytes
Desc: not available
URL: <https://gmplib.org/list-archives/gmp-bugs/attachments/20151205/6f8e49a3/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gmp.src.patch
Type: text/x-patch
Size: 3940 bytes
Desc: not available
URL: <https://gmplib.org/list-archives/gmp-bugs/attachments/20151205/6f8e49a3/attachment-0004.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gmp-6.1.0-2p1-compile.log
Type: text/x-log
Size: 842985 bytes
Desc: not available
URL: <https://gmplib.org/list-archives/gmp-bugs/attachments/20151205/6f8e49a3/attachment-0005.bin>
-------------- next part --------------

Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Waldorf MIDI Implementation & additional documentation:
http://Synth.Stromeko.net/Downloads.html#WaldorfDocs


More information about the gmp-bugs mailing list