This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] avoid infinite recursion in maybe_warn_alloc_args_overflow (pr 78775)
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Martin Sebor <msebor at gmail dot com>
- Cc: Gcc Patch List <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 13 Dec 2016 11:32:43 +0100
- Subject: Re: [PATCH] avoid infinite recursion in maybe_warn_alloc_args_overflow (pr 78775)
- Authentication-results: sourceware.org; auth=none
- References: <a0841e6f-f3dc-e8e9-f439-5f11c69c285b@gmail.com>
On Tue, Dec 13, 2016 at 2:36 AM, Martin Sebor <msebor@gmail.com> wrote:
> The attached patch avoids infinite recursion when traversing phi
> nodes in maybe_warn_alloc_args_overflow by using a bitmap to keep
> track of those already visited and breaking out.
It looks somewhat excessive (the whole PHI node walk looks exponential in the
number of alloca calls given a good enough testcase).
It also looks like operand_signed_p really returns only a wild guess, neither
conservatively true or false. Is that correct?
Can you instead scrap the weird anti-range handling please?
Thanks,
Richard.
> Thanks
> Martin