Re: Debian Linux SPARC64 issue with FAIL t-printf (exit status: 139)

2020-12-04 Thread Dennis Clarke
On 11/23/20 12:53 AM, Vincent Lefevre wrote:
> On 2020-11-23 01:00:30 +0100, Vincent Lefevre wrote:
>> FYI, no failures on gcc202.fsffrance.org with
>>
>>   ./configure ABI=64 --enable-cxx --disable-assembly --enable-shared 
>> --enable-static --enable-fft
>>
>> Linux gcc202 5.9.0-2-sparc64-smp #1 SMP Debian 5.9.6-1 (2020-11-08) sparc64 
>> GNU/Linux
>>
>> Also a Debian sid with
>>
>> vinc17@gcc202:~$ gcc --version
>> gcc (Debian 10.2.0-17) 10.2.0
> 
> But note that I get an ICE with UBsan. My bug report with a very
> simple testcase:
> 
>   https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97939
> 

Fixed !!

root@ceres:~#
root@ceres:~#
root@ceres:~# uname -a
Linux ceres 5.9.0-4-sparc64-smp #1 SMP Debian 5.9.11-1 (2020-11-27)
sparc64 GNU/Linux
root@ceres:~#
root@ceres:~# cat /proc/cpuinfo
cpu : TI UltraSparc IIi (Sabre)
fpu : UltraSparc IIi integrated FPU
pmu : ultra12
prom: OBP 3.10.27 2000/06/22 16:45
type: sun4u
ncpus probed: 1
ncpus active: 1
D$ parity tl1   : 0
I$ parity tl1   : 0
cpucaps : flush,stbar,swap,muldiv,v9,mul32,div32,v8plus,vis
Cpu0ClkTck  : 1a3a1e16
MMU Type: Spitfire
MMU PGSZs   : 8K,64K,512K,4MB
State:
CPU0:   online
root@ceres:~#
root@ceres:~# cat foo.c

long f (long i)
{
  return i + 4096;
}

root@ceres:~#
root@ceres:~# /usr/bin/gcc-10 --version
gcc-10 (Debian 10.2.0-23) 10.2.0
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

root@ceres:~# /usr/bin/gcc-10 -v
Using built-in specs.
COLLECT_GCC=/usr/bin/gcc-10
COLLECT_LTO_WRAPPER=/usr/lib/gcc/sparc64-linux-gnu/10/lto-wrapper
Target: sparc64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian
10.2.0-23' --with-bugurl=file:///usr/share/doc/gcc-10/README.Bugs
--enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2 --prefix=/usr
--with-gcc-major-version-only --program-suffix=-10
--program-prefix=sparc64-linux-gnu- --enable-shared
--enable-linker-build-id --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --libdir=/usr/lib
--enable-nls --enable-bootstrap --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes
--with-default-libstdcxx-abi=new --enable-gnu-unique-object
--disable-libquadmath --disable-libquadmath-support --enable-plugin
--enable-default-pie --with-system-zlib --disable-libphobos
--enable-objc-gc=auto --enable-multiarch --disable-werror
--with-cpu-32=ultrasparc --enable-targets=all --with-long-double-128
--enable-multilib --enable-checking=release --build=sparc64-linux-gnu
--host=sparc64-linux-gnu --target=sparc64-linux-gnu
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 10.2.0 (Debian 10.2.0-23)
root@ceres:~#
root@ceres:~#
root@ceres:~# /usr/bin/gcc-10 -v -fsanitize=undefined -v -c foo.c
Using built-in specs.
COLLECT_GCC=/usr/bin/gcc-10
Target: sparc64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian
10.2.0-23' --with-bugurl=file:///usr/share/doc/gcc-10/README.Bugs
--enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2 --prefix=/usr
--with-gcc-major-version-only --program-suffix=-10
--program-prefix=sparc64-linux-gnu- --enable-shared
--enable-linker-build-id --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --libdir=/usr/lib
--enable-nls --enable-bootstrap --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes
--with-default-libstdcxx-abi=new --enable-gnu-unique-object
--disable-libquadmath --disable-libquadmath-support --enable-plugin
--enable-default-pie --with-system-zlib --disable-libphobos
--enable-objc-gc=auto --enable-multiarch --disable-werror
--with-cpu-32=ultrasparc --enable-targets=all --with-long-double-128
--enable-multilib --enable-checking=release --build=sparc64-linux-gnu
--host=sparc64-linux-gnu --target=sparc64-linux-gnu
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 10.2.0 (Debian 10.2.0-23)
COLLECT_GCC_OPTIONS='-v' '-fsanitize=undefined' '-v' '-c' '-mcpu=v9'
 /usr/lib/gcc/sparc64-linux-gnu/10/cc1 -quiet -v -v -imultiarch
