This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RE: [PING] [PATCH, PR 57748] Check for out of bounds access, Part 2
- From: Bernd Edlinger <bernd dot edlinger at hotmail dot de>
- To: Jeff Law <law at redhat dot com>, Richard Biener <richard dot guenther at gmail dot com>
- Cc: Eric Botcazou <ebotcazou at adacore dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Martin Jambor <mjambor at suse dot cz>, Jakub Jelinek <jakub at redhat dot com>
- Date: Thu, 28 Nov 2013 11:24:26 +0100
- Subject: RE: [PING] [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>,<20131023171106 dot GC22314 at virgil dot suse>,<DUB122-W18EE8845FD49B5DF19B227E40C0 at phx dot gbl>,<3910341 dot 1yrhooXIjO at polaris>,<CAFiYyc0+6E5jQijgb+xVitqJZoDTy5EHNtHS2fPdVQx_BD1jUA at mail dot gmail dot com>,<DUB122-W3250D65A780768771CDEB5E40C0 at phx dot gbl>,<CAFiYyc10-KqBBJCzPqs9DJ8x0BLDyak4n5MGkKiWDyvvtQwf0g at mail dot gmail dot com>,<DUB122-W2465C900CBE219827F300CE40D0 at phx dot gbl>,<CAFiYyc0iUz1BJknJ4-kQYzB=b+ujJaUVqP=mF237brP4OJzvqw at mail dot gmail dot com>,<DUB122-W45EB12583A2B768CE9631AE40D0 at phx dot gbl>,<CAFiYyc1KcuO+HkqmDCNqehDjzj3hQBHCxKfBzqvRd7vbmyTUCg at mail dot gmail dot com>,<DUB122-W188369190C05F1E42EF3F0E4F30 at phx dot gbl>,<DUB122-W1853DF08D390E24BD9BFB1E4F30 at phx dot gbl>,<DUB122-W27C19CFA5300AACA5D96A0E4E70 at phx dot gbl> <DUB122-W3E2F27A875B9A27572401E4EF0 at phx dot gbl>,<529642E4 dot 9030409 at redhat dot com>
Hi,
On Wed, 27 Nov 2013 12:07:16, Jeff Law wrote:
>
> On 11/27/13 05:29, Bernd Edlinger wrote:
>> Hi,
>>
>> ping...
>>
>> this patch still open: http://gcc.gnu.org/ml/gcc-patches/2013-11/msg02291.html
>>
>> Note: it does, as it is, _not_ depend on the keep_aligning patch.
>> And it would fix some really nasty wrong code generation issues.
> Is there a testcase for this problem?
Yes,
the patch contains two test cases, one for
struct S { V a; V b[0]; } P __attribute__((aligned (1)))
and another for
struct S { V b[1]; } P __attribute__((aligned (1)))
V can be anything that has a movmisalign_optab or is SLOW_UNALIGNED_ACCESS
If V::b is used as flexible array, reading p->b[1] gives garbage.
We tried hard, to fix this in stor-layout.c by not using the mode of V
for struct S, but this created ABI-fallout. So currently the only possible
way to fix it seems to be in expansion, by letting expand_real_1 know that
we need a memory reference, even if it may be unaligned.
>
> My recommendation is to start a separate thread which focuses on this
> issue and only this issue.
>
If there are more questions of general interest, please feel free to start
in a new thread.
> jeff
>
Thanks
Bernd.
- References:
- RE: [PATCH, PR 57748] Check for out of bounds access, Part 2
- RE: [PATCH, PR 57748] Check for out of bounds access, Part 2
- [PATCH, PR 57748] Check for out of bounds access, Part 2
- [PING] [PATCH, PR 57748] Check for out of bounds access, Part 2
- Re: [PING] [PATCH, PR 57748] Check for out of bounds access, Part 2