[patch] Fix oddity in personality routine

Jack Howarth howarth@bromo.med.uc.edu
Fri Dec 4 04:12:00 GMT 2009


Using the patch...

Index: libjava/Makefile.in
===================================================================
--- libjava/Makefile.in	(revision 154965)
+++ libjava/Makefile.in	(working copy)
@@ -1070,7 +1070,7 @@
 GCJ_WITH_FLAGS = $(GCJ) --encoding=UTF-8 -Wno-deprecated
 LTLDFLAGS = $(shell $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
 GCJLINK = $(LIBTOOL) --tag=GCJ $(LIBTOOLFLAGS) --mode=link $(GCJ) -L$(here) \
-	  $(JC1FLAGS) $(LTLDFLAGS) -o $@
+	 $(extra_gij_ldflags) $(JC1FLAGS) $(LTLDFLAGS) -o $@
 
 GCJ_FOR_ECJX_LINK = $(GCJ_FOR_ECJX) -o $@
 LIBLINK = $(LIBTOOL) --tag=CXX $(LIBTOOLFLAGS) --mode=link $(CXX) -L$(here) \
@@ -8500,8 +8500,7 @@
 	$(am__append_28)
 gij_SOURCES = 
 gij_LDFLAGS = -rpath $(dbexecdir) -rpath $(toolexeclibdir) \
-	-shared-libgcc $(THREADLDFLAGS) $(extra_ldflags) \
-	$(extra_gij_ldflags) 
+	-shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
 
 gij_LINK = $(GCJLINK) $(gij_LDFLAGS)
 gij_LDADD = -L$(here)/.libs libgij.la
Index: libjava/Makefile.am
===================================================================
--- libjava/Makefile.am	(revision 154965)
+++ libjava/Makefile.am	(working copy)
@@ -294,7 +294,7 @@
 
 LTLDFLAGS = $(shell $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
 GCJLINK = $(LIBTOOL) --tag=GCJ $(LIBTOOLFLAGS) --mode=link $(GCJ) -L$(here) \
-	  $(JC1FLAGS) $(LTLDFLAGS) -o $@
+	   $(extra_gij_ldflags) $(JC1FLAGS) $(LTLDFLAGS) -o $@
 GCJ_FOR_ECJX = @GCJ_FOR_ECJX@
 GCJ_FOR_ECJX_LINK = $(GCJ_FOR_ECJX) -o $@
 LIBLINK = $(LIBTOOL) --tag=CXX $(LIBTOOLFLAGS) --mode=link $(CXX) -L$(here) \
@@ -1065,8 +1065,7 @@
 ## need this because we are explicitly using libtool to link using the
 ## `.la' file.
 gij_LDFLAGS = -rpath $(dbexecdir) -rpath $(toolexeclibdir) \
-	-shared-libgcc $(THREADLDFLAGS) $(extra_ldflags) \
-	$(extra_gij_ldflags) 
+	-shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
 gij_LINK = $(GCJLINK) $(gij_LDFLAGS)
 ## See jv_convert_LDADD.
 gij_LDADD = -L$(here)/.libs libgij.la

The crash in gcj still occurs but it may have moved location (I am under darwin10
at the moment). I see...

gdb /sw/lib/gcc4.5/libexec/gcc/x86_64-apple-darwin10.2.0/4.5.0/ecj1
(gdb) r testme.java -fbootclasspath=/sw/share/java/ecj/ecj.jar:./:/sw/share/xtal/ccp4-6.1.2/bin/:/sw/lib/gcc4.5/share/java/libgcj-4.5.0.jar -fsource=1.5 -ftarget=1.5 -fzip-dependency /var/folders/1C/1CdoNxmNFHyOIjNBLNuJh++++TM/-Tmp-//cc3tiRxo.zip -fzip-target /var/folders/1C/1CdoNxmNFHyOIjNBLNuJh++++TM/-Tmp-//ccsmjxPB.jar
Starting program: /sw/lib/gcc4.5/libexec/gcc/x86_64-apple-darwin10.2.0/4.5.0/ecj1 testme.java -fbootclasspath=/sw/share/java/ecj/ecj.jar:./:/sw/share/xtal/ccp4-6.1.2/bin/:/sw/lib/gcc4.5/share/java/libgcj-4.5.0.jar -fsource=1.5 -ftarget=1.5 -fzip-dependency /var/folders/1C/1CdoNxmNFHyOIjNBLNuJh++++TM/-Tmp-//cc3tiRxo.zip -fzip-target /var/folders/1C/1CdoNxmNFHyOIjNBLNuJh++++TM/-Tmp-//ccsmjxPB.jar
Reading symbols for shared libraries +++++. done

Program received signal SIGABRT, Aborted.
0x00007fff843d4fe6 in __kill ()
(gdb) bt
#0  0x00007fff843d4fe6 in __kill ()
#1  0x00007fff84475e32 in abort ()
#2  0x00007fff844bffc9 in _Unwind_FindEnclosingFunction ()
#3  0x000000010001091c in gnu::classpath::VMStackWalker::getCallingClassLoader (pc=0x10098c8ac) at ../../../gcc-4.5-20091203/libjava/gnu/classpath/natVMStackWalker.cc:104
Previous frame inner to this frame (gdb could not unwind past this frame)
(gdb) x/10i 0x000000010001091c
0x10001091c <_ZN3gnu9classpath13VMStackWalker21getCallingClassLoaderEJPN4java4lang11ClassLoaderEPNS_3gcj7RawDataE+28>:	mov    %rax,%rbx
0x10001091f <_ZN3gnu9classpath13VMStackWalker21getCallingClassLoaderEJPN4java4lang11ClassLoaderEPNS_3gcj7RawDataE+31>:	callq  0x100005cd0 <_ZN14_Jv_StackTrace14UpdateNCodeMapEv>
0x100010924 <_ZN3gnu9classpath13VMStackWalker21getCallingClassLoaderEJPN4java4lang11ClassLoaderEPNS_3gcj7RawDataE+36>:	lea    0x1c7b4b5(%rip),%rax        # 0x101c8bde0 <_ZN14_Jv_StackTrace8ncodeMapE>
0x10001092b <_ZN3gnu9classpath13VMStackWalker21getCallingClassLoaderEJPN4java4lang11ClassLoaderEPNS_3gcj7RawDataE+43>:	mov    %rbx,%rsi
0x10001092e <_ZN3gnu9classpath13VMStackWalker21getCallingClassLoaderEJPN4java4lang11ClassLoaderEPNS_3gcj7RawDataE+46>:	mov    (%rax),%rdi
0x100010931 <_ZN3gnu9classpath13VMStackWalker21getCallingClassLoaderEJPN4java4lang11ClassLoaderEPNS_3gcj7RawDataE+49>:	mov    (%rdi),%rdx
0x100010934 <_ZN3gnu9classpath13VMStackWalker21getCallingClassLoaderEJPN4java4lang11ClassLoaderEPNS_3gcj7RawDataE+52>:	callq  *0x60(%rdx)
0x100010937 <_ZN3gnu9classpath13VMStackWalker21getCallingClassLoaderEJPN4java4lang11ClassLoaderEPNS_3gcj7RawDataE+55>:	test   %rax,%rax
0x10001093a <_ZN3gnu9classpath13VMStackWalker21getCallingClassLoaderEJPN4java4lang11ClassLoaderEPNS_3gcj7RawDataE+58>:	je     0x100010950 <_ZN3gnu9classpath13VMStackWalker21getCallingClassLoaderEJPN4java4lang11ClassLoaderEPNS_3gcj7RawDataE+80>
0x10001093c <_ZN3gnu9classpath13VMStackWalker21getCallingClassLoaderEJPN4java4lang11ClassLoaderEPNS_3gcj7RawDataE+60>:	mov    0xa8(%rax),%rax

This is interesting since on x86_64-apple-darwin10, we have been failing...

FAIL: WalkerTest execution - source compiled test
FAIL: WalkerTest -findirect-dispatch execution - source compiled test
FAIL: WalkerTest -O3 execution - source compiled test
FAIL: WalkerTest -O3 -findirect-dispatch execution - source compiled test

in the libjava testsuite.
           Jack



More information about the Java mailing list