sparc64-linux-gnu -D__sparc_v9__ -D__arch64__ foo.c -quiet -dumpbase
foo.c -mcpu=v9 -auxbase foo -version -fsanitize=undefined -o /tmp/ccngg5fZ.s
GNU C17 (Debian 10.2.0-23) version 10.2.0 (sparc64-linux-gnu)
compiled by GNU C version 10.2.0, GMP version 6.2.1, MPFR
version 4.1.0, MPC version 1.2.0, isl version isl-0.23-GMP

GGC heuristics: --param ggc-min-expand=97 --param ggc-min-heapsize=127133
ignoring nonexistent directory "/usr/local/include/sparc64-linux-gnu"
ignoring nonexistent directory
"/usr/lib/gcc/sparc64-linux-gnu/10/include-fixed"
ignoring nonexistent directory
"/usr/lib/gcc/sparc64-linux-gnu/10/../../../../sparc64-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 

Re: Debian Linux SPARC64 issue with FAIL t-printf (exit status: 139)

2020-11-22 Thread Vincent Lefevre
On 2020-11-23 01:00:30 +0100, Vincent Lefevre wrote:
> FYI, no failures on gcc202.fsffrance.org with
> 
>   ./configure ABI=64 --enable-cxx --disable-assembly --enable-shared 
> --enable-static --enable-fft
> 
> Linux gcc202 5.9.0-2-sparc64-smp #1 SMP Debian 5.9.6-1 (2020-11-08) sparc64 
> GNU/Linux
> 
> Also a Debian sid with
> 
> vinc17@gcc202:~$ gcc --version
> gcc (Debian 10.2.0-17) 10.2.0

But note that I get an ICE with UBsan. My bug report with a very
simple testcase:

  https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97939

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
___
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs


Re: Debian Linux SPARC64 issue with FAIL t-printf (exit status: 139)

2020-11-22 Thread Vincent Lefevre
On 2020-11-22 13:16:45 -0500, Dennis Clarke wrote:
> After hours of running this in circles for both 6.2.0 and 6.2.1
> with both gcc 9.3.0 ( Debian 9.3.0-18 ) and also the latest
> gcc 10.2.0 (Debian 10.2.0-17) I can report that the test t-printf
> does fail every time. With a consistent configure :
> 
> ./configure ABI=64 --enable-cxx --prefix=/opt/bw
> --libdir=/opt/bw/lib --disable-assembly
> --enable-shared --enable-static --enable-fft

FYI, no failures on gcc202.fsffrance.org with

  ./configure ABI=64 --enable-cxx --disable-assembly --enable-shared 
--enable-static --enable-fft

Linux gcc202 5.9.0-2-sparc64-smp #1 SMP Debian 5.9.6-1 (2020-11-08) sparc64 
GNU/Linux

Also a Debian sid with

vinc17@gcc202:~$ gcc --version
gcc (Debian 10.2.0-17) 10.2.0

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
___
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs


Re: Debian Linux SPARC64 issue with FAIL t-printf (exit status: 139)

