public inbox for java-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Patch, libjava] use -fnon-call-exceptions rather than -fasynchronous-unwind-tables.
@ 2010-08-18  9:31 IainS
  2010-08-18  9:40 ` Richard Guenther
  2010-08-18  9:41 ` Andrew Haley
  0 siblings, 2 replies; 8+ messages in thread
From: IainS @ 2010-08-18  9:31 UTC (permalink / raw)
  To: java-patches; +Cc: gcc patches, Richard Henderson

Hi
IIUC, the following should be the 'correct' approach.
OK for trunk? (with an appropriate changelog,  of course).
Iain

Index: libjava/classpath/configure.ac
===================================================================
--- libjava/classpath/configure.ac	(revision 163330)
+++ libjava/classpath/configure.ac	(working copy)
@@ -563,7 +563,7 @@ if test "x${COMPILE_JNI}" = xyes; then
      dnl CFLAGS that are used for all native code.  We want to compile
      dnl everything with unwinder data so that backtrace() will always
      dnl work.
-    EXTRA_CFLAGS='-fexceptions -fasynchronous-unwind-tables'
+    EXTRA_CFLAGS='-fexceptions -fnon-call-exceptions'
      AC_SUBST(EXTRA_CFLAGS)

      dnl Strict warning flags which not every module uses.

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

* Re: [Patch, libjava] use -fnon-call-exceptions rather than -fasynchronous-unwind-tables.
  2010-08-18  9:31 [Patch, libjava] use -fnon-call-exceptions rather than -fasynchronous-unwind-tables IainS
@ 2010-08-18  9:40 ` Richard Guenther
  2010-08-18  9:45   ` Jakub Jelinek
  2010-08-18  9:46   ` IainS
  2010-08-18  9:41 ` Andrew Haley
  1 sibling, 2 replies; 8+ messages in thread
From: Richard Guenther @ 2010-08-18  9:40 UTC (permalink / raw)
  To: IainS; +Cc: java-patches, gcc patches, Richard Henderson

On Wed, Aug 18, 2010 at 11:30 AM, IainS
<developer@sandoe-acoustics.co.uk> wrote:
> Hi
> IIUC, the following should be the 'correct' approach.
> OK for trunk? (with an appropriate changelog,  of course).
> Iain

That doens't match what the comment says.  What is it the correct
approach for?

> Index: libjava/classpath/configure.ac
> ===================================================================
> --- libjava/classpath/configure.ac      (revision 163330)
> +++ libjava/classpath/configure.ac      (working copy)
> @@ -563,7 +563,7 @@ if test "x${COMPILE_JNI}" = xyes; then
>     dnl CFLAGS that are used for all native code.  We want to compile
>     dnl everything with unwinder data so that backtrace() will always
>     dnl work.
> -    EXTRA_CFLAGS='-fexceptions -fasynchronous-unwind-tables'
> +    EXTRA_CFLAGS='-fexceptions -fnon-call-exceptions'
>     AC_SUBST(EXTRA_CFLAGS)
>
>     dnl Strict warning flags which not every module uses.
>
>

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

* Re: [Patch, libjava] use -fnon-call-exceptions rather than -fasynchronous-unwind-tables.
  2010-08-18  9:31 [Patch, libjava] use -fnon-call-exceptions rather than -fasynchronous-unwind-tables IainS
  2010-08-18  9:40 ` Richard Guenther
@ 2010-08-18  9:41 ` Andrew Haley
  1 sibling, 0 replies; 8+ messages in thread
From: Andrew Haley @ 2010-08-18  9:41 UTC (permalink / raw)
  To: IainS; +Cc: java-patches, gcc patches, Richard Henderson

On 08/18/2010 10:30 AM, IainS wrote:

> IIUC, the following should be the 'correct' approach.
> OK for trunk? (with an appropriate changelog,  of course).

What's the point of this change?

See
http://developer.classpath.org/pipermail/classpath-patches/2008-June/006116.html

Andrew.

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

