aboutsummaryrefslogtreecommitdiff
path: root/libiberty
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2022-07-04 13:57:12 +0100
committerNick Clifton <nickc@redhat.com>2022-07-04 13:57:12 +0100
commitd8efadbdd94772562fed8fba9ce553587a62550f (patch)
tree429e8a0d1173e3c6cf2cca653d07ed9bdf8eddbb /libiberty
parent407115429b349a55561213a61e910756c965f902 (diff)
downloadgdb-d8efadbdd94772562fed8fba9ce553587a62550f.zip
gdb-d8efadbdd94772562fed8fba9ce553587a62550f.tar.gz
gdb-d8efadbdd94772562fed8fba9ce553587a62550f.tar.bz2
Synchronize libbierty sources with gcc.
Diffstat (limited to 'libiberty')
-rw-r--r--libiberty/ChangeLog146
-rwxr-xr-xlibiberty/configure1
-rw-r--r--libiberty/configure.ac1
-rw-r--r--libiberty/rust-demangle.c46
4 files changed, 179 insertions, 15 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index de3a6ee..f84e407 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -1,7 +1,145 @@
+2022-07-01 Nick Clifton <nickc@redhat.com>
+
+ PR demangler/105039
+ * rust-demangle.c (demangle_const): Add recursion limit.
+
+2022-06-26 Simon Marchi <simon.marchi@efficios.com>
+
+ * configure.ac: Add AC_CONFIG_MACRO_DIRS call.
+ * configure: Re-generate.
+
+2022-05-23 Nathan Sidwell <nathan@acm.org>
+
+ * cp-demangle.c (d_make_comp): Adjust.
+ (d_name, d_prefix): Adjust subst handling. Add module handling.
+ (d_maybe_module_name): New.
+ (d_unqualified_name): Add incoming module parm. Handle it. Adjust all callers.
+ (d_special_name): Add 'GI' support.
+ (d_count_template_scopes): Adjust.
+ (d_print_comp_inner): Print module.
+ * testsuite/demangle-expected: New test cases
+
+2022-05-18 Nathan Sidwell <nathan@acm.org>
+
+ * cp-demangle.c (d_name): Add SUBSTABLE parameter,
+ push substitution if requested. Adjust unscoped name handling.
+ (d_prefix): Reorder main loop. Adjust all calls.
+ (d_unqualified_name): Add SCOPE parameter, create qualified
+ name here. Adjust all calls.
+ (cplus_demangle_type): Do not handle 'S' here, leave all
+ to d_class_enum_type.
+ (d_class_enum_type): Add SUBSTABLE parameter.
+
+2022-05-17 Nathan Sidwell <nathan@acm.org>
+
+ * cp-demangle.c (d_make_comp): Adjust.
+ (d_unqualified_name): Add 'DC' support.
+ (d_count_template_scopes): Adjust.
+ (d_print_comp_inner): Add structured binding.
+ * testsuite/demangle-expected: Add testcases.
+
+2022-05-10 Martin Liska <mliska@suse.cz>
+
+ * regex.c: Restore comments.
+
+2022-05-10 Martin Liska <mliska@suse.cz>
+ Alan Modra <amodra@gmail.com>
+
+ * hashtab.c (htab_empty): Use void * type instead of void **.
+ (htab_expand): Likewise.
+
+2022-05-10 Martin Liska <mliska@suse.cz>
+
+ * random.c: Remove 'define PTR'.
+
+2022-05-10 Martin Liska <mliska@suse.cz>
+
+ * alloca.c (C_alloca): Use void * instead PTR.
+ * calloc.c (malloc): Likewise.
+ (bzero): Likewise.
+ (calloc): Likewise.
+ * hashtab.c (find_empty_slot_for_expand): Likewise.
+ (eq_pointer): Likewise.
+ (htab_create_alloc_ex): Likewise.
+ (htab_create_typed_alloc): Likewise.
+ (htab_set_functions_ex): Likewise.
+ (htab_delete): Likewise.
+ (htab_empty): Likewise.
+ (htab_expand): Likewise.
+ (htab_find_with_hash): Likewise.
+ (htab_find): Likewise.
+ (htab_find_slot_with_hash): Likewise.
+ (htab_find_slot): Likewise.
+ (htab_remove_elt): Likewise.
+ (htab_remove_elt_with_hash): Likewise.
+ (htab_clear_slot): Likewise.
+ (htab_traverse_noresize): Likewise.
+ (htab_traverse): Likewise.
+ (htab_hash_string): Likewise.
+ (iterative_hash): Likewise.
+ (hash_pointer): Likewise.
+ * memchr.c (memchr): Likewise.
+ * memcmp.c (memcmp): Likewise.
+ * memcpy.c (memcpy): Likewise.
+ * memmove.c (memmove): Likewise.
+ * mempcpy.c (memcpy): Likewise.
+ (mempcpy): Likewise.
+ * memset.c (memset): Likewise.
+ * objalloc.c (malloc): Likewise.
+ (free): Likewise.
+ (objalloc_create): Likewise.
+ (_objalloc_alloc): Likewise.
+ (objalloc_free_block): Likewise.
+ * random.c (PTR): Likewise.
+ (void): Likewise.
+ (initstate): Likewise.
+ (setstate): Likewise.
+ * regex.c: Likewise.
+ * spaces.c (malloc): Likewise.
+ (free): Likewise.
+ * stpcpy.c (memcpy): Likewise.
+ * strdup.c (malloc): Likewise.
+ (memcpy): Likewise.
+ * strerror.c (malloc): Likewise.
+ (memset): Likewise.
+ * strndup.c (malloc): Likewise.
+ (memcpy): Likewise.
+ * strsignal.c (malloc): Likewise.
+ (memset): Likewise.
+ * vasprintf.c (malloc): Likewise.
+ * vprintf-support.c: Likewise.
+ * xatexit.c (malloc): Likewise.
+ * xmalloc.c (xmalloc): Likewise.
+ (xcalloc): Likewise.
+ (xrealloc): Likewise.
+ * xmemdup.c (xmemdup): Likewise.
+
+2022-03-19 Tiezhu Yang <yangtiezhu@loongson.cn>
+
+ * floatformat.c (floatformat_ieee_quad_big): Renamed from
+ floatformat_ia64_quad_big.
+ (floatformat_ieee_quad_little): Similarly.
+
+2022-02-22 Jakub Jelinek <jakub@redhat.com>
+
+ PR lto/104617
+ * simple-object-elf.c (simple_object_elf_match): Fix up URL
+ in comment.
+ (simple_object_elf_copy_lto_debug_sections): Remap sh_info and
+ sh_link even if they are in the SHN_LORESERVE .. SHN_HIRESERVE
+ range (inclusive).
+
+2022-02-17 Mark Wielaard <mark@klomp.org>
+
+ * rust-demangle.c (rust_demangle_callback): Ignore everything
+ after '.' char in sym for v0. For legacy symbols search
+ backwards to find the last 'E' before any '.'.
+ * testsuite/rust-demangle-expected: Add new .suffix testcases.
+
2022-01-31 Nick Clifton <nickc@redhat.com>
- PR 98886
- PR 99935
+ PR demangler/98886
+ PR demangler/99935
* rust-demangle.c (struct rust_demangler): Add a recursion
counter.
(demangle_path): Increment/decrement the recursion counter upon
@@ -14,10 +152,6 @@
* regex.c: Suppress -Wuse-after-free.
-2022-01-22 Nick Clifton <nickc@redhat.com>
-
- * 2.38 release branch created.
-
2021-12-30 Lancelot SIX <lsix@lancelotsix.com>
* cp-demangle.c (d_clone_suffix): Support digits in clone tag
diff --git a/libiberty/configure b/libiberty/configure
index e09ddd9..306c07bd 100755
--- a/libiberty/configure
+++ b/libiberty/configure
@@ -2461,6 +2461,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
# This works around the fact that libtool configuration may change LD
# for this particular configuration, but some shells, instead of
# keeping the changes in LD private, export them just because LD is
diff --git a/libiberty/configure.ac b/libiberty/configure.ac
index f59f35e..6c1ff9c 100644
--- a/libiberty/configure.ac
+++ b/libiberty/configure.ac
@@ -2,6 +2,7 @@ dnl Process this file with autoconf to produce a configure script
AC_INIT
AC_CONFIG_SRCDIR([xmalloc.c])
+AC_CONFIG_MACRO_DIRS([../config])
# This works around the fact that libtool configuration may change LD
# for this particular configuration, but some shells, instead of
diff --git a/libiberty/rust-demangle.c b/libiberty/rust-demangle.c
index bb58d90..d6daf23 100644
--- a/libiberty/rust-demangle.c
+++ b/libiberty/rust-demangle.c
@@ -126,7 +126,7 @@ parse_integer_62 (struct rust_demangler *rdm)
return 0;
x = 0;
- while (!eat (rdm, '_'))
+ while (!eat (rdm, '_') && !rdm->errored)
{
c = next (rdm);
x *= 62;
@@ -1082,6 +1082,18 @@ demangle_path_maybe_open_generics (struct rust_demangler *rdm)
if (rdm->errored)
return open;
+ if (rdm->recursion != RUST_NO_RECURSION_LIMIT)
+ {
+ ++ rdm->recursion;
+ if (rdm->recursion > RUST_MAX_RECURSION_COUNT)
+ {
+ /* FIXME: There ought to be a way to report
+ that the recursion limit has been reached. */
+ rdm->errored = 1;
+ goto end_of_func;
+ }
+ }
+
if (eat (rdm, 'B'))
{
backref = parse_integer_62 (rdm);
@@ -1107,6 +1119,11 @@ demangle_path_maybe_open_generics (struct rust_demangler *rdm)
}
else
demangle_path (rdm, 0);
+
+ end_of_func:
+ if (rdm->recursion != RUST_NO_RECURSION_LIMIT)
+ -- rdm->recursion;
+
return open;
}
@@ -1148,6 +1165,15 @@ demangle_const (struct rust_demangler *rdm)
if (rdm->errored)
return;
+ if (rdm->recursion != RUST_NO_RECURSION_LIMIT)
+ {
+ ++ rdm->recursion;
+ if (rdm->recursion > RUST_MAX_RECURSION_COUNT)
+ /* FIXME: There ought to be a way to report
+ that the recursion limit has been reached. */
+ goto fail_return;
+ }
+
if (eat (rdm, 'B'))
{
backref = parse_integer_62 (rdm);
@@ -1158,7 +1184,7 @@ demangle_const (struct rust_demangler *rdm)
demangle_const (rdm);
rdm->next = old_next;
}
- return;
+ goto pass_return;
}
ty_tag = next (rdm);
@@ -1167,7 +1193,7 @@ demangle_const (struct rust_demangler *rdm)
/* Placeholder. */
case 'p':
PRINT ("_");
- return;
+ goto pass_return;
/* Unsigned integer types. */
case 'h':
@@ -1200,18 +1226,20 @@ demangle_const (struct rust_demangler *rdm)
break;
default:
- rdm->errored = 1;
- return;
+ goto fail_return;
}
- if (rdm->errored)
- return;
-
- if (rdm->verbose)
+ if (!rdm->errored && rdm->verbose)
{
PRINT (": ");
PRINT (basic_type (ty_tag));
}
+
+ fail_return:
+ rdm->errored = 1;
+ pass_return:
+ if (rdm->recursion != RUST_NO_RECURSION_LIMIT)
+ -- rdm->recursion;
}
static void