2020-11-22 Thread Dennis Clarke
On 11/18/20 1:30 AM, Paul Zimmermann wrote:
>Dear Dennis,
> 
>> With an old old Sun Nera server running very latest Debian sid I was
>> surprised to see : [...]
> 
> does the same error occur with previous GMP versions, or is it specific to
> 6.2.1?

After hours of running this in circles for both 6.2.0 and 6.2.1
with both gcc 9.3.0 ( Debian 9.3.0-18 ) and also the latest
gcc 10.2.0 (Debian 10.2.0-17) I can report that the test t-printf
does fail every time. With a consistent configure :

./configure ABI=64 --enable-cxx --prefix=/opt/bw
--libdir=/opt/bw/lib --disable-assembly
--enable-shared --enable-static --enable-fft

So that is strange.

I can also try gcc 8.x but that will need another day.


-- 
Dennis Clarke
RISC-V/SPARC/PPC/ARM/CISC
UNIX and Linux spoken
GreyBeard and suspenders optional

___
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs


Re: Debian Linux SPARC64 issue with FAIL t-printf (exit status: 139)

2020-11-18 Thread Dennis Clarke
On 11/18/20 1:30 AM, Paul Zimmermann wrote:
>Dear Dennis,
> 
>> With an old old Sun Nera server running very latest Debian sid I was
>> surprised to see : [...]
> 
> does the same error occur with previous GMP versions, or is it specific to
> 6.2.1?
> 

Good question. I wanted to adjust my CFLAGS a tad and then try again
with a different configure line to see what I get. Worse. Much worse.

ceres$
ceres$ echo $CFLAGS
-std=iso9899:1999 -m64 -O3 -mno-app-regs -mflat -mhard-float
-mhard-quad-float -mno-unaligned-doubles -mcpu=ultrasparc
-mtune=ultrasparc -mno-vis -mcmodel=medany -mmemory-model=tso
-Wl,-rpath=/opt/bw/lib
ceres$ echo $CXXFLAGS
-m64 -g -O3 -fno-builtin -fno-fast-math -mno-app-regs
-mno-unaligned-doubles -mcpu=ultrasparc -mtune=ultrasparc
-Wl,-rpath=/opt/bw/lib
ceres$
ceres$
ceres$ pwd
/opt/bw/build/gmp-6.2.1_debian_5.9.0-2-sparc64.002
ceres$
ceres$ ./configure ABI=64 --enable-cxx --prefix=/opt/bw
--libdir=/opt/bw/lib --enable-shared --enable-static
--enable-fft
checking build system type... ultrasparc2i-unknown-linux-gnu
checking host system type... ultrasparc2i-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether /usr/bin/make sets $(MAKE)... yes
checking whether /usr/bin/make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking ABI=64
checking compiler /usr/bin/gcc -std=iso9899:1999 -m64 -O3 -mno-app-regs
-mflat -mhard-float -mhard-quad-float -mno-unaligned-doubles
-mcpu=ultrasparc -mtune=ultrasparc -mno-vis -mcmodel=medany
-mmemory-model=tso -Wl,-rpath=/opt/bw/lib ... yes
checking compiler /usr/bin/gcc -std=iso9899:1999 -m64 -O3 -mno-app-regs
-mflat -mhard-float -mhard-quad-float -mno-unaligned-doubles
-mcpu=ultrasparc -mtune=ultrasparc -mno-vis -mcmodel=medany
-mmemory-model=tso -Wl,-rpath=/opt/bw/lib has sizeof(long)==8... yes
checking for gcc... /usr/bin/gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /usr/bin/gcc accepts -g... yes
checking for /usr/bin/gcc option to accept ISO C89... none needed
checking whether /usr/bin/gcc understands -c and -o together... yes
checking for /usr/bin/gcc option to accept ISO C99... none needed
checking how to run the C preprocessor... /usr/bin/gcc -E
checking build system compiler /usr/bin/gcc... yes
checking for build system preprocessor... /usr/bin/gcc -E
checking for build system executable suffix...
checking whether build system compiler is ANSI... yes
checking for build system compiler math library... -lm
checking whether we are using the GNU C++ compiler... yes
checking whether /usr/bin/g++ accepts -g... yes
checking C++ compiler /usr/bin/g++  -m64 -g -O3 -fno-builtin
-fno-fast-math -mno-app-regs -mno-unaligned-doubles -mcpu=ultrasparc
-mtune=ultrasparc -Wl,-rpath=/opt/bw/lib... yes
checking how to run the C++ preprocessor... /usr/bin/g++ -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
using ABI="64"
  CC="/usr/bin/gcc"
  CFLAGS="-std=iso9899:1999 -m64 -O3 -mno-app-regs -mflat
