Synchronize libbierty sources with gcc.

This commit is contained in:
Nick Clifton
2022-07-04 13:57:12 +01:00
parent 407115429b
commit d8efadbdd9
5 changed files with 192 additions and 15 deletions

View File

@@ -1,3 +1,16 @@
2022-07-04 Nick Clifton <nickc@redhat.com>
* libiberty: Synchronize with GCC. Bring in:
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-04-12 Nick Clifton <nickc@redhat.com> 2022-04-12 Nick Clifton <nickc@redhat.com>
* zlib: Rebase to the 1.2.12 release. * zlib: Rebase to the 1.2.12 release.

View File

@@ -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> 2022-01-31 Nick Clifton <nickc@redhat.com>
PR 98886 PR demangler/98886
PR 99935 PR demangler/99935
* rust-demangle.c (struct rust_demangler): Add a recursion * rust-demangle.c (struct rust_demangler): Add a recursion
counter. counter.
(demangle_path): Increment/decrement the recursion counter upon (demangle_path): Increment/decrement the recursion counter upon
@@ -14,10 +152,6 @@
* regex.c: Suppress -Wuse-after-free. * 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> 2021-12-30 Lancelot SIX <lsix@lancelotsix.com>
* cp-demangle.c (d_clone_suffix): Support digits in clone tag * cp-demangle.c (d_clone_suffix): Support digits in clone tag

1
libiberty/configure vendored
View File

@@ -2461,6 +2461,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
# This works around the fact that libtool configuration may change LD # This works around the fact that libtool configuration may change LD
# for this particular configuration, but some shells, instead of # for this particular configuration, but some shells, instead of
# keeping the changes in LD private, export them just because LD is # keeping the changes in LD private, export them just because LD is

View File

@@ -2,6 +2,7 @@ dnl Process this file with autoconf to produce a configure script
AC_INIT AC_INIT
AC_CONFIG_SRCDIR([xmalloc.c]) AC_CONFIG_SRCDIR([xmalloc.c])
AC_CONFIG_MACRO_DIRS([../config])
# This works around the fact that libtool configuration may change LD # This works around the fact that libtool configuration may change LD
# for this particular configuration, but some shells, instead of # for this particular configuration, but some shells, instead of

View File

@@ -126,7 +126,7 @@ parse_integer_62 (struct rust_demangler *rdm)
return 0; return 0;
x = 0; x = 0;
while (!eat (rdm, '_')) while (!eat (rdm, '_') && !rdm->errored)
{ {
c = next (rdm); c = next (rdm);
x *= 62; x *= 62;
@@ -1082,6 +1082,18 @@ demangle_path_maybe_open_generics (struct rust_demangler *rdm)
if (rdm->errored) if (rdm->errored)
return open; 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')) if (eat (rdm, 'B'))
{ {
backref = parse_integer_62 (rdm); backref = parse_integer_62 (rdm);
@@ -1107,6 +1119,11 @@ demangle_path_maybe_open_generics (struct rust_demangler *rdm)
} }
else else
demangle_path (rdm, 0); demangle_path (rdm, 0);
end_of_func:
if (rdm->recursion != RUST_NO_RECURSION_LIMIT)
-- rdm->recursion;
return open; return open;
} }
@@ -1148,6 +1165,15 @@ demangle_const (struct rust_demangler *rdm)
if (rdm->errored) if (rdm->errored)
return; 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')) if (eat (rdm, 'B'))
{ {
backref = parse_integer_62 (rdm); backref = parse_integer_62 (rdm);
@@ -1158,7 +1184,7 @@ demangle_const (struct rust_demangler *rdm)
demangle_const (rdm); demangle_const (rdm);
rdm->next = old_next; rdm->next = old_next;
} }
return; goto pass_return;
} }
ty_tag = next (rdm); ty_tag = next (rdm);
@@ -1167,7 +1193,7 @@ demangle_const (struct rust_demangler *rdm)
/* Placeholder. */ /* Placeholder. */
case 'p': case 'p':
PRINT ("_"); PRINT ("_");
return; goto pass_return;
/* Unsigned integer types. */ /* Unsigned integer types. */
case 'h': case 'h':
@@ -1200,18 +1226,20 @@ demangle_const (struct rust_demangler *rdm)
break; break;
default: default:
rdm->errored = 1; goto fail_return;
return;
} }
if (rdm->errored) if (!rdm->errored && rdm->verbose)
return;
if (rdm->verbose)
{ {
PRINT (": "); PRINT (": ");
PRINT (basic_type (ty_tag)); PRINT (basic_type (ty_tag));
} }
fail_return:
rdm->errored = 1;
pass_return:
if (rdm->recursion != RUST_NO_RECURSION_LIMIT)
-- rdm->recursion;
} }
static void static void