summaryrefslogtreecommitdiff
path: root/libiberty/ChangeLog
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2018-12-07 11:32:55 +0000
committerNick Clifton <nickc@redhat.com>2018-12-07 11:32:55 +0000
commitaf03af8f55f2536b6e20928e6b1fa0324a5f3d6e (patch)
treefa6b5ef700e811c0d6bfaec08d2ebb8291dae17f /libiberty/ChangeLog
parent67bb16f345cb72740ab523018709c183ff3f8c8d (diff)
downloadbinutils-gdb-af03af8f55f2536b6e20928e6b1fa0324a5f3d6e.tar.gz
Synchronize libiberty with gcc and add --no-recruse-limit option to tools that support name demangling.
This patch addresses the multitude of bug reports about resource exhaustion in libiberty's name demangling code. It adds a limit to the amount of recursion that is allowed, before an error is triggered. It also adds a new demangling option to disable this limit. (The limit is enabled by default). PR 87681 PR 87675 PR 87636 PR 87335 libiberty * cp-demangle.h (struct d_info): Add recursion_limit field. * cp-demangle.c (d_function_type): If the recursion limit is enabled and reached, return with a failure result. (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. (demangle_nested_args): If the recursion limit is enabled and reached, return with a failure result. include * demangle.h (DMGL_RECURSE_LIMIT): Define. (DEMANGLE_RECURSION_LIMIT): Prototype. binutuils * addr2line.c (demangle_flags): New static variable. (long_options): Add --recurse-limit and --no-recurse-limit. (translate_address): Pass demangle_flags to bfd_demangle. (main): Handle --recurse-limit and --no-recurse-limit options. * cxxfilt.c (flags): Add DMGL_RECURSE_LIMIT. (long_options): Add --recurse-limit and --no-recurse-limit. (main): Handle new options. * dlltool.c (gen_def_file): Include DMGL_RECURSE_LIMIT in flags passed to cplus_demangle. * nm.c (demangle_flags): New static variable. (long_options): Add --recurse-limit and --no-recurse-limit. (main): Handle new options. * objdump.c (demangle_flags): New static variable. (usage): Add --recurse-limit and --no-recurse-limit. (long_options): Likewise. (objdump_print_symname): Pass demangle_flags to bfd_demangle. (disassemble_section): Likewise. (dump_dymbols): Likewise. (main): Handle new options. * prdbg.c (demangle_flags): New static variable. (tg_variable): Pass demangle_flags to demangler. (tg_start_function): Likewise. * stabs.c (demangle_flags): New static variable. (stab_demangle_template): Pass demangle_flags to demangler. (stab_demangle_v3_argtypes): Likewise. (stab_demangle_v3_arg): Likewise. * doc/binutuls.texi: Document new command line options. * NEWS: Mention the new feature. * testsuite/config/default.exp (CXXFILT): Define if not already defined. (CXXFILTFLAGS): Likewise. * testsuite/binutils-all/cxxfilt.exp: New file. Runs a few simple tests of the cxxfilt program.
Diffstat (limited to 'libiberty/ChangeLog')
-rw-r--r--libiberty/ChangeLog65
1 files changed, 65 insertions, 0 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index b9cbee3866f..6859027b683 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -1,3 +1,68 @@
+2018-12-07 Nick Clifton <nickc@redhat.com>
+
+ PR 87681
+ PR 87675
+ PR 87636
+ PR 87350
+ PR 87335
+ * 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.
+
+2018-10-23 Jason Merrill <jason@redhat.com>
+
+ Implement P0732R2, class types in non-type template parameters.
+ * cp-demangle.c (d_dump, d_make_comp, d_count_templates_scopes)
+ (d_print_comp_inner): Handle DEMANGLE_COMPONENT_TPARM_OBJ.
+ (d_special_name): Handle TA.
+ (d_expresion_1): Fix demangling of brace-enclosed initializer list.
+
+2018-10-31 Joseph Myers <joseph@codesourcery.com>
+
+ PR bootstrap/82856
+ Merge from binutils-gdb:
+ 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
+
+ * configure.ac: Remove AC_PREREQ.
+ * configure: Re-generate.
+ * config.in: Re-generate.
+
+2018-10-01 Nathan Sidwell <nathan@acm.org>
+
+ * configure.ac (checkfuncs): Add pipe2.
+ * config.in, configure: Rebuilt.
+ * pex-unix.c (pex_unix_exec_child): Comminicate errors from child
+ to parent with a pipe, when possible.
+
+2018-08-23 Nathan Sidwell <nathan@acm.org>
+ Martin Liska <mliska@suse.cz>
+
+ PR driver/87056
+ * pex-unix.c (pex_unix_exec_child): Duplicate bad_fn into local
+ scopes to avoid potential clobber.
+
+2018-08-20 Nathan Sidwell <nathan@acm.org>
+
+ * pex-unix.c (pex_child_error): Delete.
+ (pex_unix_exec_child): Commonize error paths to single message &
+ exit.
+
+2018-07-30 Tom Tromey <tom@tromey.com>
+
+ * cplus-dem.c (remember_Btype): Don't call memcpy with LEN==0.
+
2018-08-01 Richard Earnshaw <rearnsha@arm.com>
Copy over from GCC