This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Off-by-one errors in gcc/config/arm/pr-support.c
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Mark Shinwell <shinwell at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Paul Brook <paul at codesourcery dot com>, Richard Earnshaw <Richard dot Earnshaw at arm dot com>
- Date: Wed, 28 Jun 2006 12:35:24 -0400
- Subject: Re: [PATCH] Off-by-one errors in gcc/config/arm/pr-support.c
- References: <449AF6C1.3020604@codesourcery.com>
Mark Shinwell wrote:
> I've decided to split this out on its own, since it is an obvious bugfix.
>
> The _Unwind_VRS_Pop routine takes an "op" argument encoded within which
> is the number of registers to be popped. The ARM EHABI encodes register
> ranges using a start register and an end register; thus, there is scope
> for an off-by-one error and indeed such errors manifest themselves in
> the current code in pr-support.c. The patch fixes these errors, which
> will cause failure to correctly unwind the stack in certain cases.
>
> OK? (Could this even be eligible for mainline right now?)
I think that this patch does in fact fix a regression, in that
presumably we can now unwind the stack incorrectly, whereas in previous
version of GCC we would have unwound it correctly.
So, I think the patch is OK at this time -- but only if approved by an
ARM maintainer. Paul, Richard, what say you?
Also, Mark, we should have a regression test to go with this patch, if
at all possible. (You might be able to explicitly fill registers with
values using an "asm" statement to help trigger the problem.)
Thanks,
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713