This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Fix ubsan/bounds-2.c
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Marek Polacek <polacek at redhat dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Ramana Radhakrishnan <ramana dot radhakrishnan at arm dot com>
- Date: Wed, 25 Jun 2014 14:49:56 +0200
- Subject: Re: [PATCH] Fix ubsan/bounds-2.c
- Authentication-results: sourceware.org; auth=none
- References: <20140625124039 dot GB489 at redhat dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Wed, Jun 25, 2014 at 02:40:40PM +0200, Marek Polacek wrote:
> On IRC Ramana reported that on ARM ubsan/bounds-2.c test fails with -O0,
> since we write to out-of-bounds location and probably rewrite the
> frame pointer stored in the stack. This patch removes such stores
> and adds some asm magic so the compiler doesn't optimize loads away as
> uninitialized memory read.
> Ramana, does this patch help on ARM?
> Tested x86_64-unknown-linux-gnu, ok for trunk?
What about bounds-5.c ? Also, do you have any tests for negative indexes?