This is the mail archive of the
mailing list for the binutils project.
Re: Commit: Sync libiberty and add --no-recurse-limit option to binutils
> Since this is apparently a real symbol from real code, can you find
> out what the recursion limit would have to be to successfully demangle
Certainly. 2048 does the trick.
What actually happened was that I ran the libiberty testsuite with v1 of
the patch, and the 1024 limit worked. But then when I changed the patch
to move the recursion counters into the work structures, I forgot to retest
the patch. The problem was then that the recursion counter was now shared
between multiple functions, and so the 1024 limit was not enough. Since I
only changed three functions I guessed that doubling the limit would be enough,
and testing showed that this was true.
Is this patch OK ?
2018-12-10 Nick Clifton <firstname.lastname@example.org>
* demangle.h (DEMANGLE_RECURSION_LIMIT): Increase to 2048.
--- include/demangle.h (revision 266945)
+++ include/demangle.h (working copy)
@@ -77,7 +77,7 @@
/* If DMGL_NO_RECURSE_LIMIT is not enabled, then this is the value used as
the maximum depth of recursion allowed. It should be enough for any
real-world mangled name. */
-#define DEMANGLE_RECURSION_LIMIT 1024
+#define DEMANGLE_RECURSION_LIMIT 2048
/* Enumeration of possible demangling styles.