This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [3.4/4.0/4.1 patch] pragma once fix


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]