This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Commit: Sync libiberty and add --no-recurse-limit option to binutils

Hi Ian,

> 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
> it?

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  <>

	PR 88409
	* demangle.h (DEMANGLE_RECURSION_LIMIT): Increase to 2048.

Index: include/demangle.h
--- 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.  */
 /* Enumeration of possible demangling styles.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]