[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:01:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78252
--- Comment #5 from Nathan Sidwell <nathan at gcc dot gnu.org> ---
Author: nathan
Date: Mon Dec 12 17:00:37 2016
New Revision: 243566
URL: https://gcc.gnu.org/viewcvs?rev=243566&root=gcc&view=rev
Log:
libiberty/
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.
gcc/testsuite/
PR c++/78252
* g++.dg/cpp1y/lambda-mangle-1.C: New.
Added:
trunk/gcc/testsuite/g++.dg/cpp1y/lambda-mangle-1.C
Modified:
trunk/gcc/testsuite/ChangeLog
trunk/libiberty/ChangeLog
trunk/libiberty/cp-demangle.c
trunk/libiberty/testsuite/demangle-expected
More information about the Gcc-bugs
mailing list