This is the mail archive of the gcc-bugs@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]

[Bug ada/41912] FAIL: gnat.dg/null_pointer_deref1.adb execution test



------- 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.


-- 


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


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