NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: toolchain/59549: gdb is not ctype(3) safe
The following reply was made to PR toolchain/59549; it has been noted by GNATS.
From: Thomas Klausner <wiz%NetBSD.org@localhost>
To: Christos Zoulas <christos%zoulas.com@localhost>
Cc: NetBSD bugtracking <gnats-bugs%NetBSD.org@localhost>
Subject: Re: toolchain/59549: gdb is not ctype(3) safe
Date: Sat, 26 Jul 2025 11:55:29 +0200
On Fri, Jul 25, 2025 at 08:46:01AM -0400, Christos Zoulas wrote:
> I am not committing this because it is too intrusive, but see if it helps you.
Thank you!
Now I don't need to double up the gdb's, the gdb running Guitar
doesn't dump core any longer.
The backtrace of Guitar when it segfaults looks wrong though:
Thread 12 "" received signal SIGSEGV, Segmentation fault.
[Switching to LWP 26550 of process 27435]
0x000000000069d346 in __gmtime_r50 (t=0x7cb9f8ffe7f8, tm=0x7cba003bdf80 <tm>) at file/src/gmtime_r.c:13
warning: 13 file/src/gmtime_r.c: No such file or directory
(gdb) bt
#0 0x000000000069d346 in __gmtime_r50 (t=0x7cb9f8ffe7f8, tm=0x7cba003bdf80 <tm>) at file/src/gmtime_r.c:13
#1 0x000000000069d366 in __gmtime_r50 (t=<optimized out>, tm=0x7cba003bdf80 <tm>) at file/src/gmtime_r.c:14
#2 0x000000000069d366 in __gmtime_r50 (t=<optimized out>, tm=0x7cba003bdf80 <tm>) at file/src/gmtime_r.c:14
... and so on for more than 15000 frames, until I stopped it...
(gdb) p *t
$1 = 1753523442
(gdb) p *tm
$2 = {tm_sec = 42, tm_min = 50, tm_hour = 11, tm_mday = 26, tm_mon = 6, tm_year = 125, tm_wday = 6, tm_yday = 206, tm_isdst = 1, tm_gmtoff = 7200, tm_zone = 0x7cb9fb1d846c "CEST"}
Probably stack corruption, because why else would the same function be there >15000 times.
Thomas
Home |
Main Index |
Thread Index |
Old Index