This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch] Not very subtle fix for pr61510
- From: Richard Biener <rguenther at suse dot de>
- To: James Greenhalgh <james dot greenhalgh at arm dot com>
- Cc: gcc-patches at gcc dot gnu dot org, hubicka at ucw dot cz
- Date: Mon, 23 Jun 2014 18:31:14 +0200 (CEST)
- Subject: Re: [Patch] Not very subtle fix for pr61510
- Authentication-results: sourceware.org; auth=none
- References: <1403540433-16702-1-git-send-email-james dot greenhalgh at arm dot com>
On Mon, 23 Jun 2014, James Greenhalgh wrote:
>
> Hi,
>
> pr61510 is a case where cgraphunit.c::analyze_functions can end up
> dereferencing a NULL pointer. This is, to me, the obvious way to avoid
> dereferencing NULL.
>
> However, I'm not very confident that this isn't just masking some
> horrible and subtle bug, so I'd like some review feedback on the patch.
>
> Tested on aarch64-none-elf, where I was seeing the issue.
>
> OK?
Obvious in some sense to me, too, but I wonder why we don't have a cgraph
node
for it and what happens if it is created later (and then doesn't
have the flag set)?
Honza?
Richard.
> Thanks,
> James
>
> ---
> 2014-06-19 James Greenhalgh <james.greenhalgh@arm.com>
>
> PR regression/61510
> * cgraphunit.c (analyze_functions): Check we have an origin
> node before dereferencing it.
>
--
Richard Biener <rguenther@suse.de>
SUSE / SUSE Labs
SUSE LINUX Products GmbH - Nuernberg - AG Nuernberg - HRB 16746
GF: Jeff Hawn, Jennifer Guild, Felix Imend"orffer