This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix ubsan/bounds-2.c


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?

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]