-mhard-float -mhard-quad-float -mno-unaligned-doubles -mcpu=ultrasparc
-mtune=ultrasparc -mno-vis -mcmodel=medany -mmemory-model=tso
-Wl,-rpath=/opt/bw/lib"
  CPPFLAGS=""
  CXX="/usr/bin/g++"
  CXXFLAGS="-m64 -g -O3 -fno-builtin -fno-fast-math -mno-app-regs
-mno-unaligned-doubles -mcpu=ultrasparc -mtune=ultrasparc
-Wl,-rpath=/opt/bw/lib"
  MPN_PATH=" sparc64/ultrasparc1234 sparc64 generic"
checking whether assembler supports --noexecstack option... yes
checking for ar... /usr/bin/ar
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -p
checking the name lister (/usr/bin/nm -p) interface... BSD nm
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for fgrep... /usr/bin/grep -F
checking for ld used by /usr/bin/gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert ultrasparc2i-unknown-linux-gnu file names to
ultrasparc2i-unknown-linux-gnu format... func_convert_file_noop
checking how to convert ultrasparc2i-unknown-linux-gnu file names to
toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... dlltool
checking how to associate runtime and link libraries... printf %s\n
checking for archiver @FILE 

Re: Debian Linux SPARC64 issue with FAIL t-printf (exit status: 139)

2020-11-17 Thread Paul Zimmermann
   Dear Dennis,

> With an old old Sun Nera server running very latest Debian sid I was
> surprised to see : [...]

does the same error occur with previous GMP versions, or is it specific to
6.2.1?

Paul
___
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs


Debian Linux SPARC64 issue with FAIL t-printf (exit status: 139)

2020-11-17 Thread Dennis Clarke


With an old old Sun Nera server running very latest Debian sid I was
surprised to see :

.
.
.
FAIL: t-printf
PASS: t-scanf
PASS: t-locale

Testsuite summary for GNU MP 6.2.1

# TOTAL: 3
# PASS:  2
# SKIP:  0
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 0

The ./tests/misc/t-printf.log says very little :

C_ceres$ wc -l ./tests/misc/t-printf.c
956 ./tests/misc/t-printf.c
C_ceres$


Just trying to run the test within gdb will throw a SIGSEGV :

(gdb) run
Starting program:
/opt/bw/build/gmp-6.2.1_debian_5.9.0-2-sparc64.001/tests/misc/t-printf

Program received signal SIGSEGV, Segmentation fault.
__memcpy_large () at ../sysdeps/sparc/sparc64/memcpy.S:370
370 ../sysdeps/sparc/sparc64/memcpy.S: No such file or directory.
(gdb) where
#0  __memcpy_large () at ../sysdeps/sparc/sparc64/memcpy.S:370
#1  0x0100a9f0 in tests_allocate (size=1099511750592) at
memory.c:102
#2  0x01007620 in check_one (want=0x101dfc0 "   123",
fmt=0x11267a8 "%10Nd") at t-printf.c:312
#3  0x01007af4 in check_z () at t-printf.c:424
#4  0x0100a6d0 in main (argc=1, argv=0x7fef638) at
t-printf.c:945
(gdb) quit
A debugging session is active.

