[Bug libc/33812] elf/tst-startup-errno fails on ppc32
erhard_f at mailbox dot org
sourceware-bugzilla@sourceware.org
Mon Jan 26 21:03:58 GMT 2026
https://sourceware.org/bugzilla/show_bug.cgi?id=33812
Erhard Furtner <erhard_f at mailbox dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |erhard_f at mailbox dot org
--- Comment #7 from Erhard Furtner <erhard_f at mailbox dot org> ---
I tried to set an hardware breakpoint for errno on my G4 (it was me who
contributed the PPC 32bit test results for the glibc 2.43). Setting the break
point seemed to work, but in the end GDB gets a SEGFAULT, so I can't provide a
backtrace:
$ gdb --args ./elf/ld.so --library-path . elf/tst-startup-errno
GNU gdb (Gentoo 16.3 vanilla) 16.3
[...]
Reading symbols from ./elf/ld.so...
(gdb) set stop-on-solib-events 1
(gdb) run
Starting program: /home/ef/glibc/glibc-build/elf/ld.so --library-path .
elf/tst-startup-errno
Stopped due to shared library event (no libraries added or removed)
(gdb) continue
Continuing.
Stopped due to shared library event:
Inferior loaded /home/ef/glibc/glibc-build/elf/ld.so
(gdb) continue
Continuing.
warning: Expected absolute pathname for libpthread in the inferior, but got
./libc.so.6.
warning: Unable to find libthread_db matching inferior's thread library, thread
debugging will not be available.
Stopped due to shared library event:
Inferior loaded ./libc.so.6
(gdb) info sharedlibrary
>From To Syms Read Shared Object Library
0xa7fa2bc0 0xa7fc9b24 Yes /home/ef/glibc/glibc-build/elf/ld.so
0x6fdbb140 0x6ff49e00 Yes ./libc.so.6
(gdb) info functions .*errno.*
All functions matching regular expression ".*errno.*":
File clnt_perr.c:
267: void __GI_clnt_perrno(enum clnt_stat);
247: char *__GI_clnt_sperrno(enum clnt_stat);
File errno-loc.c:
24: int *__GI___errno_location(void);
File error.c:
172: static void print_errno_message(int);
File herrno-loc.c:
25: int *__GI___h_errno_location(void);
(gdb) p __errno_location()
$1 = (int *) 0xa7fff398
(gdb) watch *(int *) __errno_location()
Hardware watchpoint 1: *(int *) __errno_location()
(gdb) continue
Continuing.
Segmentation fault gdb --args ./elf/ld.so --library-path .
elf/tst-startup-errno
dmesg shows this:
gdb[2023]: bad frame in handle_signal32: af47ab20 nip 00b473a8 lr 00ba2a08
Next I re-tried, using a software breakpoint:
$ gdb --args ./elf/ld.so --library-path . elf/tst-startup-errno
GNU gdb (Gentoo 16.3 vanilla) 16.3
[...]
Reading symbols from ./elf/ld.so...
(gdb) set can-use-hw-watchpoints 0
(gdb) set stop-on-solib-events 1
(gdb) run
Starting program: /home/ef/glibc/glibc-build/elf/ld.so --library-path .
elf/tst-startup-errno
Stopped due to shared library event (no libraries added or removed)
(gdb) continue
Continuing.
Stopped due to shared library event:
Inferior loaded /home/ef/glibc/glibc-build/elf/ld.so
(gdb) continue
Continuing.
warning: Expected absolute pathname for libpthread in the inferior, but got
./libc.so.6.
warning: Unable to find libthread_db matching inferior's thread library, thread
debugging will not be available.
Stopped due to shared library event:
Inferior loaded ./libc.so.6
(gdb) info sharedlibrary
>From To Syms Read Shared Object Library
0xa7fa2bc0 0xa7fc9b24 Yes /home/ef/glibc/glibc-build/elf/ld.so
0x6fdbb140 0x6ff49e00 Yes ./libc.so.6
(gdb) info functions .*errno.*
All functions matching regular expression ".*errno.*":
File clnt_perr.c:
267: void __GI_clnt_perrno(enum clnt_stat);
247: char *__GI_clnt_sperrno(enum clnt_stat);
File errno-loc.c:
24: int *__GI___errno_location(void);
File error.c:
172: static void print_errno_message(int);
File herrno-loc.c:
25: int *__GI___h_errno_location(void);
(gdb) p __errno_location()
$1 = (int *) 0xa7fff398
(gdb) watch *(int *) __errno_location()
Watchpoint 1: *(int *) __errno_location()
(gdb) continue
Continuing.
At start of main errno set to 2 != 0
[Inferior 1 (process 2071) exited with code 01]
(gdb) bt
No stack.
But the software breakpoint does not trigger before the test error.
Meanwhile the G4 runs kernel v6.18.7 (.config here -
https://pastebin.com/50UzSnAH).
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Glibc-bugs
mailing list