FAIL: t-printf on Debian sparc64 with gcc-10 patched for gcc bugid 97939

Dennis Clarke dclarke at blastwave.org
Sun Dec 6 09:00:52 UTC 2020



Follow up to myself, after going in some circles I did land on :

Breakpoint 1, check_one (want=0x1000001dfc0 "       123",
fmt=0x100001267a8 "%10Nd") at t-printf.c:312
312       check_obstack_vprintf (want, fmt, ap);
(gdb) print want
$364 = 0x1000001dfc0 "       123"
(gdb) print fmt
$365 = 0x100001267a8 "%10Nd"
(gdb) print ap
$366 = (va_list) 0x7fefffff180
(gdb) cont
Continuing.

Program received signal SIGSEGV, Segmentation fault.
__memcpy_large () at ../sysdeps/sparc/sparc64/memcpy.S:370
370             stb             %g5, [%o0 - 2]                  /* Store
                       */
(gdb) where
#0  __memcpy_large () at ../sysdeps/sparc/sparc64/memcpy.S:370
#1  0x000001000000a9f0 in tests_allocate (size=1099511750592) at
memory.c:102
#2  0x0000010000007620 in check_one (want=0x1000001dfc0 "       123",
fmt=0x100001267a8 "%10Nd") at t-printf.c:312
#3  0x0000010000007af4 in check_z () at t-printf.c:424
#4  0x000001000000a6d0 in main (argc=1, argv=0x7fefffff628) at
t-printf.c:945
(gdb) quit
A debugging session is active.

        Inferior 1 [process 52726] will be killed.

Quit anyway? (y or n) y
ceres$



   * * * So I wonder if that is repeatable. * * *




ceres$ TERM=dumb LC_ALL=en_US.UTF-8 /usr/bin/gdb -q t-printf
Reading symbols from t-printf...
(gdb) dir /opt/bw/build/glibc-2.31/
Source directories searched: /opt/bw/build/glibc-2.31:$cdir:$cwd
(gdb) break t-printf.c:312
Breakpoint 1 at 0x7608: file t-printf.c, line 312.
(gdb) ignore 1 119
Will ignore next 119 crossings of breakpoint 1.
(gdb) run
Starting program: /tmp/t-printf

Breakpoint 1, check_one (want=0x1000001dfb0 "         0",
fmt=0x100001267a8 "%10Nd") at t-printf.c:312
312       check_obstack_vprintf (want, fmt, ap);
(gdb) print want
$1 = 0x1000001dfb0 "         0"
(gdb) print fmt
$2 = 0x100001267a8 "%10Nd"
(gdb) print ap
$3 = (va_list) 0x7fefffff180
(gdb) cont
Continuing.

Breakpoint 1, check_one (want=0x1000001dfc0 "       123",
fmt=0x1000001dfa8 "%10Zd") at t-printf.c:312
312       check_obstack_vprintf (want, fmt, ap);
(gdb) print want
$4 = 0x1000001dfc0 "       123"
(gdb) print fmt
$5 = 0x1000001dfa8 "%10Zd"
(gdb) print ap
$6 = (va_list) 0x7fefffff180
(gdb) step
check_obstack_vprintf (want=0x1000001dfc0 "       123",
fmt=0x1000001dfa8 "%10Zd", ap=0x7fefffff180) at t-printf.c:276
276       want_len = strlen (want);
(gdb) step
strlen () at ../sysdeps/sparc/sparc64/strlen.S:30
30              mov     %o0, %o1
(gdb) cont
Continuing.

Breakpoint 1, check_one (want=0x1000001dfc0 "       123",
fmt=0x100001267a8 "%10Nd") at t-printf.c:312
312       check_obstack_vprintf (want, fmt, ap);
(gdb) print want
$7 = 0x1000001dfc0 "       123"
(gdb) print fmt
$8 = 0x100001267a8 "%10Nd"
(gdb) print ap
$9 = (va_list) 0x7fefffff180
(gdb) step
check_obstack_vprintf (want=0x1000001dfc0 "       123",
fmt=0x100001267a8 "%10Nd", ap=0x7fefffff180) at t-printf.c:276
276       want_len = strlen (want);
(gdb) step
strlen () at ../sysdeps/sparc/sparc64/strlen.S:30
30              mov     %o0, %o1
(gdb) cont
Continuing.

Program received signal SIGSEGV, Segmentation fault.
__memcpy_large () at ../sysdeps/sparc/sparc64/memcpy.S:370
370             stb             %g5, [%o0 - 2]                  /* Store
                       */
(gdb) where
#0  __memcpy_large () at ../sysdeps/sparc/sparc64/memcpy.S:370
#1  0x000001000000a9f0 in tests_allocate (size=1099511750592) at
memory.c:102
#2  0x0000010000007620 in check_one (want=0x1000001dfc0 "       123",
fmt=0x100001267a8 "%10Nd") at t-printf.c:312
#3  0x0000010000007af4 in check_z () at t-printf.c:424
#4  0x000001000000a6d0 in main (argc=1, argv=0x7fefffff628) at
t-printf.c:945
(gdb)

Something odd is afoot when *want = "       123" and the fmt string
is "%10Nd".  I will see if I can step around in this until I can find
why the SIGSEGV.


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



More information about the gmp-bugs mailing list