Bug 42307 - WalkerTest execution failures
Summary: WalkerTest execution failures
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: java (show other bugs)
Version: 4.5.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-06 01:08 UTC by Jack Howarth
Modified: 2010-02-03 03:30 UTC (History)
2 users (show)

See Also:
Host: x86_64-apple-darwin10
Target: x86_64-apple-darwin10
Build: x86_64-apple-darwin10
Known to work:
Known to fail:
Last reconfirmed:


Attachments
preprocessed source for WalkerTestmain.i created on x86_64-apple-darwin10 (164 bytes, text/plain)
2009-12-06 01:11 UTC, Jack Howarth
Details
assembly for WalkerTestmain.s created on x86_64-apple-darwin10 (1.59 KB, text/plain)
2009-12-06 01:12 UTC, Jack Howarth
Details
assembly for WalkerTest.s created on x86_64-apple-darwin10 (3.54 KB, text/plain)
2009-12-06 01:12 UTC, Jack Howarth
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jack Howarth 2009-12-06 01:08:33 UTC
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

since the initial darwin10 release. Interestingly, when one tries to load the WalkerTest.exe created with...

/sw/src/fink.build/gcc45-4.4.999-20091205/darwin_objdir/x86_64-apple-darwin10.2.0/libjava/testsuite/../libtool --silent --tag=GCJ --mode=link /sw/src/fink.build/gcc45-4.4.999-20091205/darwin_objdir/./gcc/gcj -B/sw/src/fink.build/gcc45-4.4.999-20091205/darwin_objdir/x86_64-apple-darwin10.2.0/libjava/ -B/sw/src/fink.build/gcc45-4.4.999-20091205/darwin_objdir/./gcc/ -B/sw/lib/gcc4.5/x86_64-apple-darwin10.2.0/bin/ -B/sw/lib/gcc4.5/x86_64-apple-darwin10.2.0/lib/ -isystem /sw/lib/gcc4.5/x86_64-apple-darwin10.2.0/include -isystem /sw/lib/gcc4.5/x86_64-apple-darwin10.2.0/sys-include --encoding=UTF-8 -B/sw/src/fink.build/gcc45-4.4.999-20091205/darwin_objdir/x86_64-apple-darwin10.2.0/libjava/testsuite/../ /sw/src/fink.build/gcc45-4.4.999-20091205/gcc-4.5-20091205/libjava/testsuite/libjava.lang/WalkerTest.jar -w -bind_at_load -multiply_defined suppress -Wl,-allow_stack_execute --main=WalkerTest -g -L/sw/src/fink.build/gcc45-4.4.999-20091205/darwin_objdir/x86_64-apple-darwin10.2.0/./libjava/.libs -lm -o WalkerTest.exe

into gdb, the following error is reported...

gdb ./WalkerTest.exeGNU gdb 6.3.50-20050815 (Apple version gdb-1346) (Fri Sep 18 20:40:51 UTC 2009)Copyright 2004 Free Software Foundation, Inc.GDB is free software, covered by the GNU General Public License, and you arewelcome to change it and/or distribute copies of it under certain conditions.Type "show copying" to see the conditions.There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared libraries ...... done

