This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [LTO] PATCH: Fix segv triggered by null pointer dereference
On Thu, Oct 16, 2008 at 05:48, Simon Baldwin <simonb@google.com> wrote:
> There is something else occurring here, but this patch seemed suitable in
> the interim to get past a fatal error. The while() loop has two termination
> conditions, one of which is null 'block', but the statement that follows
> caters for only one of them, and misses null 'block'. At this level, the
> change seems justifiable.
Ah, yes. Good point. It's certainly better than aborting during a
diagnostic message.
> Creating a test case isn't hard, but once the segv is fixed it's nigh
> impossible to create dejagnu patterns to catch the untidy error messages.
> Of course, that's just another sign that the fix isn't a complete one.
Sure, but I was referring to that one liner you had that causes the
SEGV. You can use dg-warn to trim out the warning or compile with -w.
> Can we live with it like it is for now, with the intention to revisit it
> later?
Sure.
Diego.