This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Set DEMANGLE_RECURSION_LIMIT to 1536
- From: Nick Clifton <nickc at redhat dot com>
- To: Michael Matz <matz at suse dot de>
- Cc: Ian Lance Taylor <iant at google dot com>, "H.J. Lu" <hjl dot tools at gmail dot com>, Pedro Alves <palves at redhat dot com>, Richard Guenther <richard dot guenther at gmail dot com>, Jakub Jelinek <jakub at redhat dot com>, sgayou at redhat dot com, Tom Tromey <tom at tromey dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Binutils <binutils at sourceware dot org>, Jason Merrill <jason at redhat dot com>
- Date: Mon, 10 Dec 2018 15:12:53 +0000
- Subject: Re: [PATCH] Set DEMANGLE_RECURSION_LIMIT to 1536
- References: <email@example.com> <20181130084211.GX12380@tucnak> <firstname.lastname@example.org> <email@example.com> <20181130140330.GA12380@tucnak> <firstname.lastname@example.org> <CAFiYyc1gTSXgSiJSFKEWaE0UTGbi45-mWHKJnUb4Wvjp86bbFQ@mail.gmail.com> <email@example.com> <CAKOQZ8zspME4gzoRw4xgFcShoqeUfp_e=Og=4S-yKn4EehokeA@mail.gmail.com> <firstname.lastname@example.org> <email@example.com> <firstname.lastname@example.org> <email@example.com> <firstname.lastname@example.org> <CAKOQZ8y=B6beozokJ2tdAAkVDVue08ogehMP7TAXvrPzdz9MuQ@mail.gmail.com> <CAMe9rOomd2E3C03CxTXyTRkq6HG32OX+rbMPS3y6dcEWmwaMYg@mail.gmail.com> <CAMe9rOokMpaAUFk0rcYTTUQTQhEMn-VQetXfiDTDXYdTXZEJTA@mail.gmail.com> <alpine.LSU.email@example.com>
> I think this points toward the limit being _much_ too low.
Fair enough - several other people have said this as well. So
I have proposed an alternative patch instead. My current suggestion
is to raise the limit to 2048, which allows the libiberty patch to
pass. But do you have a feel for how much is a realistic limit ?
> demangler, just looking at the symbol name and demangled result I don't
> readily see where the depth of recursion really is more than 1024, are
> there perhaps some recursion_level-- statements skipped?
I do not think so. Unless there are some long jumps in the demangling code ?
I did a quick scan and did not find any, but I could have missed something.
Plus of course I cannot guarantee that my patch is bug free, although looking
at it again I do not see where I missed a level decrement.
I think that the demangling code just is really recursive...