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: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: toolchain/59549: gdb is not ctype(3) safe
Date: Wed, 6 Aug 2025 15:37:27 +0200

 On Sun, Jul 27, 2025 at 01:35:01PM +0000, Taylor R Campbell via gnats wrote:
 > The following reply was made to PR toolchain/59549; it has been noted by GNATS.
 > 
 > From: Taylor R Campbell <riastradh%NetBSD.org@localhost>
 > To: Christos Zoulas <christos%zoulas.com@localhost>
 > Cc: gnats-bugs%netbsd.org@localhost, toolchain-manager%netbsd.org@localhost,
 > 	gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost, Thomas Klausner <wiz%NetBSD.org@localhost>
 > Subject: Re: toolchain/59549: gdb is not ctype(3) safe
 > Date: Sun, 27 Jul 2025 13:31:22 +0000
 > 
 >  > Date: Sat, 26 Jul 2025 10:06:15 -0400
 >  > From: Christos Zoulas <christos%zoulas.com@localhost>
 >  > 
 >  > > We should just patch gdb locally and file an upstream bug, basic case
 >  > > of clear undefined behaviour that is triggered in real-world use.
 >  > > Christos's patch looks fine to me (but I did not check whether there
 >  > > are any missing cases).
 >  > 
 >  > There are a few more missing, I thought of changing all of the ctype
 >  > macros to gdb_isfoo() instead of all the local casts.
 >  
 >  Let's let upstream decide how they want to tidy things up (there is
 >  already a `safe-ctype.h' in binutils with uppercase macros instead,
 >  restricted to char inputs that are never EOF, but I don't know whether
 >  it's appropriate here).
 >  
 >  >                                                       I think we should
 >  > let upstream fix it first.
 >  
 >  This is actively interfering with development and debugging on NetBSD,
 >  so it is a high priority to work around while we wait for upstream.
 >  We should just make sure that we're not applying this to any cases
 >  that might legitimately have EOF in the domain.
 >  
 >  If upstream does it differently, no big deal, we can just replace our
 >  local patch by their different patch later.
 
 Tom Tromey has resolved this in upstream now:
 https://sourceware.org/pipermail/gdb-patches/2025-August/219746.html
 https://sourceware.org/pipermail/gdb-patches/2025-August/219747.html
 https://sourceware.org/pipermail/gdb-patches/2025-August/219748.html
 https://sourceware.org/pipermail/gdb-patches/2025-August/219749.html
 
  Thomas
 


Home | Main Index | Thread Index | Old Index