Arch bus error for t-cmp, t-cmp_ui and t-cmp_z

Trevor Spiteri tspiteri at ieee.org
Wed Mar 8 22:40:35 CET 2023


I was trying to investigate the bug reported here on February 2023 at 
https://gmplib.org/list-archives/gmp-bugs/2023-February/005243.html and 
have managed to reproduce it on Arch Linux with the below CFLAGS and 
configure options, where three checks fail with a bus error. For what 
it's worth, I was unable to reproduce on Fedora 37. I have included the 
relevant details below; I hope I did not miss anything.

(Sorry for not replying to the original bug thread, but I'm not 
subscribed to this mailing list so I only saw the messages on the 
archives web page.)

Best regards,
Trevor Spiteri


Details follow:

GMP version 6.2.1 (from gmp-6.2.1.tar.lz without any patches)


Configuration and compilation using:
CFLAGS="-O2 -flto=auto" ./configure --disable-shared
make
make check


Output from configure:
...
using ABI="64"
       CC="gcc"
       CFLAGS="-O2 -flto=auto"
       CPPFLAGS=""
       MPN_PATH=" x86_64/coreinhm x86_64/core2 x86_64 generic"
...
   Version:           GNU MP 6.2.1
   Host type:         nehalem-pc-linux-gnu
   ABI:               64
   Install prefix:    /usr/local
   Compiler:          gcc
   Static libraries:  yes
   Shared libraries:  no


Output from make check:
...
make[5]: Entering directory '/home/user/gmp-6.2.1/tests/mpq'
PASS: t-aors
../../test-driver: line 107: 33725 Bus error               (core dumped) "$@" > $log_file 2>&1
FAIL: t-cmp
../../test-driver: line 107: 33736 Bus error               (core dumped) "$@" > $log_file 2>&1
FAIL: t-cmp_ui
PASS: t-cmp_si
PASS: t-equal
PASS: t-get_d
PASS: t-get_str
PASS: t-inp_str
PASS: t-inv
PASS: t-md_2exp
PASS: t-set_f
PASS: t-set_str
PASS: io
PASS: reuse
../../test-driver: line 107: 33807 Bus error               (core dumped) "$@" > $log_file 2>&1
FAIL: t-cmp_z
============================================================================
Testsuite summary for GNU MP 6.2.1
============================================================================
# TOTAL: 15
# PASS:  12
# SKIP:  0
# XFAIL: 0
# FAIL:  3
# XPASS: 0
# ERROR: 0
...


Output from gcc -v:
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/12.2.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /build/gcc/src/gcc/configure --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++,d --enable-bootstrap --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --with-build-config=bootstrap-lto --with-linker-hash-style=gnu --with-system-zlib --enable-__cxa_atexit --enable-cet=auto --enable-checking=release --enable-clocale=gnu --enable-default-pie --enable-default-ssp --enable-gnu-indirect-function --enable-gnu-unique-object --enable-libstdcxx-backtrace --enable-link-serialization=1 --enable-linker-build-id --enable-lto --enable-multilib --enable-plugin --enable-shared --enable-threads=posix --disable-libssp --disable-libstdcxx-pch --disable-werror
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.2.1 20230201 (GCC)


Output from uname -a:
Linux archy 6.2.2-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 03 Mar 2023 15:58:31 +0000 x86_64 GNU/Linux


Output from ./config.guess:
nehalem-pc-linux-gnu


Output from./configfsf.guess:
x86_64-pc-linux-gnu



More information about the gmp-bugs mailing list