This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java 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]

PR java/17689 [4.0 Regression] New testsuite failures indicate signal unwinding is broken


It seems like a write to a volatile mem is being deleted.  This may
not be a real bug, because libgcj is obtaining the mem by doing some
blatantly illegal addressing into the stack.

I should rework i386-signal.h to access the kernel struct in a legal
way.  Until then, this patch makes gcj usable again.

However, I think the regression is down to this patch:

 > 2004-09-22  Diego Novillo  <dnovillo@redhat.com>
 > 
 >         PR tree-optimization/16721
 >         * tree-dfa.c (dump_variable): Show TREE_THIS_VOLATILE.
 >         * tree-ssa-alias.c (create_memory_tag): Move setting of
 >         TREE_THIS_VOLATILE ...
 >         (get_tmt_for): ... here.
 > 

so there might be a real bug here.

Andrew.


2004-09-27  Andrew Haley  <aph@redhat.com>

	* include/i386-signal.h (MAKE_THROW_FRAME): Use _regs as the input
	to a volatile asm to prevent PC adjustment in stack from being
	deleted.
	(HANDLE_DIVIDE_OVERFLOW): Likewise.

Index: include/i386-signal.h
===================================================================
RCS file: /cvs/gcc/gcc/libjava/include/i386-signal.h,v
retrieving revision 1.18
diff -c -2 -p -r1.18 i386-signal.h
*** include/i386-signal.h	8 Feb 2004 17:13:50 -0000	1.18
--- include/i386-signal.h	27 Sep 2004 13:42:45 -0000
*************** do									\
*** 33,37 ****
       the PC to point to the instruction after a call. */		\
    _regs->eip += 2;							\
! 									\
  }									\
  while (0)
--- 33,39 ----
       the PC to point to the instruction after a call. */		\
    _regs->eip += 2;							\
!   /* Use _regs as an input to prevent this PC adjustment from being	\
!      deleted.  */							\
!   __asm__ __volatile__ (""::"m"(*_regs));				\
  }									\
  while (0)
*************** do									\
*** 83,86 ****
--- 85,89 ----
  	  _eip += 2;							\
  	  _regs->eip = (unsigned long)_eip;				\
+ 	  asm volatile (""::"m"(*_regs));				\
  	  return;							\
  	}								\
*************** do									\
*** 92,95 ****
--- 95,99 ----
  	     call. */							\
  	  _regs->eip += 2;						\
+ 	  asm volatile (""::"m"(*_regs));				\
  	}								\
      }									\


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