This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [3.4/4.0/4.1 patch] pragma once fix
- From: Eric Botcazou <ebotcazou at libertysurf dot fr>
- To: James E Wilson <wilson at specifix dot com>
- Cc: gcc-patches at gcc dot gnu dot org,gdr at integrable-solutions dot net
- Date: Fri, 4 Nov 2005 06:59:45 +0100
- Subject: Re: [3.4/4.0/4.1 patch] pragma once fix
- References: <1131070999.17917.103.camel@aretha.corp.specifix.com>
> This fixes PR 24202 which is a failure with #pragma once.
>
> The compiler dies in should_stack_file because we have buffer==NULL and
> buffer_valid==true. The code assumes that buffer is usable because
> buffer_valid is true, and then we get a segfault when we try to read
> from the null pointer in buffer.
>
> The solution is to clear buffer_valid when we free buffer.
You might want to take a look at http://gcc.gnu.org/PR15167. In particular, I
initially proposed the same fix but Zack rejected it.
--
Eric Botcazou