]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Import a patch from the GCC mainline to fix an infinite recursion in the Rust demangler.
authorNick Clifton <nickc@redhat.com>
Mon, 31 Jan 2022 14:38:12 +0000 (14:38 +0000)
committerNick Clifton <nickc@redhat.com>
Mon, 31 Jan 2022 14:38:12 +0000 (14:38 +0000)
commitf9cc7d02374c5aa2a8b0fd21c2427cddc722522a
tree3aaab07b578e4ece5a809fd352877a9dde3cda7f
parent78065316c251f4f57ce94bc0777558d475a5fe96
Import a patch from the GCC mainline to fix an infinite recursion in the Rust demangler.

PR 98886
PR 99935
* rust-demangle.c (struct rust_demangler): Add a recursion
counter.
(demangle_path): Increment/decrement the recursion counter upon
entry and exit.  Fail if the counter exceeds a fixed limit.
(demangle_type): Likewise.
(rust_demangle_callback): Initialise the recursion counter,
disabling if requested by the option flags.
libiberty/ChangeLog
libiberty/rust-demangle.c