* Re: [Patch, libjava] use -fnon-call-exceptions rather than -fasynchronous-unwind-tables.
  2010-08-18  9:40 ` Richard Guenther
@ 2010-08-18  9:45   ` Jakub Jelinek
  2010-08-18 15:08     ` Richard Henderson
  2010-08-18 16:34     ` Mike Stump
  2010-08-18  9:46   ` IainS
  1 sibling, 2 replies; 8+ messages in thread
From: Jakub Jelinek @ 2010-08-18  9:45 UTC (permalink / raw)
  To: Richard Guenther; +Cc: IainS, java-patches, gcc patches, Richard Henderson

On Wed, Aug 18, 2010 at 11:40:15AM +0200, Richard Guenther wrote:
> On Wed, Aug 18, 2010 at 11:30 AM, IainS
> <developer@sandoe-acoustics.co.uk> wrote:
> > IIUC, the following should be the 'correct' approach.
> > OK for trunk? (with an appropriate changelog,  of course).
> > Iain
> 
> That doens't match what the comment says.  What is it the correct
> approach for?

Yeah, I think -fa-u-t is right, otherwise you can't backtrace through
signal handlers.  If Darwin unwinder is lame enough that it can't grok it,
let it change just on Darwin and don't punish sane OSes.

> > --- libjava/classpath/configure.ac      (revision 163330)
> > +++ libjava/classpath/configure.ac      (working copy)
> > @@ -563,7 +563,7 @@ if test "x${COMPILE_JNI}" = xyes; then
> >     dnl CFLAGS that are used for all native code.  We want to compile
> >     dnl everything with unwinder data so that backtrace() will always
> >     dnl work.
> > -    EXTRA_CFLAGS='-fexceptions -fasynchronous-unwind-tables'
> > +    EXTRA_CFLAGS='-fexceptions -fnon-call-exceptions'
> >     AC_SUBST(EXTRA_CFLAGS)
> >
> >     dnl Strict warning flags which not every module uses.
> >
> >

	Jakub

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

* Re: [Patch, libjava] use -fnon-call-exceptions rather than -fasynchronous-unwind-tables.
  2010-08-18  9:40 ` Richard Guenther
  2010-08-18  9:45   ` Jakub Jelinek
@ 2010-08-18  9:46   ` IainS
  1 sibling, 0 replies; 8+ messages in thread
From: IainS @ 2010-08-18  9:46 UTC (permalink / raw)
  To: Richard Guenther; +Cc: java-patches, gcc patches, Richard Henderson


On 18 Aug 2010, at 10:40, Richard Guenther wrote:

> On Wed, Aug 18, 2010 at 11:30 AM, IainS
> <developer@sandoe-acoustics.co.uk> wrote:
>> Hi
>> IIUC, the following should be the 'correct' approach.
>> OK for trunk? (with an appropriate changelog,  of course).
>> Iain
>
> That doens't match what the comment says.  What is it the correct
> approach for?

true, I missed adjusting the comment.

I think that the point is that the underlying requirement is to handle  
non-call-exceptions, and that the method by which that is achieved  
should be left to the target to decide.

[at present -fasynchronous-unwind-tables is set unconditionally by - 
fnon-call-exception in any case (although I'm not sure that's correct  
in all cases)]

>> Index: libjava/classpath/configure.ac
>> ===================================================================
>> --- libjava/classpath/configure.ac      (revision 163330)
>> +++ libjava/classpath/configure.ac      (working copy)
>> @@ -563,7 +563,7 @@ if test "x${COMPILE_JNI}" = xyes; then
>>     dnl CFLAGS that are used for all native code.  We want to compile
>>     dnl everything with unwinder data so that backtrace() will always
>>     dnl work.
>> -    EXTRA_CFLAGS='-fexceptions -fasynchronous-unwind-tables'
>> +    EXTRA_CFLAGS='-fexceptions -fnon-call-exceptions'
>>     AC_SUBST(EXTRA_CFLAGS)
>>
>>     dnl Strict warning flags which not every module uses.
>>
>>

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

* Re: [Patch, libjava] use -fnon-call-exceptions rather than -fasynchronous-unwind-tables.
  2010-08-18  9:45   ` Jakub Jelinek
@ 2010-08-18 15:08     ` Richard Henderson
  2010-08-18 15:15       ` Andrew Haley
  2010-08-18 16:34     ` Mike Stump
  1 sibling, 1 reply; 8+ messages in thread
