[Bug demangler/98886] stack overflow in cxxfilt, demangle_type, rust-demangle.c:854

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Jan 31 14:33:58 GMT 2022


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98886

--- Comment #11 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Nick Clifton <nickc@gcc.gnu.org>:

https://gcc.gnu.org/g:f10bec5ffa487ad3033ed5f38cfd0fc7d696deab

commit r12-6945-gf10bec5ffa487ad3033ed5f38cfd0fc7d696deab
Author: Nick Clifton <nickc@redhat.com>
Date:   Mon Jan 31 14:28:42 2022 +0000

    libiberty: Fix infinite recursion in rust demangler.

    libiberty/
            PR demangler/98886
            PR demangler/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.


More information about the Gcc-bugs mailing list