Inferior 1 [process 55131] will be killed.

Quit anyway? (y or n) y
ceres$

Looking at line 312 I see :

   300
   301  void
   302  check_one (const char *want, const char *fmt, ...)
   303  {
   304va_list ap;
   305va_start (ap, fmt);
   306
   307/* simplest first */
   308check_vsprintf (want, fmt, ap);
   309check_vfprintf (want, fmt, ap);
   310check_vsnprintf (want, fmt, ap);
   311check_vasprintf (want, fmt, ap);
   312check_obstack_vprintf (want, fmt, ap);
   313  }
   314

This seems to be repeatable and also unlikely. I tried to single step
around in there and eventually ended up at :

   obstack_free (h=0x7feefb8, obj=0x0) at obstack.c:350

I am likely doing something wrong here.

In any case the configure line was :

./configure ABI=64 --enable-cxx --prefix=/opt/bw
--libdir=/opt/bw/lib --disable-assembly --enable-shared
--enable-static --enable-fft

Which looked okay :

checking build system type... ultrasparc2i-unknown-linux-gnu
checking host system type... ultrasparc2i-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether /usr/bin/make sets $(MAKE)... yes
checking whether /usr/bin/make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking ABI=64
checking compiler /usr/bin/gcc -std=iso9899:1999 -m64 -g -O0 -pedantic
-pedantic-errors -fno-builtin -fno-fast-math -mno-app-regs -mflat
-mhard-float -mhard-quad-float -mno-unaligned-doubles
-mno-faster-structs -mcpu=ultrasparc -mtune=ultrasparc -mno-vis
-mno-cbcond -mno-fmaf -mno-fsmuld -mno-popc -mno-subxc -mcmodel=medany
-mmemory-model=tso -Wl,-rpath=/opt/bw/lib -D_POSIX_PTHREAD_SEMANTICS
-D_LARGEFILE64_SOURCE -D_TS_ERRNO -D_XOPEN_SOURCE=600... yes
checking compiler /usr/bin/gcc -std=iso9899:1999 -m64 -g -O0 -pedantic
-pedantic-errors -fno-builtin -fno-fast-math -mno-app-regs -mflat
-mhard-float -mhard-quad-float -mno-unaligned-doubles
-mno-faster-structs -mcpu=ultrasparc -mtune=ultrasparc -mno-vis
-mno-cbcond -mno-fmaf -mno-fsmuld -mno-popc -mno-subxc -mcmodel=medany
-mmemory-model=tso -Wl,-rpath=/opt/bw/lib has sizeof(long)==8... yes
checking for gcc... /usr/bin/gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /usr/bin/gcc accepts -g... yes
checking for /usr/bin/gcc option to accept ISO C89... none needed
checking whether /usr/bin/gcc understands -c and -o together... yes
checking for /usr/bin/gcc option to accept ISO C99... none needed
checking how to run the C preprocessor... /usr/bin/gcc -E
checking build system compiler /usr/bin/gcc... yes
checking for build system preprocessor... /usr/bin/gcc -E
checking for build system executable suffix...
checking whether build system compiler is ANSI... yes
checking for build system compiler math library... -lm
checking whether we are using the GNU C++ compiler... yes
checking whether /usr/bin/g++ accepts -g... yes
checking C++ compiler /usr/bin/g++ -D_POSIX_PTHREAD_SEMANTICS
-D_LARGEFILE64_SOURCE -D_TS_ERRNO -D_XOPEN_SOURCE=600 -std=iso9899:1999
-m64 -g -O0 -pedantic -pedantic-errors -fno-builtin -fno-fast-math
-mno-app-regs -mflat -mhard-float -mhard-quad-float
-mno-unaligned-doubles -mno-faster-structs -mcpu=ultrasparc
-mtune=ultrasparc