public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH, alpha]: Fix PR target/50737, FAIL: Throw_3 -O3 execution
@ 2011-10-16 10:29 Uros Bizjak
  2011-10-16 19:45 ` Uros Bizjak
  0 siblings, 1 reply; 4+ messages in thread
From: Uros Bizjak @ 2011-10-16 10:29 UTC (permalink / raw)
  To: gcc-patches; +Cc: Richard Henderson

[-- Attachment #1: Type: text/plain, Size: 695 bytes --]

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.

[-- Attachment #2: p.diff.txt --]
[-- Type: text/plain, Size: 458 bytes --]

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;
 }

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH, alpha]: Fix PR target/50737, FAIL: Throw_3 -O3 execution
  2011-10-16 10:29 [PATCH, alpha]: Fix PR target/50737, FAIL: Throw_3 -O3 execution Uros Bizjak
@ 2011-10-16 19:45 ` Uros Bizjak
  2011-10-17  1:36   ` [PATCH, alpha, v2]: " Uros Bizjak
  0 siblings, 1 reply; 4+ messages in thread
From: Uros Bizjak @ 2011-10-16 19:45 UTC (permalink / raw)
  To: gcc-patches; +Cc: Richard Henderson

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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH, alpha, v2]: Fix PR target/50737, FAIL: Throw_3 -O3 execution
  2011-10-16 19:45 ` Uros Bizjak
@ 2011-10-17  1:36   ` Uros Bizjak
  2011-10-17 16:45     ` Richard Henderson
  0 siblings, 1 reply; 4+ messages in thread
From: Uros Bizjak @ 2011-10-17  1:36 UTC (permalink / raw)
  To: gcc-patches; +Cc: Richard Henderson

[-- Attachment #1: Type: text/plain, Size: 1954 bytes --]

On Sun, Oct 16, 2011 at 8:35 PM, 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...

As again suggested by Eric in the PR, following patch fixes all failures:

libgcc/ChangeLog:

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

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

libjava/ChangeLog:

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

	PR target/50737
	* include/dwarf2-signal.h [__alpha__]: Remove MAKE_THROW_FRAME
	definition.

Uros.

[-- Attachment #2: a.diff.txt --]
[-- Type: text/plain, Size: 1384 bytes --]

Index: libgcc/config/alpha/linux-unwind.h
===================================================================
--- libgcc/config/alpha/linux-unwind.h	(revision 180054)
+++ libgcc/config/alpha/linux-unwind.h	(working copy)
@@ -74,5 +74,7 @@
   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;
 }
Index: libjava/include/dwarf2-signal.h
===================================================================
--- libjava/include/dwarf2-signal.h	(revision 180054)
+++ libjava/include/dwarf2-signal.h	(working copy)
@@ -29,21 +29,8 @@
 // then throw an exception.  With the dwarf2 unwinder we don't usually
 // need to do anything, with some minor exceptions.
 
-#ifdef __alpha__
-#define MAKE_THROW_FRAME(_exception)					\
-do									\
-{									\
-  /* Alpha either leaves PC pointing at a faulting instruction or the	\
-   following instruction, depending on the signal.  SEGV always does	\
-   the former, so we adjust the saved PC to point to the following	\
-   instruction; this is what the handler in libgcc expects.  */		\
-  struct sigcontext *_sc = (struct sigcontext *)_p;			\
-  _sc->sc_pc += 4;							\
-}									\
-while (0)
+#ifdef __ia64__
 
-#elif defined(__ia64__)
-
 #define MAKE_THROW_FRAME(_exception)					\
 do									\
 {									\

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH, alpha, v2]: Fix PR target/50737, FAIL: Throw_3 -O3 execution
  2011-10-17  1:36   ` [PATCH, alpha, v2]: " Uros Bizjak
@ 2011-10-17 16:45     ` Richard Henderson
  0 siblings, 0 replies; 4+ messages in thread
From: Richard Henderson @ 2011-10-17 16:45 UTC (permalink / raw)
  To: Uros Bizjak; +Cc: gcc-patches

On 10/16/2011 01:45 PM, Uros Bizjak wrote:
> libgcc/ChangeLog:
> 
> 2011-10-16  Uros Bizjak  <ubizjak@gmail.com>
> 	    Eric Botcazou  <ebotcazou@adacore.com>
> 
> 	PR target/50737
> 	* config/alpha/linux-unwind.h (alpha_fallback_frame_state): Set
> 	fs->signal_frame to 1.
> 
> libjava/ChangeLog:
> 
> 2011-10-16  Uros Bizjak  <ubizjak@gmail.com>
> 	    Eric Botcazou  <ebotcazou@adacore.com>
> 
> 	PR target/50737
> 	* include/dwarf2-signal.h [__alpha__]: Remove MAKE_THROW_FRAME
> 	definition.

Ok.


r~

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-10-17 15:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-16 10:29 [PATCH, alpha]: Fix PR target/50737, FAIL: Throw_3 -O3 execution Uros Bizjak
2011-10-16 19:45 ` Uros Bizjak
2011-10-17  1:36   ` [PATCH, alpha, v2]: " Uros Bizjak
2011-10-17 16:45     ` Richard Henderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).