Add a recursion limit to libiberty's demangling code. The limit is enabled by default, but can be disabled via a new demangling option. include * demangle.h (DMGL_NO_RECURSE_LIMIT): Define. (DEMANGLE_RECURSION_LIMIT): Define PR 87681 PR 87675 PR 87636 PR 87350 PR 87335 libiberty * cp-demangle.h (struct d_info): Add recursion_level field. * cp-demangle.c (d_function_type): Add recursion counter. If the recursion limit is reached and the check is not disabled, then return with a failure result. (cplus_demangle_init_info): Initialise the recursion_level field. (d_demangle_callback): If the recursion limit is enabled, check for a mangled string that is so long that there is not enough stack space for the local arrays. * cplus-dem.c (struct work): Add recursion_level field. (squangle_mop_up): Set the numb and numk fields to zero. (work_stuff_copy_to_from): Handle the case where a btypevec or ktypevec field is NULL. (demangle_nested_args): Add recursion counter. If the recursion limit is not disabled and reached, return with a failure result. From-SVN: r266886
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
gdb | Loading commit data... | |
COPYING | Loading commit data... | |
COPYING3 | Loading commit data... | |
ChangeLog | Loading commit data... | |
ChangeLog-9103 | Loading commit data... | |
ChangeLog.jit | Loading commit data... | |
ansidecl.h | Loading commit data... | |
demangle.h | Loading commit data... | |
dwarf2.def | Loading commit data... | |
dwarf2.h | Loading commit data... | |
dyn-string.h | Loading commit data... | |
environ.h | Loading commit data... | |
fibheap.h | Loading commit data... | |
filenames.h | Loading commit data... | |
floatformat.h | Loading commit data... | |
fnmatch.h | Loading commit data... | |
gcc-c-fe.def | Loading commit data... | |
gcc-c-interface.h | Loading commit data... | |
gcc-cp-fe.def | Loading commit data... | |
gcc-cp-interface.h | Loading commit data... | |
gcc-interface.h | Loading commit data... | |
getopt.h | Loading commit data... | |
gomp-constants.h | Loading commit data... | |
hashtab.h | Loading commit data... | |
hsa.h | Loading commit data... | |
leb128.h | Loading commit data... | |
libiberty.h | Loading commit data... | |
longlong.h | Loading commit data... | |
lto-symtab.h | Loading commit data... | |
md5.h | Loading commit data... | |
objalloc.h | Loading commit data... | |
obstack.h | Loading commit data... | |
partition.h | Loading commit data... | |
plugin-api.h | Loading commit data... | |
safe-ctype.h | Loading commit data... | |
sha1.h | Loading commit data... | |
simple-object.h | Loading commit data... | |
sort.h | Loading commit data... | |
splay-tree.h | Loading commit data... | |
symcat.h | Loading commit data... | |
timeval-utils.h | Loading commit data... | |
unique-ptr.h | Loading commit data... | |
vtv-change-permission.h | Loading commit data... | |
xregex.h | Loading commit data... | |
xregex2.h | Loading commit data... | |
xtensa-config.h | Loading commit data... |