This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: RFA/RFC: Add stack recursion limit to libiberty's demangler
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Nick Clifton <nickc at redhat dot com>
- Cc: ian at airs dot com, gcc-patches at gcc dot gnu dot org, binutils at sourceware dot org, matz at gcc dot gnu dot org, sgayou at redhat dot com, jason at redhat dot com
- Date: Fri, 30 Nov 2018 09:42:11 +0100
- Subject: Re: RFA/RFC: Add stack recursion limit to libiberty's demangler
- References: <87muprdko7.fsf@redhat.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Fri, Nov 30, 2018 at 08:38:48AM +0000, Nick Clifton wrote:
> Also - Tom and Pedro have raised the issue that the patch introduces
> a new static variable to the library that is not thread safe. I am
> not sure of the best way to address this problem. Possibly the
> variable could be made thread local ? Are there any other static
Please don't. That has a cost for all the programs that link against
libstdc++ or any other library that includes the demangler, even when they
don't use the demangler at all (99.9% of the users).
Most of the demangler functions pass around a pointer to a struct with
context, can't this be added in there?
Jakub