This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, PR 57748] Check for out of bounds access, Part 2
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: Bernd Edlinger <bernd dot edlinger at hotmail dot de>
- Cc: gcc-patches at gcc dot gnu dot org, Martin Jambor <mjambor at suse dot cz>, Richard Biener <richard dot guenther at gmail dot com>
- Date: Tue, 08 Oct 2013 10:01:37 +0200
- Subject: Re: [PATCH, PR 57748] Check for out of bounds access, Part 2
- Authentication-results: sourceware.org; auth=none
- References: <20130910193228 dot GE6732 at virgil dot suse> <2252595 dot hHgm7tbWmy at polaris> <DUB122-W40996D8CFC298077ADE02BE4170 at phx dot gbl>
> OK, what do you think of it now?
My take on this is that the Proper Fix(tm) has been posted by Martin:
http://gcc.gnu.org/ml/gcc-patches/2013-08/msg00082.html
IMO it's a no-brainer, modulo the ABI concern. Everything else is more or
less clever stuff to paper over this original compute_record_mode bug.
We are lying to the expander by pretending that the object has V2DImode since
it's larger and thus cannot be manipulated in this mode; everything is clearly
downhill from there. If we don't want to properly fix the bug then let's put
a hack in the expander, possibly using EXPAND_MEMORY, but it should trigger
_only_ for structures with zero-sized arrays and non-BLKmode and be preceded
by a big ??? comment explaining why it is deemed necessary.
--
Eric Botcazou