This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFA/RFC: Add stack recursion limit to libiberty's demangler
- From: Ian Lance Taylor <ian at airs dot com>
- To: Nick Clifton <nickc at redhat dot com>
- Cc: Jakub Jelinek <jakub at redhat 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 05:55:52 -0800
- Subject: Re: RFA/RFC: Add stack recursion limit to libiberty's demangler
- References: <87muprdko7.fsf@redhat.com> <20181130084211.GX12380@tucnak> <173817ca-0aa0-e1a2-6725-37e079ead545@redhat.com>
Nick Clifton <nickc@redhat.com> writes:
> I did consider just having a fixed limit, that the user cannot change, but
> I thought that this might be rejected by reviewers. (On the grounds that
> different limits are appropriate to different execution environments).
> Note - enabling or disabling the recursion limit is controlled by a separate
> feature of the proposed patch, ie the new DMGL_RECURSE_LIMIT flag in the
> options field of the cplus_demangleXXX() functions. But there is not enough
> room in the options field to also include a recursion limit value.
I think it would be fine to have a large fixed limit plus a flag to
disable the limit. I can't think of any reason why a program would want
to change the limit unless it has complete trust in the symbols it is
demangling, and in that case it may as well simply disable the limit.
Ian