Bring in fix for Binutils PR other/16240: Check for a failure return from

cplus_demangle_type.  This is the rev 1.50-1.51 change.

Our addr2line, etc.. would crash if used on C++ code that contains
certain symbol types.  One example is
_ZN13PatternDriver23StringScalarDeleteValueC1ERKNS_25ConflateStringScalarValueERKNS_25AbstractStringScalarValueERKNS_12TemplateEnumINS_12pdcomplementELZNS_16complement_namesEELZNS_14COMPLEMENTENUMEEEE
This commit is contained in:
David E. O'Brien 2008-01-29 16:12:06 +00:00
parent 1cf866da16
commit ac1a00f2eb

View File

@ -2396,6 +2396,8 @@ d_expr_primary (di)
const char *s; const char *s;
type = cplus_demangle_type (di); type = cplus_demangle_type (di);
if (type == NULL)
return NULL;
/* If we have a type we know how to print, we aren't going to /* If we have a type we know how to print, we aren't going to
print the type name itself. */ print the type name itself. */