summaryrefslogtreecommitdiffstats
path: root/contrib/binutils/libiberty
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2008-01-29 16:12:06 +0000
committerobrien <obrien@FreeBSD.org>2008-01-29 16:12:06 +0000
commit2e6f1b26dbf52b25a354bb58ba058fb297b526ea (patch)
treeee59618930fdd273b25d8358de7b2c054c48b32f /contrib/binutils/libiberty
parent415b6dd3be7d3fd3a48d8bc05b2e370b694e3626 (diff)
downloadFreeBSD-src-2e6f1b26dbf52b25a354bb58ba058fb297b526ea.zip
FreeBSD-src-2e6f1b26dbf52b25a354bb58ba058fb297b526ea.tar.gz
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
Diffstat (limited to 'contrib/binutils/libiberty')
-rw-r--r--contrib/binutils/libiberty/cp-demangle.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/contrib/binutils/libiberty/cp-demangle.c b/contrib/binutils/libiberty/cp-demangle.c
index 19f191e..bb543fa 100644
--- a/contrib/binutils/libiberty/cp-demangle.c
+++ b/contrib/binutils/libiberty/cp-demangle.c
@@ -2396,6 +2396,8 @@ d_expr_primary (di)
const char *s;
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
print the type name itself. */
OpenPOWER on IntegriCloud