gdb stack crawl at point of internal error:
0   gdb-i386-apple-darwin               0x00000001001076e7 internal_vproblem + 308
1   gdb-i386-apple-darwin               0x00000001001078c1 internal_verror + 27
2   gdb-i386-apple-darwin               0x000000010010795f align_down + 0
3   gdb-i386-apple-darwin               0x00000001000b1fc4 find_partial_die_in_comp_unit + 79
4   gdb-i386-apple-darwin               0x00000001000bd97f find_partial_die + 626
5   gdb-i386-apple-darwin               0x00000001000bd9cc fixup_partial_die + 55
6   gdb-i386-apple-darwin               0x00000001000be08d scan_partial_symbols + 58
7   gdb-i386-apple-darwin               0x00000001000bef51 dwarf2_build_psymtabs + 2982
8   gdb-i386-apple-darwin               0x0000000100144af3 macho_symfile_read + 294
9   gdb-i386-apple-darwin               0x000000010004bbb8 syms_from_objfile + 1401
10  gdb-i386-apple-darwin               0x000000010004c601 symbol_file_add_with_addrs_or_offsets_using_objfile + 690
11  gdb-i386-apple-darwin               0x000000010004c5bb symbol_file_add_with_addrs_or_offsets_using_objfile + 620
12  gdb-i386-apple-darwin               0x000000010004c894 symbol_file_add_name_with_addrs_or_offsets + 117
13  gdb-i386-apple-darwin               0x000000010004cd5c symbol_file_add_main_1 + 207
14  gdb-i386-apple-darwin               0x000000010006e75d catch_command_errors + 65
/SourceCache/gdb/gdb-1346/src/gdb/dwarf2read.c:8233: internal-error: could not find partial DIE in cache

A problem internal to GDB has been detected,
further debugging may prove unreliable.
Comment 1 Jack Howarth 2009-12-06 01:11:10 UTC
Created attachment 19239 [details]
preprocessed source for WalkerTestmain.i created on x86_64-apple-darwin10
Comment 2 Jack Howarth 2009-12-06 01:12:04 UTC
Created attachment 19240 [details]
assembly for WalkerTestmain.s created on x86_64-apple-darwin10
Comment 3 Jack Howarth 2009-12-06 01:12:46 UTC
Created attachment 19241 [details]
assembly for WalkerTest.s created on x86_64-apple-darwin10
Comment 4 Jack Howarth 2009-12-06 01:33:48 UTC
This appears to be a case where the new VTA merge debug code confuses the older Apple gdb. Using current gdb cvs on x86_64-apple-darwin10, this failing testcase debugs as...

../gdb_cvs/dist/bin/gdb ./WalkerTest.exe
GNU gdb (GDB) 7.0.50.20091206-cvs
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin10.2.0".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /Users/howarth/libjava_bug/WalkerTest.exe...(no debugging symbols found)...done.
(gdb) r
Starting program: /Users/howarth/libjava_bug/WalkerTest.exe 
limit: stacksize: Can't remove limit (Invalid argument)
[New Thread 0x1503 of process 66709]

Program received signal SIGABRT, Aborted.
0x00007fff843d4fe6 in __kill () from /usr/lib/libSystem.B.dylib
(gdb) bt
#0  0x00007fff843d4fe6 in __kill () from /usr/lib/libSystem.B.dylib
#1  0x00007fff84475e32 in abort () from /usr/lib/libSystem.B.dylib
#2  0x00007fff844bffc9 in _Unwind_FindEnclosingFunction () from /usr/lib/libSystem.B.dylib
#3  0x0000000100083bfc in ?? ()
#4  0x0000000103f17f90 in ?? ()
#5  0x0000000100000dcb in _ZN3Foo3barEJPN4java4lang5ClassEv (this=0x103f17f90) at WalkerTest.java:5
#6  0x0000000100000d53 in _ZN10WalkerTest4mainEJvP6JArrayIPN4java4lang6StringEE (argv=0x103d9af30) at WalkerTest.java:13
#7  0x0000000100086cfe in ?? ()
#8  0x0000000103de6dc0 in ?? ()
#9  0x00007fff5fbff110 in ?? ()
#10 0x00007fff5fbff150 in ?? ()
#11 0x00000001000e9024 in ?? ()
#12 0x0000000103de6dc0 in ?? ()
#13 0x00007fff5fbff110 in ?? ()
#14 0x00007fff5fbff150 in ?? ()
#15 0x000000010009400a in ?? ()
#16 0x0000000000000000 in ?? ()
(gdb)  x/10i 0x0000000100000d53
   0x100000d53 <_ZN10WalkerTest4mainEJvP6JArrayIPN4java4lang6StringEE+131>:	mov    %rax,%rbx
   0x100000d56 <_ZN10WalkerTest4mainEJvP6JArrayIPN4java4lang6StringEE+134>:	mov    %r12,%rax
   0x100000d59 <_ZN10WalkerTest4mainEJvP6JArrayIPN4java4lang6StringEE+137>:	test   %rax,%rax
   0x100000d5c <_ZN10WalkerTest4mainEJvP6JArrayIPN4java4lang6StringEE+140>:	
    jne    0x100000d63 <_ZN10WalkerTest4mainEJvP6JArrayIPN4java4lang6StringEE+147>
   0x100000d5e <_ZN10WalkerTest4mainEJvP6JArrayIPN4java4lang6StringEE+142>:	callq  0x100000de0
   0x100000d63 <_ZN10WalkerTest4mainEJvP6JArrayIPN4java4lang6StringEE+147>:	mov    %rax,%rdx
   0x100000d66 <_ZN10WalkerTest4mainEJvP6JArrayIPN4java4lang6StringEE+150>:	mov    (%rdx),%rdx
   0x100000d69 <_ZN10WalkerTest4mainEJvP6JArrayIPN4java4lang6StringEE+153>:	add    $0xf0,%rdx
   0x100000d70 <_ZN10WalkerTest4mainEJvP6JArrayIPN4java4lang6StringEE+160>:	mov    (%rdx),%rdx
   0x100000d73 <_ZN10WalkerTest4mainEJvP6JArrayIPN4java4lang6StringEE+163>:	mov    %rdx,%rcx
