Patchwork [alpha] : Fix PR target/50737, FAIL: Throw_3 -O3 execution

login
register
mail settings
Submitter Uros Bizjak
Date Oct. 16, 2011, 6:09 a.m.
Message ID <CAFULd4ah6_tfD7k9fsn03EE_jDTamOHbmppbzWgXMrtmcq48Vg@mail.gmail.com>
Download mbox | patch
Permalink /patch/120014/
State New
Headers show

Comments

Uros Bizjak - Oct. 16, 2011, 6:09 a.m.
Hello!

As explained in length in the PR [1], we fail to mark signal frames
correctly, leading to the abort in EH support library.

As suggested by Eric, attached patch marks fs->signal_frame in the
same way as other dwarf2 targets.

2011-10-16  Uros Bizjak  <ubizjak@gmail.com>
	    Eric Botcazou  <ebotcazou@adacore.com>

	* config/alpha/linux-unwind.h (alpha_fallback_frame_state): Set
	fs->signal_frame to 1.

Patch was bootstrapped and regression tested on alphaev68-pc-linux-gnu
where it fixes all libjava failures [2].

OK for mainline SVN and release branches?

[1] http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50737
[2] http://gcc.gnu.org/ml/gcc-testresults/2011-10/msg01333.html

Uros.
Uros Bizjak - Oct. 16, 2011, 6:35 p.m.
On Sun, Oct 16, 2011 at 8:09 AM, Uros Bizjak <ubizjak@gmail.com> wrote:

> As explained in length in the PR [1], we fail to mark signal frames
> correctly, leading to the abort in EH support library.
>
> As suggested by Eric, attached patch marks fs->signal_frame in the
> same way as other dwarf2 targets.
>
> 2011-10-16  Uros Bizjak  <ubizjak@gmail.com>
>            Eric Botcazou  <ebotcazou@adacore.com>
>
>        * config/alpha/linux-unwind.h (alpha_fallback_frame_state): Set
>        fs->signal_frame to 1.
>
> Patch was bootstrapped and regression tested on alphaev68-pc-linux-gnu
> where it fixes all libjava failures [2].

I didn't notice new Java failure:

        === libjava tests ===


Running target unix
FAIL: Array_3 execution - source compiled test
FAIL: Array_3 -findirect-dispatch execution - source compiled test
FAIL: Array_3 -O3 execution - source compiled test
FAIL: Array_3 -O3 -findirect-dispatch execution - source compiled test

        === libjava Summary ===

# of expected passes        2578
# of unexpected failures    4
# of untested testcases        4

Running failing test manually with new libgcc_s.so, we get:

./Array_3.exe
Exception in thread "main" java.lang.NullPointerException
   at Array_3.main(Array_3.java:37)

It looks that NullPointerException handler was not reached for some reason...

Uros.

Patch

Index: config/alpha/linux-unwind.h
===================================================================
--- config/alpha/linux-unwind.h	(revision 179788)
+++ config/alpha/linux-unwind.h	(working copy)
@@ -74,5 +74,7 @@  alpha_fallback_frame_state (struct _Unwind_Context
   fs->regs.reg[64].how = REG_SAVED_OFFSET;
   fs->regs.reg[64].loc.offset = (long)&sc->sc_pc - new_cfa;
   fs->retaddr_column = 64;
+  fs->signal_frame = 1;
+
   return _URC_NO_REASON;
 }