This is the mail archive of the
mailing list for the GCC project.
Re: Fix fir PR71696 in Libiberty Demangler (6)
- From: Marcel Böhme <boehme dot marcel at gmail dot com>
- To: Jeff Law <law at redhat dot com>, gcc-patches List <gcc-patches at gcc dot gnu dot org>, Jason Merrill <jason at redhat dot com>
- Cc: Bernd Schmidt <bschmidt at redhat dot com>
- Date: Mon, 18 Jul 2016 10:31:22 +0800
- Subject: Re: Fix fir PR71696 in Libiberty Demangler (6)
- Authentication-results: sourceware.org; auth=none
- References: <2542F285-1E9B-4A52-A89C-5E06FC117020@gmail.com> <firstname.lastname@example.org>
This patch is still pending a full review.
> On 4 Jul 2016, at 8:54 PM, Bernd Schmidt <email@example.com> wrote:
> On 06/30/2016 08:46 AM, Marcel Böhme wrote:
>> The attached patch fixes the stack overflow in the demangler due to
>> cycles in the references of “remembered” mangled types
>> The methods demangle_signature and do_arg in cplus-dem.c allow to
>> “remember” mangled type names that can later be referenced and will
>> also be demangled. The method demangle_args demangles those types
>> following any references. So, if there is a cycle in the referencing
>> (or in the simplest case a self-reference), the method enters
>> infinite recursion.
>> The patch tracks the mangled types that are currently being demangled
>> in a new variable called work->proctypevec. If a referenced type is
>> currently being demangled, the demangling is marked as not
> I'll defer reviewing these to someone who understands demangling better. You might want to Cc Jason.