NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: port-mips/59064 (jemalloc switch to 5.3 broke userland)
If I run in live gdb, it works fine -- the value v0 fished out of the
GOT seems plausible:
(gdb) set environment LD_LIBRARY_PATH = /var/tmp/20250413/lib
(gdb) break malloc_default
Function "malloc_default" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (malloc_default) pending.
(gdb) run
Starting program: /var/tmp/20250413/rdhwr
tcb_syscall 0x786b2000
tcb_rdhwr 0x786b2000
Breakpoint 1, 0x7853be1c in malloc_default ()
from /var/tmp/20250413/lib/libc.so.12
(gdb) display/i $pc
1: x/i $pc
=> 0x7853be1c <malloc_default+20>: lw v0,-23368(gp)
(gdb) si
0x7853be20 in malloc_default () from /var/tmp/20250413/lib/libc.so.12
1: x/i $pc
=> 0x7853be20 <malloc_default+24>: .word 0x7c03e83b
(gdb) si
0x7853be24 in malloc_default () from /var/tmp/20250413/lib/libc.so.12
1: x/i $pc
=> 0x7853be24 <malloc_default+28>: sd s1,64(sp)
(gdb) print $v0
$1 = -28664
(gdb) print (void *)$v1
$2 = (void *) 0x786b9008
I get the same address in $gp live or post-mortem:
(gdb) print (void *)$gp
$4 = (void *) 0x78694270 <path+752>
So whatever is initializing -23368(gp), that is, 0x7868e728, in the
GOT, seems to be doing something wrong -- but only when run normally,
not under gdb!
Home |
Main Index |
Thread Index |
Old Index