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: Richard Earnshaw <rearnsha at arm dot com>
- To: Mark Shinwell <shinwell at codesourcery dot com>
- Cc: gcc patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 03 Jul 2006 16:32:20 +0100
- Subject: Re: [PATCH] Off-by-one errors in gcc/config/arm/pr-support.c
- References: <449AF6C1.3020604@codesourcery.com>
On Thu, 2006-06-22 at 21:00, 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?)
>
> Mark
>
> --
>
> gcc/ChangeLog:
>
> 2006-06-22 Mark Shinwell <shinwell@codesourcery.com>
>
> * config/arm/pr-support.c (gnu_unwind_execute): Fix bug by inserting
> " + 1" in necessary places to pass the correct "number of registers"
> values to _Unwind_VRS_Pop.
This is OK. In fact, I think it should probably go in everywhere given
that this code is new but clearly broken.
I'll echo Mark Mitchell's request for a regression test if possible.
R.