[Bug d/33200] Segfault in d_lookup_symbol at gdb/d-namespace.c

ibuclaw at gdcproject dot org sourceware-bugzilla@sourceware.org
Wed Jul 23 11:42:46 GMT 2025


https://sourceware.org/bugzilla/show_bug.cgi?id=33200

--- Comment #1 from Iain Buclaw <ibuclaw at gdcproject dot org> ---
No reduced test, but seen in complex builds such as gcc's d21 compiler binary.

Patch for reference.

--- a/gdb/d-namespace.c
+++ b/gdb/d-namespace.c
@@ -131,6 +131,10 @@ d_lookup_symbol (const struct language_defn *langdef,
            return {};

          type = check_typedef (lang_this.symbol->type ()->target_type ());
+         /* If type name is NULL, abandon trying to find this symbol.  */
+         if (type->name () == NULL)
+           return {};
+
          classname = type->name ();
          nested = name;
        }

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Gdb-prs mailing list