Hi!
I've backported the fuzzing/exploit fixes for the demangler to 6.x, 5.x and
4.9.x branches. Enhancements etc. I've left out.
To 6.x just the first two parts of the first patch, to 5.x the first 3
patches, to 4.9.x all the patches.
Jakub
2016-05-19 Jakub Jelinek <[email protected]>
Backported from mainline
2016-05-19 Jakub Jelinek <[email protected]>
PR c++/70498
* cp-demangle.c (d_expression_1): Formatting fix.
2016-05-02 Marcel Böhme <[email protected]>
PR c++/70498
* cp-demangle.c: Parse numbers as integer instead of long to avoid
overflow after sanity checks. Include <limits.h> if available.
(INT_MAX): Define if necessary.
(d_make_template_param): Takes integer argument instead of long.
(d_make_function_param): Likewise.
(d_append_num): Likewise.
(d_identifier): Likewise.
(d_number): Parse as and return integer.
(d_compact_number): Handle overflow.
(d_source_name): Change variable type to integer for parsed number.
(d_java_resource): Likewise.
(d_special_name): Likewise.
(d_discriminator): Likewise.
(d_unnamed_type): Likewise.
* testsuite/demangle-expected: Add regression test cases.
2016-04-08 Marcel Böhme <[email protected]>
PR c++/69687
* cplus-dem.c: Include <limits.h> if available.
(INT_MAX): Define if necessary.
(remember_type, remember_Ktype, register_Btype, string_need):
Abort if we detect cases where we the size of the allocation would
overflow.
PR c++/70492
* cplus-dem.c (gnu_special): Handle case where consume_count returns
-1.
2016-03-31 Mikhail Maltsev <[email protected]>
Marcel Bohme <[email protected]>
PR c++/67394
PR c++/70481
* cplus-dem.c (squangle_mop_up): Zero bsize/ksize after freeing
btypevec/ktypevec.
* testsuite/demangle-expected: Add coverage tests.
--- libiberty/cplus-dem.c (revision 234094)
+++ libiberty/cplus-dem.c (revision 236433)
@@ -56,6 +56,13 @@ void * malloc ();
void * realloc ();
#endif
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
+#endif
+#ifndef INT_MAX
+# define INT_MAX (int)(((unsigned int) ~0) >> 1) /* 0x7FFFFFFF
*/
+#endif
+
#include <demangle.h>
#undef CURRENT_DEMANGLING_STYLE
#define CURRENT_DEMANGLING_STYLE work->options
@@ -1237,11 +1244,13 @@ squangle_mop_up (struct work_stuff *work
{
free ((char *) work -> btypevec);
work->btypevec = NULL;
+ work->bsize = 0;
}
if (work -> ktypevec != NULL)
{
free ((char *) work -> ktypevec);
work->ktypevec = NULL;
+ work->ksize = 0;
}
}
@@ -2999,6 +3008,11 @@ gnu_special (struct work_stuff *work, co
success = 1;
break;
}
+ else if (n == -1)
+ {
+ success = 0;
+ break;
+ }
}
else
{
@@ -4254,6 +4268,8 @@ remember_type (struct work_stuff *work,
}
else
{
+ if (work -> typevec_size > INT_MAX / 2)
+ xmalloc_failed (INT_MAX);
work -> typevec_size *= 2;
work -> typevec
= XRESIZEVEC (char *, work->typevec, work->typevec_size);
@@ -4281,6 +4297,8 @@ remember_Ktype (struct work_stuff *work,
}
else
{
+ if (work -> ksize > INT_MAX / 2)
+ xmalloc_failed (INT_MAX);
work -> ksize *= 2;
work -> ktypevec
= XRESIZEVEC (char *, work->ktypevec, work->ksize);
@@ -4310,6 +4328,8 @@ register_Btype (struct work_stuff *work)
}
else
{
+ if (work -> bsize > INT_MAX / 2)
+ xmalloc_failed (INT_MAX);
work -> bsize *= 2;
work -> btypevec
= XRESIZEVEC (char *, work->btypevec, work->bsize);
@@ -4764,6 +4784,8 @@ string_need (string *s, int n)
else if (s->e - s->p < n)
{
tem = s->p - s->b;
+ if (n > INT_MAX / 2 - tem)
+ xmalloc_failed (INT_MAX);
n += tem;
n *= 2;
s->b = XRESIZEVEC (char, s->b, n);
--- libiberty/cp-demangle.c (revision 234094)
+++ libiberty/cp-demangle.c (revision 236433)
@@ -128,6 +128,13 @@ extern char *alloca ();
# endif /* alloca */
#endif /* HAVE_ALLOCA_H */
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
+#endif
+#ifndef INT_MAX
+# define INT_MAX (int)(((unsigned int) ~0) >> 1) /* 0x7FFFFFFF
*/
+#endif
+
#include "ansidecl.h"
#include "libiberty.h"
#include "demangle.h"
@@ -398,7 +405,7 @@ d_make_dtor (struct d_info *, enum gnu_v
struct demangle_component *);
static struct demangle_component *
-d_make_template_param (struct d_info *, long);
+d_make_template_param (struct d_info *, int);
static struct demangle_component *
d_make_sub (struct d_info *, const char *, int);
@@ -421,9 +428,9 @@ static struct demangle_component *d_unqu
static struct demangle_component *d_source_name (struct d_info *);
-static long d_number (struct d_info *);
+static int d_number (struct d_info *);
-static struct demangle_component *d_identifier (struct d_info *, long);
+static struct demangle_component *d_identifier (struct d_info *, int);
static struct demangle_component *d_operator_name (struct d_info *);
@@ -1119,7 +1126,7 @@ d_make_dtor (struct d_info *di, enum gnu
/* Add a new template parameter. */
static struct demangle_component *
-d_make_template_param (struct d_info *di, long i)
+d_make_template_param (struct d_info *di, int i)
{
struct demangle_component *p;
@@ -1135,7 +1142,7 @@ d_make_template_param (struct d_info *di
/* Add a new function parameter. */
static struct demangle_component *
-d_make_function_param (struct d_info *di, long i)
+d_make_function_param (struct d_info *di, int i)
{
struct demangle_component *p;
@@ -1620,7 +1627,7 @@ d_unqualified_name (struct d_info *di)
static struct demangle_component *
d_source_name (struct d_info *di)
{
- long len;
+ int len;
struct demangle_component *ret;
len = d_number (di);
@@ -1633,12 +1640,12 @@ d_source_name (struct d_info *di)
/* number ::= [n] <(non-negative decimal integer)> */
-static long
+static int
d_number (struct d_info *di)
{
int negative;
char peek;
- long ret;
+ int ret;
negative = 0;
peek = d_peek_char (di);
@@ -1681,7 +1688,7 @@ d_number_component (struct d_info *di)
/* identifier ::= <(unqualified source code identifier)> */
static struct demangle_component *
-d_identifier (struct d_info *di, long len)
+d_identifier (struct d_info *di, int len)
{
const char *name;
@@ -1702,7 +1709,7 @@ d_identifier (struct d_info *di, long le
/* Look for something which looks like a gcc encoding of an
anonymous namespace, and replace it with a more user friendly
name. */
- if (len >= (long) ANONYMOUS_NAMESPACE_PREFIX_LEN + 2
+ if (len >= (int) ANONYMOUS_NAMESPACE_PREFIX_LEN + 2
&& memcmp (name, ANONYMOUS_NAMESPACE_PREFIX,
ANONYMOUS_NAMESPACE_PREFIX_LEN) == 0)
{
@@ -1870,7 +1877,7 @@ d_java_resource (struct d_info *di)
{
struct demangle_component *p = NULL;
struct demangle_component *next = NULL;
- long len, i;
+ int len, i;
char c;
const char *str;
@@ -2012,7 +2019,7 @@ d_special_name (struct d_info *di)
case 'C':
{
struct demangle_component *derived_type;
- long offset;
+ int offset;
struct demangle_component *base_type;
derived_type = cplus_demangle_type (di);
@@ -2946,10 +2953,10 @@ d_pointer_to_member_type (struct d_info
/* <non-negative number> _ */
-static long
+static int
d_compact_number (struct d_info *di)
{
- long num;
+ int num;
if (d_peek_char (di) == '_')
num = 0;
else if (d_peek_char (di) == 'n')
@@ -2957,7 +2964,7 @@ d_compact_number (struct d_info *di)
else
num = d_number (di) + 1;
- if (! d_check_char (di, '_'))
+ if (num < 0 || ! d_check_char (di, '_'))
return -1;
return num;
}
@@ -2969,7 +2976,7 @@ d_compact_number (struct d_info *di)
static struct demangle_component *
d_template_param (struct d_info *di)
{
- long param;
+ int param;
if (! d_check_char (di, 'T'))
return NULL;
@@ -3171,9 +3178,10 @@ d_expression_1 (struct d_info *di)
}
else
{
- index = d_compact_number (di) + 1;
- if (index == 0)
+ index = d_compact_number (di);
+ if (index == INT_MAX || index == -1)
return NULL;
+ index++;
}
return d_make_function_param (di, index);
}
@@ -3502,7 +3510,7 @@ d_local_name (struct d_info *di)
static int
d_discriminator (struct d_info *di)
{
- long discrim;
+ int discrim;
if (d_peek_char (di) != '_')
return 1;
@@ -3558,7 +3566,7 @@ static struct demangle_component *
d_unnamed_type (struct d_info *di)
{
struct demangle_component *ret;
- long num;
+ int num;
if (! d_check_char (di, 'U'))
return NULL;
@@ -4086,10 +4094,10 @@ d_append_string (struct d_print_info *dp
}
static inline void
-d_append_num (struct d_print_info *dpi, long l)
+d_append_num (struct d_print_info *dpi, int l)
{
char buf[25];
- sprintf (buf,"%ld", l);
+ sprintf (buf,"%d", l);
d_append_string (dpi, buf);
}
--- libiberty/testsuite/demangle-expected (revision 234094)
+++ libiberty/testsuite/demangle-expected (revision 236433)
@@ -4421,3 +4421,23 @@ void baz<int>(A<sizeof (foo((int)(), (fl
--format=gnu-v3
_Z3fooI1FEN1XIXszdtcl1PclcvT__EEE5arrayEE4TypeEv
X<sizeof ((P(((F)())())).array)>::Type foo<F>()
+#
+# Tests a use-after-free problem PR70481
+
+_Q.__0
+::Q.(void)
+#
+# Tests a use-after-free problem PR70481
+
+_Q10-__9cafebabe.
+cafebabe.::-(void)
+#
+# Tests integer overflow problem PR70492
+
+__vt_90000000000cafebabe
+__vt_90000000000cafebabe
+#
+# Tests write access violation PR70498
+
+_Z80800000000000000000000
+_Z80800000000000000000000
2016-05-19 Jakub Jelinek <[email protected]>
Backported from mainline
2015-11-27 Pedro Alves <[email protected]>
PR other/61321
PR other/61233
* demangle.h (enum demangle_component_type)
<DEMANGLE_COMPONENT_CONVERSION>: New value.
* cp-demangle.c (d_demangle_callback, d_make_comp): Handle
DEMANGLE_COMPONENT_CONVERSION.
(is_ctor_dtor_or_conversion): Handle DEMANGLE_COMPONENT_CONVERSION
instead of DEMANGLE_COMPONENT_CAST.
(d_operator_name): Return a DEMANGLE_COMPONENT_CONVERSION
component if handling a conversion.
(d_count_templates_scopes, d_print_comp_inner): Handle
DEMANGLE_COMPONENT_CONVERSION.
(d_print_comp_inner): Handle DEMANGLE_COMPONENT_CONVERSION instead
of DEMANGLE_COMPONENT_CAST.
(d_print_cast): Rename as ...
(d_print_conversion): ... this. Adjust comments.
(d_print_cast): Rewrite - simply print the left subcomponent.
* cp-demint.c (cplus_demangle_fill_component): Handle
DEMANGLE_COMPONENT_CONVERSION.
* testsuite/demangle-expected: Add tests.
--- include/demangle.h (revision 231019)
+++ include/demangle.h (revision 231020)
@@ -379,6 +379,10 @@ enum demangle_component_type
/* A typecast, represented as a unary operator. The one subtree is
the type to which the argument should be cast. */
DEMANGLE_COMPONENT_CAST,
+ /* A conversion operator, represented as a unary operator. The one
+ subtree is the type to which the argument should be converted
+ to. */
+ DEMANGLE_COMPONENT_CONVERSION,
/* A nullary expression. The left subtree is the operator. */
DEMANGLE_COMPONENT_NULLARY,
/* A unary expression. The left subtree is the operator, and the
--- libiberty/cp-demint.c (revision 231019)
+++ libiberty/cp-demint.c (revision 231020)
@@ -110,6 +110,7 @@ cplus_demangle_fill_component (struct de
case DEMANGLE_COMPONENT_IMAGINARY:
case DEMANGLE_COMPONENT_VENDOR_TYPE:
case DEMANGLE_COMPONENT_CAST:
+ case DEMANGLE_COMPONENT_CONVERSION:
if (right != NULL)
return 0;
break;
--- libiberty/cp-demangle.c (revision 231019)
+++ libiberty/cp-demangle.c (revision 231020)
@@ -542,8 +542,10 @@ d_print_array_type (struct d_print_info
static void
d_print_expr_op (struct d_print_info *, int, const struct demangle_component
*);
-static void
-d_print_cast (struct d_print_info *, int, const struct demangle_component *);
+static void d_print_cast (struct d_print_info *, int,
+ const struct demangle_component *);
+static void d_print_conversion (struct d_print_info *, int,
+ const struct demangle_component *);
static int d_demangle_callback (const char *, int,
demangle_callbackref, void *);
@@ -736,6 +738,9 @@ d_dump (struct demangle_component *dc, i
case DEMANGLE_COMPONENT_CAST:
printf ("cast\n");
break;
+ case DEMANGLE_COMPONENT_CONVERSION:
+ printf ("conversion operator\n");
+ break;
case DEMANGLE_COMPONENT_NULLARY:
printf ("nullary operator\n");
break;
@@ -945,6 +950,7 @@ d_make_comp (struct d_info *di, enum dem
case DEMANGLE_COMPONENT_IMAGINARY:
case DEMANGLE_COMPONENT_VENDOR_TYPE:
case DEMANGLE_COMPONENT_CAST:
+ case DEMANGLE_COMPONENT_CONVERSION:
case DEMANGLE_COMPONENT_JAVA_RESOURCE:
case DEMANGLE_COMPONENT_DECLTYPE:
case DEMANGLE_COMPONENT_PACK_EXPANSION:
@@ -1238,7 +1244,7 @@ is_ctor_dtor_or_conversion (struct deman
return is_ctor_dtor_or_conversion (d_right (dc));
case DEMANGLE_COMPONENT_CTOR:
case DEMANGLE_COMPONENT_DTOR:
- case DEMANGLE_COMPONENT_CAST:
+ case DEMANGLE_COMPONENT_CONVERSION:
return 1;
}
}
@@ -1804,11 +1810,16 @@ d_operator_name (struct d_info *di)
{
struct demangle_component *type;
int was_conversion = di->is_conversion;
+ struct demangle_component *res;
di->is_conversion = ! di->is_expression;
type = cplus_demangle_type (di);
+ if (di->is_conversion)
+ res = d_make_comp (di, DEMANGLE_COMPONENT_CONVERSION, type, NULL);
+ else
+ res = d_make_comp (di, DEMANGLE_COMPONENT_CAST, type, NULL);
di->is_conversion = was_conversion;
- return d_make_comp (di, DEMANGLE_COMPONENT_CAST, type, NULL);
+ return res;
}
else
{
@@ -3928,6 +3939,7 @@ d_count_templates_scopes (int *num_templ
case DEMANGLE_COMPONENT_TEMPLATE_ARGLIST:
case DEMANGLE_COMPONENT_INITIALIZER_LIST:
case DEMANGLE_COMPONENT_CAST:
+ case DEMANGLE_COMPONENT_CONVERSION:
case DEMANGLE_COMPONENT_NULLARY:
case DEMANGLE_COMPONENT_UNARY:
case DEMANGLE_COMPONENT_BINARY:
@@ -5064,9 +5076,9 @@ d_print_comp_inner (struct d_print_info
d_print_comp (dpi, options, dc->u.s_extended_operator.name);
return;
- case DEMANGLE_COMPONENT_CAST:
+ case DEMANGLE_COMPONENT_CONVERSION:
d_append_string (dpi, "operator ");
- d_print_cast (dpi, options, dc);
+ d_print_conversion (dpi, options, dc);
return;
case DEMANGLE_COMPONENT_NULLARY:
@@ -5805,11 +5817,20 @@ d_print_expr_op (struct d_print_info *dp
static void
d_print_cast (struct d_print_info *dpi, int options,
- const struct demangle_component *dc)
+ const struct demangle_component *dc)
+{
+ d_print_comp (dpi, options, d_left (dc));
+}
+
+/* Print a conversion operator. */
+
+static void
+d_print_conversion (struct d_print_info *dpi, int options,
+ const struct demangle_component *dc)
{
struct d_print_template dpt;
- /* For a cast operator, we need the template parameters from
+ /* For a conversion operator, we need the template parameters from
the enclosing template in scope for processing the type. */
if (dpi->current_template != NULL)
{
--- libiberty/testsuite/demangle-expected (revision 231019)
+++ libiberty/testsuite/demangle-expected (revision 231020)
@@ -4386,3 +4386,26 @@ _QueueNotification_QueueController__$4PP
--format=gnu-v3
_Z1fSsB3fooS_
f(std::string[abi:foo], std::string[abi:foo])
+#
+# These two are from gcc PR61321, and gcc PR61233 / gdb PR16957
+#
+--format=gnu-v3
+_Z13function_tempIiEv1AIXszcvT_Li999EEE
+void function_temp<int>(A<sizeof ((int)(999))>)
+#
+--format=gnu-v3
+_Z7ZipWithI7QStringS0_5QListZN4oral6detail16AdaptCreateTableI7AccountEES0_RKNS3_16CachedFieldsDataEEUlRKS0_SA_E_ET1_IDTclfp1_cvT__EcvT0__EEEERKT1_ISC_ERKT1_ISD_ET2_
+QList<decltype ({parm#3}((QString)(), (QString)()))> ZipWith<QString, QString,
QList, QString
oral::detail::AdaptCreateTable<Account>(oral::detail::CachedFieldsData
const&)::{lambda(QString const&, QString const&)#1}>(QList<QString
oral::detail::AdaptCreateTable<Account>(oral::detail::CachedFieldsData
const&)::{lambda(QString const&, QString const&)#1}> const&, QList<QList>
const&, QString
oral::detail::AdaptCreateTable<Account>(oral::detail::CachedFieldsData
const&)::{lambda(QString const&, QString const&)#1})
+#
+# These three are symbols generated by g++'s testsuite, which triggered the
same bug as above.
+--format=gnu-v3
+_Z14int_if_addableI1YERiP1AIXszpldecvPT_Li0EdecvS4_Li0EEE
+int& int_if_addable<Y>(A<sizeof ((*((Y*)(0)))+(*((Y*)(0))))>*)
+#
+--format=gnu-v3
+_Z3bazIiEvP1AIXszcl3foocvT__ELCf00000000_00000000EEEE
+void baz<int>(A<sizeof (foo((int)(), (floatcomplex )00000000_00000000))>*)
+#
+--format=gnu-v3
+_Z3fooI1FEN1XIXszdtcl1PclcvT__EEE5arrayEE4TypeEv
+X<sizeof ((P(((F)())())).array)>::Type foo<F>()
2016-05-19 Jakub Jelinek <[email protected]>
Backported from mainline
2015-07-13 Mikhail Maltsev <[email protected]>
* cp-demangle.c (d_dump): Fix syntax error.
(d_identifier): Adjust type of len to match d_source_name.
(d_expression_1): Fix out-of-bounds access. Check code variable for
NULL before dereferencing it.
(d_find_pack): Do not recurse for FIXED_TYPE, DEFAULT_ARG and NUMBER.
(d_print_comp_inner): Add NULL pointer check.
* testsuite/demangle-expected: Add new testcases.
--- libiberty/cp-demangle.c (revision 225726)
+++ libiberty/cp-demangle.c (revision 225727)
@@ -419,7 +423,7 @@ static struct demangle_component *d_sour
static long d_number (struct d_info *);
-static struct demangle_component *d_identifier (struct d_info *, int);
+static struct demangle_component *d_identifier (struct d_info *, long);
static struct demangle_component *d_operator_name (struct d_info *);
@@ -715,7 +719,7 @@ d_dump (struct demangle_component *dc, i
case DEMANGLE_COMPONENT_FIXED_TYPE:
printf ("fixed-point type, accum? %d, sat? %d\n",
dc->u.s_fixed.accum, dc->u.s_fixed.sat);
- d_dump (dc->u.s_fixed.length, indent + 2)
+ d_dump (dc->u.s_fixed.length, indent + 2);
break;
case DEMANGLE_COMPONENT_ARGLIST:
printf ("argument list\n");
@@ -1656,7 +1660,7 @@ d_number_component (struct d_info *di)
/* identifier ::= <(unqualified source code identifier)> */
static struct demangle_component *
-d_identifier (struct d_info *di, int len)
+d_identifier (struct d_info *di, long len)
{
const char *name;
@@ -1677,7 +1681,7 @@ d_identifier (struct d_info *di, int len
/* Look for something which looks like a gcc encoding of an
anonymous namespace, and replace it with a more user friendly
name. */
- if (len >= (int) ANONYMOUS_NAMESPACE_PREFIX_LEN + 2
+ if (len >= (long) ANONYMOUS_NAMESPACE_PREFIX_LEN + 2
&& memcmp (name, ANONYMOUS_NAMESPACE_PREFIX,
ANONYMOUS_NAMESPACE_PREFIX_LEN) == 0)
{
@@ -3166,6 +3170,8 @@ d_expression_1 (struct d_info *di)
struct demangle_component *type = NULL;
if (peek == 't')
type = cplus_demangle_type (di);
+ if (!d_peek_next_char (di))
+ return NULL;
d_advance (di, 2);
return d_make_comp (di, DEMANGLE_COMPONENT_INITIALIZER_LIST,
type, d_exprlist (di, 'E'));
@@ -3240,6 +3246,8 @@ d_expression_1 (struct d_info *di)
struct demangle_component *left;
struct demangle_component *right;
+ if (code == NULL)
+ return NULL;
if (op_is_new_cast (op))
left = cplus_demangle_type (di);
else
@@ -3267,7 +3275,9 @@ d_expression_1 (struct d_info *di)
struct demangle_component *second;
struct demangle_component *third;
- if (!strcmp (code, "qu"))
+ if (code == NULL)
+ return NULL;
+ else if (!strcmp (code, "qu"))
{
/* ?: expression. */
first = d_expression_1 (di);
@@ -4196,6 +4206,9 @@ d_find_pack (struct d_print_info *dpi,
case DEMANGLE_COMPONENT_CHARACTER:
case DEMANGLE_COMPONENT_FUNCTION_PARAM:
case DEMANGLE_COMPONENT_UNNAMED_TYPE:
+ case DEMANGLE_COMPONENT_FIXED_TYPE:
+ case DEMANGLE_COMPONENT_DEFAULT_ARG:
+ case DEMANGLE_COMPONENT_NUMBER:
return NULL;
case DEMANGLE_COMPONENT_EXTENDED_OPERATOR:
@@ -4431,6 +4444,11 @@ d_print_comp_inner (struct d_print_info
local_name = d_right (typed_name);
if (local_name->type == DEMANGLE_COMPONENT_DEFAULT_ARG)
local_name = local_name->u.s_unary_num.sub;
+ if (local_name == NULL)
+ {
+ d_print_error (dpi);
+ return;
+ }
while (local_name->type == DEMANGLE_COMPONENT_RESTRICT_THIS
|| local_name->type == DEMANGLE_COMPONENT_VOLATILE_THIS
|| local_name->type == DEMANGLE_COMPONENT_CONST_THIS
--- libiberty/testsuite/demangle-expected (revision 225726)
+++ libiberty/testsuite/demangle-expected (revision 225727)
@@ -4091,6 +4091,36 @@ void g<1>(A<1>&, B<static_cast<bool>(1)>
_ZNKSt7complexIiE4realB5cxx11Ev
std::complex<int>::real[abi:cxx11]() const
#
+# Some more crashes revealed by fuzz-testing:
+# Check for NULL pointer when demangling trinary operators
+--format=gnu-v3
+_Z1fAv32_f
+_Z1fAv32_f
+# Do not overflow when decoding identifier length
+--format=gnu-v3
+_Z11111111111
+_Z11111111111
+# Check out-of-bounds access when decoding braced initializer list
+--format=gnu-v3
+_ZDTtl
+_ZDTtl
+# Check for NULL pointer when demangling DEMANGLE_COMPONENT_LOCAL_NAME
+--format=gnu-v3
+_ZZN1fEEd_lEv
+_ZZN1fEEd_lEv
+# Handle DEMANGLE_COMPONENT_FIXED_TYPE in d_find_pack
+--format=gnu-v3
+_Z1fDpDFT_
+_Z1fDpDFT_
+# Likewise, DEMANGLE_COMPONENT_DEFAULT_ARG
+--format=gnu-v3
+_Z1fIDpZ1fEd_E
+_Z1fIDpZ1fEd_E
+# Likewise, DEMANGLE_COMPONENT_NUMBER
+--format=gnu-v3
+_Z1fDpDv1_c
+f((char __vector(1))...)
+#
# Ada (GNAT) tests.
#
# Simple test.
2016-05-19 Jakub Jelinek <[email protected]>
Backported from mainline
2014-08-29 Andrew Burgess <[email protected]>
* cp-demangle.c (d_dump): Only access field from s_fixed part of
the union for DEMANGLE_COMPONENT_FIXED_TYPE.
(d_count_templates_scopes): Likewise.
2014-08-13 Gary Benson <[email protected]>
* testsuite/demangler-fuzzer.c: New file.
* testsuite/Makefile.in (fuzz-demangler): New rule.
(demangler-fuzzer): Likewise.
(mostlyclean): Clean up demangler fuzzer.
2014-06-11 Andrew Burgess <[email protected]>
* cplus-dem.c (do_type): Call string_delete even if the call to
demangle_template fails.
2014-05-28 Pedro Alves <[email protected]>
* cp-demangle.c (d_dump): Handle DEMANGLE_COMPONENT_FUNCTION_PARAM
and DEMANGLE_COMPONENT_NUMBER.
2014-05-22 Thomas Schwinge <[email protected]>
* testsuite/demangle-expected: Fix last commit.
2014-05-14 Andrew Burgess <[email protected]>
* cplus-dmem.c (internal_cplus_demangle): Free any resources
allocated by possible previous call to gnu_special.
(squangle_mop_up): Reset pointers to NULL after calling free.
* testsuite/demangle-expected: New test case.
2014-05-08 Gary Benson <[email protected]>
* cp-demangle.c (struct d_component_stack): New structure.
(struct d_print_info): New field component_stack.
(d_print_init): Initialize the above.
(d_print_comp_inner): Renamed from d_print_comp.
Do not restore template stack if it would cause a loop.
(d_print_comp): New function.
* testsuite/demangle-expected: New test cases.
--- libiberty/cplus-dem.c (revision 209959)
+++ libiberty/cplus-dem.c (revision 214770)
@@ -1175,6 +1175,11 @@ internal_cplus_demangle (struct work_stu
if ((AUTO_DEMANGLING || GNU_DEMANGLING))
{
success = gnu_special (work, &mangled, &decl);
+ if (!success)
+ {
+ delete_work_stuff (work);
+ string_delete (&decl);
+ }
}
if (!success)
{
@@ -1218,10 +1223,12 @@ squangle_mop_up (struct work_stuff *work
if (work -> btypevec != NULL)
{
free ((char *) work -> btypevec);
+ work->btypevec = NULL;
}
if (work -> ktypevec != NULL)
{
free ((char *) work -> ktypevec);
+ work->ktypevec = NULL;
}
}
@@ -3656,7 +3663,10 @@ do_type (struct work_stuff *work, const
string_delete (&temp);
}
else
- break;
+ {
+ string_delete (&temp);
+ break;
+ }
}
else if (**mangled == 'Q')
{
--- libiberty/cp-demangle.c (revision 209959)
+++ libiberty/cp-demangle.c (revision 214770)
@@ -275,6 +275,16 @@ struct d_growable_string
int allocation_failure;
};
+/* Stack of components, innermost first, used to avoid loops. */
+
+struct d_component_stack
+{
+ /* This component. */
+ const struct demangle_component *dc;
+ /* This component's parent. */
+ const struct d_component_stack *parent;
+};
+
/* A demangle component and some scope captured when it was first
traversed. */
@@ -327,6 +337,8 @@ struct d_print_info
int pack_index;
/* Number of d_print_flush calls so far. */
unsigned long int flush_count;
+ /* Stack of components, innermost first, used to avoid loops. */
+ const struct d_component_stack *component_stack;
/* Array of saved scopes for evaluating substitutions. */
struct d_saved_scope *saved_scopes;
/* Index of the next unused saved scope in the above array. */
@@ -563,6 +575,9 @@ d_dump (struct demangle_component *dc, i
case DEMANGLE_COMPONENT_TEMPLATE_PARAM:
printf ("template parameter %ld\n", dc->u.s_number.number);
return;
+ case DEMANGLE_COMPONENT_FUNCTION_PARAM:
+ printf ("function parameter %ld\n", dc->u.s_number.number);
+ return;
case DEMANGLE_COMPONENT_CTOR:
printf ("constructor %d\n", (int) dc->u.s_ctor.kind);
d_dump (dc->u.s_ctor.name, indent + 2);
@@ -698,7 +713,9 @@ d_dump (struct demangle_component *dc, i
printf ("pointer to member type\n");
break;
case DEMANGLE_COMPONENT_FIXED_TYPE:
- printf ("fixed-point type\n");
+ printf ("fixed-point type, accum? %d, sat? %d\n",
+ dc->u.s_fixed.accum, dc->u.s_fixed.sat);
+ d_dump (dc->u.s_fixed.length, indent + 2)
break;
case DEMANGLE_COMPONENT_ARGLIST:
printf ("argument list\n");
@@ -748,6 +765,9 @@ d_dump (struct demangle_component *dc, i
case DEMANGLE_COMPONENT_CHARACTER:
printf ("character '%c'\n", dc->u.s_character.character);
return;
+ case DEMANGLE_COMPONENT_NUMBER:
+ printf ("number %ld\n", dc->u.s_number.number);
+ return;
case DEMANGLE_COMPONENT_DECLTYPE:
printf ("decltype\n");
break;
@@ -3857,7 +3877,6 @@ d_count_templates_scopes (int *num_templ
case DEMANGLE_COMPONENT_FUNCTION_TYPE:
case DEMANGLE_COMPONENT_ARRAY_TYPE:
case DEMANGLE_COMPONENT_PTRMEM_TYPE:
- case DEMANGLE_COMPONENT_FIXED_TYPE:
case DEMANGLE_COMPONENT_VECTOR_TYPE:
case DEMANGLE_COMPONENT_ARGLIST:
case DEMANGLE_COMPONENT_TEMPLATE_ARGLIST:
@@ -3902,6 +3921,11 @@ d_count_templates_scopes (int *num_templ
dc->u.s_extended_operator.name);
break;
+ case DEMANGLE_COMPONENT_FIXED_TYPE:
+ d_count_templates_scopes (num_templates, num_scopes,
+ dc->u.s_fixed.length);
+ break;
+
case DEMANGLE_COMPONENT_GLOBAL_CONSTRUCTORS:
case DEMANGLE_COMPONENT_GLOBAL_DESTRUCTORS:
d_count_templates_scopes (num_templates, num_scopes,
@@ -3934,6 +3958,8 @@ d_print_init (struct d_print_info *dpi,
dpi->demangle_failure = 0;
+ dpi->component_stack = NULL;
+
dpi->saved_scopes = NULL;
dpi->next_saved_scope = 0;
dpi->num_saved_scopes = 0;
@@ -4269,8 +4295,8 @@ d_get_saved_scope (struct d_print_info *
/* Subroutine to handle components. */
static void
-d_print_comp (struct d_print_info *dpi, int options,
- const struct demangle_component *dc)
+d_print_comp_inner (struct d_print_info *dpi, int options,
+ const struct demangle_component *dc)
{
/* Magic variable to let reference smashing skip over the next modifier
without needing to modify *dc. */
@@ -4673,11 +4699,30 @@ d_print_comp (struct d_print_info *dpi,
}
else
{
+ const struct d_component_stack *dcse;
+ int found_self_or_parent = 0;
+
/* This traversal is reentering SUB as a substition.
- Restore the original templates temporarily. */
- saved_templates = dpi->templates;
- dpi->templates = scope->templates;
- need_template_restore = 1;
+ If we are not beneath SUB or DC in the tree then we
+ need to restore SUB's template stack temporarily. */
+ for (dcse = dpi->component_stack; dcse != NULL;
+ dcse = dcse->parent)
+ {
+ if (dcse->dc == sub
+ || (dcse->dc == dc
+ && dcse != dpi->component_stack))
+ {
+ found_self_or_parent = 1;
+ break;
+ }
+ }
+
+ if (!found_self_or_parent)
+ {
+ saved_templates = dpi->templates;
+ dpi->templates = scope->templates;
+ need_template_restore = 1;
+ }
}
a = d_lookup_template_argument (dpi, sub);
@@ -5316,6 +5361,21 @@ d_print_comp (struct d_print_info *dpi,
}
}
+static void
+d_print_comp (struct d_print_info *dpi, int options,
+ const struct demangle_component *dc)
+{
+ struct d_component_stack self;
+
+ self.dc = dc;
+ self.parent = dpi->component_stack;
+ dpi->component_stack = &self;
+
+ d_print_comp_inner (dpi, options, dc);
+
+ dpi->component_stack = self.parent;
+}
+
/* Print a Java dentifier. For Java we try to handle encoded extended
Unicode characters. The C++ ABI doesn't mention Unicode encoding,
so we don't it for C++. Characters are encoded as
--- libiberty/testsuite/Makefile.in (revision 209959)
+++ libiberty/testsuite/Makefile.in (revision 214770)
@@ -59,6 +59,10 @@ check-pexecute: test-pexecute
check-expandargv: test-expandargv
./test-expandargv
+# Run the demangler fuzzer
+fuzz-demangler: demangler-fuzzer
+ ./demangler-fuzzer
+
TEST_COMPILE = $(CC) @DEFS@ $(LIBCFLAGS) -I.. -I$(INCDIR) $(HDEFINES)
test-demangle: $(srcdir)/test-demangle.c ../libiberty.a
$(TEST_COMPILE) -o test-demangle \
@@ -72,6 +76,10 @@ test-expandargv: $(srcdir)/test-expandar
$(TEST_COMPILE) -DHAVE_CONFIG_H -I.. -o test-expandargv \
$(srcdir)/test-expandargv.c ../libiberty.a
+demangler-fuzzer: $(srcdir)/demangler-fuzzer.c ../libiberty.a
+ $(TEST_COMPILE) -o demangler-fuzzer \
+ $(srcdir)/demangler-fuzzer.c ../libiberty.a
+
# Standard (either GNU or Cygnus) rules we don't use.
html install-html info install-info clean-info dvi pdf install-pdf \
install etags tags installcheck:
@@ -81,6 +89,7 @@ mostlyclean:
rm -f test-demangle
rm -f test-pexecute
rm -f test-expandargv
+ rm -f demangler-fuzzer
rm -f core
clean: mostlyclean
distclean: clean
--- libiberty/testsuite/demangler-fuzzer.c (revision 0)
+++ libiberty/testsuite/demangler-fuzzer.c (revision 214770)
@@ -0,0 +1,108 @@
+/* Demangler fuzzer.
+
+ Copyright (C) 2014 Free Software Foundation, Inc.
+
+ This file is part of GNU libiberty.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <time.h>
+#include "demangle.h"
+
+#define MAXLEN 253
+#define ALPMIN 33
+#define ALPMAX 127
+
+static char *program_name;
+
+#define DEFAULT_MAXCOUNT 7500000
+
+static void
+print_usage (FILE *fp, int exit_value)
+{
+ fprintf (fp, "Usage: %s [OPTION]...\n", program_name);
+ fprintf (fp, "Options:\n");
+ fprintf (fp, " -h Display this message.\n");
+ fprintf (fp, " -s SEED Select the random seed to be used.\n");
+ fprintf (fp, " The default is to base one on the");
+ fprintf (fp, " current time.\n");
+ fprintf (fp, " -m MAXCOUNT Exit after MAXCOUNT symbols.\n");
+ fprintf (fp, " The default is %d.", DEFAULT_MAXCOUNT);
+ fprintf (fp, " Set to `-1' for no limit.\n");
+
+ exit (exit_value);
+}
+
+int
+main (int argc, char *argv[])
+{
+ char symbol[2 + MAXLEN + 1] = "_Z";
+ int seed = -1, seed_set = 0;
+ int count = 0, maxcount = DEFAULT_MAXCOUNT;
+ int optchr;
+
+ program_name = argv[0];
+
+ do
+ {
+ optchr = getopt (argc, argv, "hs:m:t:");
+ switch (optchr)
+ {
+ case '?': /* Unrecognized option. */
+ print_usage (stderr, 1);
+ break;
+
+ case 'h':
+ print_usage (stdout, 0);
+ break;
+
+ case 's':
+ seed = atoi (optarg);
+ seed_set = 1;
+ break;
+
+ case 'm':
+ maxcount = atoi (optarg);
+ break;
+ }
+ }
+ while (optchr != -1);
+
+ if (!seed_set)
+ seed = time (NULL);
+ srand (seed);
+ printf ("%s: seed = %d\n", program_name, seed);
+
+ while (maxcount < 0 || count < maxcount)
+ {
+ char *buffer = symbol + 2;
+ int length, i;
+
+ length = rand () % MAXLEN;
+ for (i = 0; i < length; i++)
+ *buffer++ = (rand () % (ALPMAX - ALPMIN)) + ALPMIN;
+
+ *buffer++ = '\0';
+
+ cplus_demangle (symbol, DMGL_AUTO | DMGL_ANSI | DMGL_PARAMS);
+
+ count++;
+ }
+
+ printf ("%s: successfully demangled %d symbols\n", program_name, count);
+ exit (0);
+}
--- libiberty/testsuite/demangle-expected (revision 209959)
+++ libiberty/testsuite/demangle-expected (revision 214770)
@@ -4294,6 +4294,7 @@ void n<void (A::*)() const &>(void (A::*
--format=gnu-v3
_ZL1fIiEvv
void f<int>()
+# https://sourceware.org/bugzilla/show_bug.cgi?id=14963#c3
--format=gnu-v3
_ZSt7forwardIRN1x14refobjiteratorINS0_3refINS0_4mime30multipart_section_processorObjIZ15get_body_parserIZZN14mime_processor21make_section_iteratorERKNS2_INS3_10sectionObjENS0_10ptrrefBaseEEEbENKUlvE_clEvEUlSB_bE_ZZNS6_21make_section_iteratorESB_bENKSC_clEvEUlSB_E0_ENS1_INS2_INS0_20outputrefiteratorObjIiEES8_EEEERKSsSB_OT_OT0_EUlmE_NS3_32make_multipart_default_discarderISP_EEEES8_EEEEEOT_RNSt16remove_referenceISW_E4typeE
x::refobjiterator<x::ref<x::mime::multipart_section_processorObj<x::refobjiterator<x::ref<x::outputrefiteratorObj<int>,
x::ptrrefBase> >
get_body_parser<mime_processor::make_section_iterator(x::ref<x::mime::sectionObj,
x::ptrrefBase> const&, bool)::{lambda()#1}::operator()()
const::{lambda(x::ref<x::mime::sectionObj, x::ptrrefBase> const&, bool)#1},
mime_processor::make_section_iterator(x::ref<x::mime::sectionObj,
x::ptrrefBase> const&, bool)::{lambda()#1}::operator()()
const::{lambda(x::ref<x::mime::sectionObj, x::ptrrefBase>
const&)#2}>(std::string const&, x::ref<x::mime::sectionObj, x::ptrrefBase>
const&, mime_processor::make_section_iterator(x::ref<x::mime::sectionObj,
x::ptrrefBase> const&, bool)::{lambda()#1}::operator()()
const::{lambda(x::ref<x::mime::sectionObj, x::ptrrefBase> const&, bool)#1}&&,
mime_processor::make_section_iterator(x::ref<x::mime::sectionObj,
x::ptrrefBase> const&, bool)::{lambda()#1}::operator()()
const::{lambda(x::ref<x::mime::sectionObj, x::ptrrefBase>
const&)#2}&&)::{lambda(unsigned long)#1},
x::mime::make_multipart_default_discarder<mime_processor::make_section_iterator(x::ref<x::mime::sectionObj,
x::ptrrefBase> const&, bool)::{lambda()#1}::operator()()
const::{lambda(x::ref<x::mime::sectionObj, x::ptrrefBase> const&, bool)#1}&&>
>, x::ptrrefBase> >&
std::forward<x::refobjiterator<x::ref<x::mime::multipart_section_processorObj<x::refobjiterator<x::ref<x::outputrefiteratorObj<int>,
x::ptrrefBase> >
get_body_parser<mime_processor::make_section_iterator(x::ref<x::mime::sectionObj,
x::ptrrefBase> const&, bool)::{lambda()#1}::operator()()
const::{lambda(x::ref<x::mime::sectionObj, x::ptrrefBase> const&, bool)#1},
mime_processor::make_section_iterator(x::ref<x::mime::sectionObj,
x::ptrrefBase> const&, bool)::{lambda()#1}::operator()()
const::{lambda(x::ref<x::mime::sectionObj, x::ptrrefBase>
const&)#2}>(std::string const&, x::ref<x::mime::sectionObj, x::ptrrefBase>
const&, mime_processor::make_section_iterator(x::ref<x::mime::sectionObj,
x::ptrrefBase> const&, bool)::{lambda()#1}::operator()()
const::{lambda(x::ref<x::mime::sectionObj, x::ptrrefBase> const&, bool)#1}&&,
mime_processor::make_section_iterator(x::ref<x::mime::sectionObj,
x::ptrrefBase> const&, bool)::{lambda()#1}::operator()()
const::{lambda(x::ref<x::mime::sectionObj, x::ptrrefBase>
const&)#2}&&)::{lambda(unsigned long)#1},
x::mime::make_multipart_default_discarder<mime_processor::make_section_iterator(x::ref<x::mime::sectionObj,
x::ptrrefBase> const&, bool)::{lambda()#1}::operator()()
const::{lambda(x::ref<x::mime::sectionObj, x::ptrrefBase> const&, bool)#1}&&>
>, x::ptrrefBase>
>&>(std::remove_reference<x::mime::multipart_section_processorObj<x::refobjiterator<x::ref<x::outputrefiteratorObj<int>,
x::ptrrefBase> >
get_body_parser<mime_processor::make_section_iterator(x::ref<x::mime::sectionObj,
x::ptrrefBase> const&, bool)::{lambda()#1}::operator()()
const::{lambda(x::ref<x::mime::sectionObj, x::ptrrefBase> const&, bool)#1},
mime_processor::make_section_iterator(x::ref<x::mime::sectionObj,
x::ptrrefBase> const&, bool)::{lambda()#1}::operator()()
const::{lambda(x::ref<x::mime::sectionObj, x::ptrrefBase>
const&)#2}>(std::string const&, x::ref<x::mime::sectionObj, x::ptrrefBase>
const&, mime_processor::make_section_iterator(x::ref<x::mime::sectionObj,
x::ptrrefBase> const&, bool)::{lambda()#1}::operator()()
const::{lambda(x::ref<x::mime::sectionObj, x::ptrrefBase> const&, bool)#1}&&,
mime_processor::make_section_iterator(x::ref<x::mime::sectionObj,
x::ptrrefBase> const&, bool)::{lambda()#1}::operator()()
const::{lambda(x::ref<x::mime::sectionObj, x::ptrrefBase>
const&)#2}&&)::{lambda(unsigned long)#1},
x::mime::make_multipart_default_discarder<mime_processor::make_section_iterator(x::ref<x::mime::sectionObj,
x::ptrrefBase> const&, bool)::{lambda()#1}::operator()()
const::{lambda(x::ref<x::mime::sectionObj, x::ptrrefBase> const&, bool)#1}&&> >
>::type&)
@@ -4317,3 +4318,38 @@ A::operator C*<C>
_ZN1AcvT_IiEI1CEEv
A::operator C<int><C>()
A::operator C<int><C>
+# https://sourceware.org/bugzilla/show_bug.cgi?id=14963#c16
+--format=gnu-v3
+_ZN3mdr16in_cached_threadIRZNK4cudr6GPUSet17parallel_for_eachIZN5tns3d20shape_representation7compute7GPUImpl7executeERKNS_1AINS_7ptr_refIKjEELl3ELl3ENS_8c_strideILl1ELl0EEEEERKNS8_INS9_IjEELl4ELl1ESD_EEEUliRKNS1_7ContextERNS7_5StateEE_JSt6vectorISO_SaISO_EEEEEvOT_DpRT0_EUlSP_E_JSt17reference_wrapperISO_EEEENS_12ScopedFutureIDTclfp_spcl7forwardISW_Efp0_EEEEESV_DpOSW_
+mdr::ScopedFuture<decltype ({parm#1}(((forward<void
cudr::GPUSet::parallel_for_each<tns3d::shape_representation::compute::GPUImpl::execute(mdr::A<mdr::ptr_ref<unsigned
int const>, 3l, 3l, mdr::c_stride<1l, 0l> > const&,
mdr::A<mdr::ptr_ref<unsigned int>, 4l, 1l, mdr::c_stride<1l, 0l> >
const&)::{lambda(int, cudr::Context const&,
tns3d::shape_representation::compute::GPUImpl::State&)#1},
std::vector<tns3d::shape_representation::compute::GPUImpl::State,
std::allocator<tns3d::shape_representation::compute::GPUImpl::State> >
>(tns3d::shape_representation::compute::GPUImpl::execute(mdr::A<mdr::ptr_ref<unsigned
int const>, 3l, 3l, mdr::c_stride<1l, 0l> > const&,
mdr::A<mdr::ptr_ref<unsigned int>, 4l, 1l, mdr::c_stride<1l, 0l> >
const&)::{lambda(int, cudr::Context const&,
tns3d::shape_representation::compute::GPUImpl::State&)#1}&&,
std::vector<tns3d::shape_representation::compute::GPUImpl::State,
std::allocator<tns3d::shape_representation::compute::GPUImpl::State> >&)
const::{lambda(tns3d::shape_representation::compute::GPUImpl::State&)#1}&>)({parm#2}))...))>
mdr::in_cached_thread<void
cudr::GPUSet::parallel_for_each<tns3d::shape_representation::compute::GPUImpl::execute(mdr::A<mdr::ptr_ref<unsigned
int const>, 3l, 3l, mdr::c_stride<1l, 0l> > const&,
mdr::A<mdr::ptr_ref<unsigned int>, 4l, 1l, mdr::c_stride<1l, 0l> >
const&)::{lambda(int, cudr::Context const&,
tns3d::shape_representation::compute::GPUImpl::State&)#1},
std::vector<tns3d::shape_representation::compute::GPUImpl::State,
std::allocator<tns3d::shape_representation::compute::GPUImpl::State> > >(void
cudr::GPUSet::parallel_for_each<tns3d::shape_representation::compute::GPUImpl::execute(mdr::A<mdr::ptr_ref<unsigned
int const>, 3l, 3l, mdr::c_stride<1l, 0l> > const&,
mdr::A<mdr::ptr_ref<unsigned int>, 4l, 1l, mdr::c_stride<1l, 0l> >
const&)::{lambda(int, cudr::Context const&,
tns3d::shape_representation::compute::GPUImpl::State&)#1},
std::vector<tns3d::shape_representation::compute::GPUImpl::State,
std::allocator<tns3d::shape_representation::compute::GPUImpl::State> >
>(tns3d::shape_representation::compute::GPUImpl::execute(mdr::A<mdr::ptr_ref<unsigned
int const>, 3l, 3l, mdr::c_stride<1l, 0l> > const&,
mdr::A<mdr::ptr_ref<unsigned int>, 4l, 1l, mdr::c_stride<1l, 0l> >
const&)::{lambda(int, cudr::Context const&,
tns3d::shape_representation::compute::GPUImpl::State&)#1}&&,
std::vector<tns3d::shape_representation::compute::GPUImpl::State,
std::allocator<tns3d::shape_representation::compute::GPUImpl::State> >&)
const::{lambda(tns3d::shape_representation::compute::GPUImpl::State&)#1}&,
std::vector<tns3d::shape_representation::compute::GPUImpl::State,
std::allocator<tns3d::shape_representation::compute::GPUImpl::State> >&)
const::{lambda(tns3d::shape_representation::compute::GPUImpl::State&)#1}&,
std::reference_wrapper<tns3d::shape_representation::compute::GPUImpl::State>
>(void
cudr::GPUSet::parallel_for_each<tns3d::shape_representation::compute::GPUImpl::execute(mdr::A<mdr::ptr_ref<unsigned
int const>, 3l, 3l, mdr::c_stride<1l, 0l> > const&,
mdr::A<mdr::ptr_ref<unsigned int>, 4l, 1l, mdr::c_stride<1l, 0l> >
const&)::{lambda(int, cudr::Context const&,
tns3d::shape_representation::compute::GPUImpl::State&)#1},
std::vector<tns3d::shape_representation::compute::GPUImpl::State,
std::allocator<tns3d::shape_representation::compute::GPUImpl::State> >
>(tns3d::shape_representation::compute::GPUImpl::execute(mdr::A<mdr::ptr_ref<unsigned
int const>, 3l, 3l, mdr::c_stride<1l, 0l> > const&,
mdr::A<mdr::ptr_ref<unsigned int>, 4l, 1l, mdr::c_stride<1l, 0l> >
const&)::{lambda(int, cudr::Context const&,
tns3d::shape_representation::compute::GPUImpl::State&)#1}&&,
std::vector<tns3d::shape_representation::compute::GPUImpl::State,
std::allocator<tns3d::shape_representation::compute::GPUImpl::State> >&)
const::{lambda(tns3d::shape_representation::compute::GPUImpl::State&)#1}&,
(void
cudr::GPUSet::parallel_for_each<tns3d::shape_representation::compute::GPUImpl::execute(mdr::A<mdr::ptr_ref<unsigned
int const>, 3l, 3l, mdr::c_stride<1l, 0l> > const&,
mdr::A<mdr::ptr_ref<unsigned int>, 4l, 1l, mdr::c_stride<1l, 0l> >
const&)::{lambda(int, cudr::Context const&,
tns3d::shape_representation::compute::GPUImpl::State&)#1},
std::vector<tns3d::shape_representation::compute::GPUImpl::State,
std::allocator<tns3d::shape_representation::compute::GPUImpl::State> >
>(tns3d::shape_representation::compute::GPUImpl::execute(mdr::A<mdr::ptr_ref<unsigned
int const>, 3l, 3l, mdr::c_stride<1l, 0l> > const&,
mdr::A<mdr::ptr_ref<unsigned int>, 4l, 1l, mdr::c_stride<1l, 0l> >
const&)::{lambda(int, cudr::Context const&,
tns3d::shape_representation::compute::GPUImpl::State&)#1}&&,
std::vector<tns3d::shape_representation::compute::GPUImpl::State,
std::allocator<tns3d::shape_representation::compute::GPUImpl::State> >&)
const::{lambda(tns3d::shape_representation::compute::GPUImpl::State&)#1}&&&)...)
+# https://sourceware.org/bugzilla/show_bug.cgi?id=14963#c18
+--format=gnu-v3
+_ZNSt9_Any_data9_M_accessIPZN13ThreadManager10futureTaskISt5_BindIFSt7_Mem_fnIM6RunnerFvvEEPS5_EEEEvOT_EUlvE_EERSC_v
+void ThreadManager::futureTask<std::_Bind<std::_Mem_fn<void (Runner::*)()>
(Runner*)> >(std::_Bind<std::_Mem_fn<void (Runner::*)()>
(Runner*)>&&)::{lambda()#1}*& std::_Any_data::_M_access<void
ThreadManager::futureTask<std::_Bind<std::_Mem_fn<void (Runner::*)()>
(Runner*)> >(void ThreadManager::futureTask<std::_Bind<std::_Mem_fn<void
(Runner::*)()> (Runner*)> >(std::_Bind<std::_Mem_fn<void (Runner::*)()>
(Runner*)>&&)::{lambda()#1}*&&)::{lambda()#1}*>()
+# https://sourceware.org/bugzilla/show_bug.cgi?id=14963#c24
+# aka https://sourceware.org/bugzilla/show_bug.cgi?id=16593
+--format=gnu-v3
+_ZNSt9_Any_data9_M_accessIPZN3sel8Selector6SetObjI3FooJPKcMS4_FviEEEEvRT_DpT0_EUlvE_EESA_v
+void sel::Selector::SetObj<Foo, char const*, void (Foo::*)(int)>(Foo&, char
const*, void (Foo::*)(int))::{lambda()#1}*& std::_Any_data::_M_access<void
sel::Selector::SetObj<Foo, char const*, void (Foo::*)(int)>(void
sel::Selector::SetObj<Foo, char const*, void (Foo::*)(int)>(Foo&, char const*,
void (Foo::*)(int))::{lambda()#1}*&, char const*, void
(Foo::*)(int))::{lambda()#1}*>()
+# https://sourceware.org/bugzilla/show_bug.cgi?id=16752#c1
+--format=gnu-v3
+_ZNSt9_Any_data9_M_accessIPZN13ThreadManager7newTaskIRSt5_BindIFSt7_Mem_fnIM5DiaryFivEEPS5_EEIEEESt6futureINSt9result_ofIFT_DpT0_EE4typeEEOSF_DpOSG_EUlvE_EERSF_v
+std::future<std::result_of<std::_Bind<std::_Mem_fn<int (Diary::*)()>
(Diary*)>& ()>::type> ThreadManager::newTask<std::_Bind<std::_Mem_fn<int
(Diary::*)()> (Diary*)>&>(std::_Bind<std::_Mem_fn<int (Diary::*)()>
(Diary*)>&)::{lambda()#1}*&
std::_Any_data::_M_access<std::future<std::result_of<std::_Bind<std::_Mem_fn<int
(Diary::*)()> (Diary*)>& ()>::type>
ThreadManager::newTask<std::_Bind<std::_Mem_fn<int (Diary::*)()>
(Diary*)>&>(std::future<std::result_of<std::_Bind<std::_Mem_fn<int
(Diary::*)()> (Diary*)>& ()>::type>
ThreadManager::newTask<std::_Bind<std::_Mem_fn<int (Diary::*)()>
(Diary*)>&>(std::_Bind<std::_Mem_fn<int (Diary::*)()>
(Diary*)>&)::{lambda()#1}*&&)::{lambda()#1}*>()
+# https://sourceware.org/bugzilla/show_bug.cgi?id=16752#c6
+--format=gnu-v3
+_ZNSt9_Any_data9_M_accessIPZN6cereal18polymorphic_detail15getInputBindingINS1_16JSONInputArchiveEEENS1_6detail15InputBindingMapIT_E11SerializersERS7_jEUlPvRSt10unique_ptrIvNS5_12EmptyDeleterIvEEEE0_EESA_v
+cereal::detail::InputBindingMap<cereal::JSONInputArchive>::Serializers
cereal::polymorphic_detail::getInputBinding<cereal::JSONInputArchive>(cereal::JSONInputArchive&,
unsigned int)::{lambda(void*, std::unique_ptr<void,
cereal::detail::EmptyDeleter<void> >&)#2}*&
std::_Any_data::_M_access<cereal::detail::InputBindingMap<cereal::JSONInputArchive>::Serializers
cereal::polymorphic_detail::getInputBinding<cereal::JSONInputArchive>(cereal::detail::InputBindingMap<cereal::JSONInputArchive>::Serializers
cereal::polymorphic_detail::getInputBinding<cereal::JSONInputArchive>(cereal::JSONInputArchive&,
unsigned int)::{lambda(void*, std::unique_ptr<void,
cereal::detail::EmptyDeleter<void> >&)#2}*&, unsigned int)::{lambda(void*,
std::unique_ptr<void, cereal::detail::EmptyDeleter<void> >&)#2}*>()
+# https://sourceware.org/bugzilla/show_bug.cgi?id=16845#c2
+--format=gnu-v3
+_ZNSt9_Any_data9_M_accessIPZ4postISt8functionIFvvEEEvOT_EUlvE_EERS5_v
+void post<std::function<void ()> >(std::function<void ()>&&)::{lambda()#1}*&
std::_Any_data::_M_access<void post<std::function<void ()> >(void
post<std::function<void ()> >(std::function<void
()>&&)::{lambda()#1}*&&)::{lambda()#1}*>()
+#
+--format=auto --no-params
+_Z3xxxDFyuVb
+xxx(unsigned long long _Fract, bool volatile)
+xxx
+# https://sourceware.org/bugzilla/show_bug.cgi?id=16817
+--format=auto --no-params
+_QueueNotification_QueueController__$4PPPPPPPM_A_INotice___Z
+_QueueNotification_QueueController__$4PPPPPPPM_A_INotice___Z
+_QueueNotification_QueueController__$4PPPPPPPM_A_INotice___Z