re PR other/22268 (libiberty demanger crashes on (invalid) mangled name)
PR other/22268 * cp-demangle.c (d_expr_primary): Don't run off the end of the string while looking for the end of a literal value. * testsuite/demangle-expected: Add test case. From-SVN: r101506
This commit is contained in:
parent
200bbdcecb
commit
8c7262afc3
@ -1,3 +1,10 @@
|
||||
2005-07-01 Ian Lance Taylor <ian@airs.com>
|
||||
|
||||
PR other/22268
|
||||
* cp-demangle.c (d_expr_primary): Don't run off the end of the
|
||||
string while looking for the end of a literal value.
|
||||
* testsuite/demangle-expected: Add test case.
|
||||
|
||||
2005-06-30 Daniel Berlin <dberlin@dberlin.org>
|
||||
|
||||
* hashtab.c (EMPTY_ENTRY): Moved and renamed.
|
||||
|
@ -2337,7 +2337,11 @@ d_expr_primary (struct d_info *di)
|
||||
}
|
||||
s = d_str (di);
|
||||
while (d_peek_char (di) != 'E')
|
||||
d_advance (di, 1);
|
||||
{
|
||||
if (d_peek_char (di) == '\0')
|
||||
return NULL;
|
||||
d_advance (di, 1);
|
||||
}
|
||||
ret = d_make_comp (di, t, type, d_make_name (di, s, d_str (di) - s));
|
||||
}
|
||||
if (d_next_char (di) != 'E')
|
||||
|
@ -3704,6 +3704,12 @@ foo<int (*) [3]>
|
||||
_ZN13PatternDriver23StringScalarDeleteValueC1ERKNS_25ConflateStringScalarValueERKNS_25AbstractStringScalarValueERKNS_12TemplateEnumINS_12pdcomplementELZNS_16complement_namesEELZNS_14COMPLEMENTENUMEEEE
|
||||
_ZN13PatternDriver23StringScalarDeleteValueC1ERKNS_25ConflateStringScalarValueERKNS_25AbstractStringScalarValueERKNS_12TemplateEnumINS_12pdcomplementELZNS_16complement_namesEELZNS_14COMPLEMENTENUMEEEE
|
||||
PatternDriver::StringScalarDeleteValue::StringScalarDeleteValue
|
||||
#
|
||||
# This used to cause the demangler to walk into undefined memory--PR 22268
|
||||
--format=gnu-v3 --no-params
|
||||
ALsetchannels
|
||||
ALsetchannels
|
||||
ALsetchannels
|
||||
# Test GNU V3 constructor and destructor identification.
|
||||
# 0 means it is not a constructor/destructor.
|
||||
# Other integers correspond to enum gnu_v3_{c,d}tor_kinds in demangle.h.
|
||||
|
Loading…
Reference in New Issue
Block a user