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]

Re: [RFA:] Fix fatal DW_EH_PE_absptr EH failure in fde_unencoded_compare:derefer pc_begin


On Mon, 22 Oct 2001, Richard Henderson wrote:
> On Mon, Oct 22, 2001 at 03:01:57AM -0400, Hans-Peter Nilsson wrote:
> > I see the difference is in signedness.
> > Ok with that change?
>
> Yes.

Thanks.  As an obvious change, I changed variable names to be in
line with that of the other similar functions.  This updated
patch was tested on the same targets; same changelog entry.

Index: unwind-dw2-fde.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/unwind-dw2-fde.c,v
retrieving revision 1.13
diff -p -c -r1.13 unwind-dw2-fde.c
*** unwind-dw2-fde.c	2001/10/10 19:53:29	1.13
--- unwind-dw2-fde.c	2001/10/22 20:17:33
*************** static int
*** 297,305 ****
  fde_unencoded_compare (struct object *ob __attribute__((unused)),
  		       fde *x, fde *y)
  {
!   if (x->pc_begin > y->pc_begin)
      return 1;
!   if (x->pc_begin < y->pc_begin)
      return -1;
    return 0;
  }
--- 297,308 ----
  fde_unencoded_compare (struct object *ob __attribute__((unused)),
  		       fde *x, fde *y)
  {
!   _Unwind_Ptr x_ptr = *(_Unwind_Ptr *) x->pc_begin;
!   _Unwind_Ptr y_ptr = *(_Unwind_Ptr *) y->pc_begin;
!
!   if (x_ptr > y_ptr)
      return 1;
!   if (x_ptr < y_ptr)
      return -1;
    return 0;
  }

brgds, H-P


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