From: Richard Henderson @ 2010-08-18 15:08 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: Richard Guenther, IainS, java-patches, gcc patches

On 08/18/2010 02:45 AM, Jakub Jelinek wrote:
> On Wed, Aug 18, 2010 at 11:40:15AM +0200, Richard Guenther wrote:
>> On Wed, Aug 18, 2010 at 11:30 AM, IainS
>> <developer@sandoe-acoustics.co.uk> wrote:
>>> IIUC, the following should be the 'correct' approach.
>>> OK for trunk? (with an appropriate changelog,  of course).
>>> Iain
>>
>> That doens't match what the comment says.  What is it the correct
>> approach for?
> 
> Yeah, I think -fa-u-t is right, otherwise you can't backtrace through
> signal handlers.  If Darwin unwinder is lame enough that it can't grok it,
> let it change just on Darwin and don't punish sane OSes.

Except that the signal handlers that java wants to backtrace through
are all synchronous.  They'll never occur in the epilogue of some
function, for instance.  Otherwise libjava would have failed to work
for years and years.


r~

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

* Re: [Patch, libjava] use -fnon-call-exceptions rather than -fasynchronous-unwind-tables.
  2010-08-18 15:08     ` Richard Henderson
@ 2010-08-18 15:15       ` Andrew Haley
  0 siblings, 0 replies; 8+ messages in thread
From: Andrew Haley @ 2010-08-18 15:15 UTC (permalink / raw)
  To: java-patches

On 08/18/2010 04:08 PM, Richard Henderson wrote:
> On 08/18/2010 02:45 AM, Jakub Jelinek wrote:
>> On Wed, Aug 18, 2010 at 11:40:15AM +0200, Richard Guenther wrote:
>>> On Wed, Aug 18, 2010 at 11:30 AM, IainS
>>> <developer@sandoe-acoustics.co.uk> wrote:
>>>> IIUC, the following should be the 'correct' approach.
>>>> OK for trunk? (with an appropriate changelog,  of course).
>>>> Iain
>>>
>>> That doens't match what the comment says.  What is it the correct
>>> approach for?
>>
>> Yeah, I think -fa-u-t is right, otherwise you can't backtrace through
>> signal handlers.  If Darwin unwinder is lame enough that it can't grok it,
>> let it change just on Darwin and don't punish sane OSes.
> 
> Except that the signal handlers that java wants to backtrace through
> are all synchronous.  They'll never occur in the epilogue of some
> function, for instance.  Otherwise libjava would have failed to work
> for years and years.

This use of -fasynchronous-unwind-tables is in order to get backtraces
for bugs such as segfaults.  I think such bugs can trigger in prologues
and epilogues.

Andrew.

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

* Re: [Patch, libjava] use -fnon-call-exceptions rather than -fasynchronous-unwind-tables.
  2010-08-18  9:45   ` Jakub Jelinek
  2010-08-18 15:08     ` Richard Henderson
@ 2010-08-18 16:34     ` Mike Stump
  1 sibling, 0 replies; 8+ messages in thread
From: Mike Stump @ 2010-08-18 16:34 UTC (permalink / raw)
  To: Jakub Jelinek
  Cc: Richard Guenther, IainS, java-patches, gcc patches, Richard Henderson

On Aug 18, 2010, at 2:45 AM, Jakub Jelinek wrote:
> Yeah, I think -fa-u-t is right, otherwise you can't backtrace through
> signal handlers.  If Darwin unwinder is lame enough that it can't grok it,
> let it change just on Darwin and don't punish sane OSes.

Walking the darwin signal handers works just fine...  I can't recall exactly how well the async signals work v the sync signals.

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

end of thread, other threads:[~2010-08-18 16:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-18  9:31 [Patch, libjava] use -fnon-call-exceptions rather than -fasynchronous-unwind-tables IainS
2010-08-18  9:40 ` Richard Guenther
2010-08-18  9:45   ` Jakub Jelinek
2010-08-18 15:08     ` Richard Henderson
2010-08-18 15:15       ` Andrew Haley
2010-08-18 16:34     ` Mike Stump
2010-08-18  9:46   ` IainS
2010-08-18  9:41 ` Andrew Haley

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