(gdb) x/10i 0x0000000100000dcb
   0x100000dcb <_ZN3Foo3barEJPN4java4lang5ClassEv+31>:	leaveq 
   0x100000dcc <_ZN3Foo3barEJPN4java4lang5ClassEv+32>:	retq   
   0x100000dcd:	add    %bh,%bh
   0x100000dcf:	and    $0x25c,%eax
   0x100000dd4:	jmpq   *0x25e(%rip)        # 0x100001038
   0x100000dda:	jmpq   *0x260(%rip)        # 0x100001040
   0x100000de0:	jmpq   *0x262(%rip)        # 0x100001048
   0x100000de6:	jmpq   *0x264(%rip)        # 0x100001050
   0x100000dec:	jmpq   *0x266(%rip)        # 0x100001058
   0x100000df2 < stub helpers>:	lea    0x20f(%rip),%r11        # 0x100001008

Comment 5 Jack Howarth 2009-12-23 14:09:15 UTC
Proposed patch at http://gcc.gnu.org/ml/gcc-patches/2009-12/msg00998.html.
Comment 6 Jack Howarth 2010-02-03 03:30:39 UTC
Fixed for gcc 4.5 with...

Author: andreast
Date: Tue Feb  2 08:18:08 2010
New Revision: 156444

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=156444
Log:
2010-02-02  Jack Howarth  <howarth@bromo.med.uc.edu>

	PR java/41991
	* unwind-dw2-fde-darwin.c: Re-export _Unwind_FindEnclosingFunction()
	as _darwin10_Unwind_FindEnclosingFunction().
	* libgcc-libsystem.ver: New.

Added:
    trunk/gcc/libgcc-libsystem.ver
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/unwind-dw2-fde-darwin.c

Author: andreast
Date: Tue Feb  2 08:18:48 2010
New Revision: 156445

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=156445
Log:
2010-02-02  Jack Howarth  <howarth@bromo.med.uc.edu>

	PR java/41991
	* config/t-slibgcc-darwin: Add libgcc-libsystem.ver to
	SHLIB_MAPFILES.

Modified:
    trunk/libgcc/ChangeLog
    trunk/libgcc/config/t-slibgcc-darwin

Author: andreast
Date: Tue Feb  2 08:19:26 2010
New Revision: 156446

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=156446
Log:
2010-02-02  Jack Howarth  <howarth@bromo.med.uc.edu>

	PR java/41991
	* include/posix.h: Redefine _Unwind_FindEnclosingFunction.

Modified:
    trunk/libjava/ChangeLog
    trunk/libjava/include/posix.h