[Bug other/78252] C++ demangler crashes with infinite recursion with lambda (auto)
nathan at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Dec 12 17:39:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78252
--- Comment #6 from Nathan Sidwell <nathan at gcc dot gnu.org> ---
Author: nathan
Date: Mon Dec 12 17:38:53 2016
New Revision: 243568
URL: https://gcc.gnu.org/viewcvs?rev=243568&root=gcc&view=rev
Log:
PR c++/78252
* cp-demangle.c (struct d_print_info): Add is_lambda_arg field.
(d_print_init): Initialize it.
(d_print_comp_inner) <DEMANGLE_COMPONENT_TEMPLATE_PARAM>: Check
is_lambda_arg for auto.
<DEMANGLE_COMPONENT_REFERENCE,
DEMANGLE_COMPONENT_RVALUE_REFERENCE>: Skip smashing check when
is_lambda_arg.
<DEMANGLE_COMPONENT_LAMBDA>: Increment is_lambda_arg around arg
printing.
* testsuite/demangle-expected: Add lambda auto mangling cases.
Modified:
branches/gcc-6-branch/libiberty/ChangeLog
branches/gcc-6-branch/libiberty/cp-demangle.c
branches/gcc-6-branch/libiberty/testsuite/demangle-expected
More information about the Gcc-bugs
mailing list