This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: libffi err_bad_typedef.c fix
- From: Dave Korn <dave dot korn dot cygwin at googlemail dot com>
- To: Duncan Simpson <dps at simpson dot demon dot co dot uk>
- Cc: gcc-patches at gcc dot gnu dot org, libffi-discuss at sourceware dot org
- Date: Wed, 02 Sep 2009 01:32:13 +0100
- Subject: Re: libffi err_bad_typedef.c fix
- References: <4A9DB2AB.4070602@simpson.demon.co.uk>
[ libffi-discuss added to Cc line, re:
http://gcc.gnu.org/ml/gcc-patches/2009-09/msg00089.html ]
Duncan Simpson wrote:
> The err_bad_typedef fails due to a null pointer deference on
> my athlon 64 system. The attached patch notices that the pointer
> is NULL and returns ERR_BAD_TYPEDEF instead of dereferencing it.
>
> This fixes the err_bad_typedef.c execution tests. I have left
> them as expected failures for the moment. I believe the bug
> is ABI independent.
Is it the right fix, or is the real bug that the pointer is getting munged
in passing somehow and it's not supposed to be NULL? If it were the latter,
I'm not sure there's a lot of point in both papering over the cracks /and/
XFAILing something; it might make it less likely if anyone ever comes back to
it that they'll even realise there ever was a bug to be found, mightn't it?
cheers,
DaveK