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: Taylor R Campbell <riastradh%NetBSD.org@localhost>
To: Thomas Klausner <wiz%NetBSD.org@localhost>
Cc: gnats-bugs%NetBSD.org@localhost, netbsd-bugs%NetBSD.org@localhost
Subject: Re: toolchain/59549: gdb is not ctype(3) safe
Date: Sat, 26 Jul 2025 12:50:03 +0000
> #7 0x00000000006d15f9 in symbol_find_demangled_name () at /usr/src/exter=
nal/gpl3/gdb/lib/libgdb/../../dist/gdb/symtab.c:961
948 if (gsymbol->language () !=3D language_unknown)
949 {
950 const struct language_defn *lang =3D language_def (gsymbol->l=
anguage ());
951 =20
952 lang->sniff_from_mangled_name (mangled, &demangled);
953 return demangled;
954 }
955 =20
956 for (i =3D language_unknown; i < nr_languages; ++i)
957 {
958 enum language l =3D (enum language) i;
959 const struct language_defn *lang =3D language_def (l);
960 =20
=3D> 961 if (lang->sniff_from_mangled_name (mangled, &demangled))
If gdb doesn't know the language _of this symbol_ for demangling, it
will try all the languages' demangling methods, whether or not there's
any specific reason for Ada to be involved in this.
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).
I suggest filing a separate PR for the wip/Guitar issue.
Home |
Main Index |
Thread Index |
Old Index