------- Comment #13 from dave at hiauly1 dot hia dot nrc dot ca  2009-12-04 
23:45 -------
Subject: Re:  FAIL: gnat.dg/null_pointer_deref1.adb
        execution test

On Fri, 04 Dec 2009, ebotcazou at gcc dot gnu dot org wrote:

> 
> 
> ------- Comment #10 from ebotcazou at gcc dot gnu dot org  2009-12-04 09:52 
> -------
> > The catch for the first null pointer exception in libjava.lang/Array_3
> > is not caught but I don't know why.
> 
> Very likely because of the adjustment made in libjava/pa-signal.h:
> 
> #define MAKE_THROW_FRAME(_exception)                            \
> do                                                              \
> {                                                               \
>   struct ucontext *uc = (struct ucontext *)arg;                 \
>   struct sigcontext *sc = &uc->uc_mcontext;                     \
>   (void)_dummy;                                                 \
>   (void)_info;                                                  \
>   /* Advance the program counter so that it is after the start  \
>      of the instruction:  the exception handler expects         \
>      the PC to point to the instruction after a call. */        \
>   sc->sc_iaoq[0] = sc->sc_iaoq[1];                              \
>   sc->sc_iaoq[1] += 4;                                          \
> }                                                               \
> while (0)
> 
> That's not true if you set fs->signal_frame to 1 in the fallback routine.

The attached change seems to fix the Array_3 linux fail.  Testing a
similar change for hpux.  However, need to fix the following warnings:

../../../gcc/libjava/prims.cc:178:1: warning: unused parameter
'_dummy'../../../gcc/libjava/prims.cc:178:1: warning: unused parameter
'_info'../../../gcc/libjava/prims.cc:178:1: warning: unused parameter 'arg'

Dave


------- Comment #14 from dave at hiauly1 dot hia dot nrc dot ca  2009-12-04 
23:45 -------
Created an attachment (id=19230)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19230&action=view)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41912

Reply via email to