RE: -mmacosx-version-min=10.6 behavior with additional libgcc_s.1.dylib's
RE: -mmacosx-version-min=10.6 behavior with additional libgcc_s.1.dylib's
- Subject: RE: -mmacosx-version-min=10.6 behavior with additional libgcc_s.1.dylib's
- From: Jack Howarth <email@hidden>
- Date: Fri, 4 Feb 2011 10:28:32 -0500
Nick,
Appended is a very simple test case that I found for PR47558 that demonstrates
the problem and the proposed fix.
Jack
The following works as a testcase for PR47558
test_main.c
--------------------------
void main (void)
{
extern int unwindcall(void);
int i;
i=unwindcall();
}
--------------------------
test_call.c
---------------------------
int unwindcall (void)
{
static __thread i;
i+i;
_Unwind_Resume ((void *)0);
return i;
}
----------------------------
./dist/bin/gcc -dynamiclib -o libtestcall.dylib -flat_namespace -undefined
suppress -single_module test_call.c
./dist/bin/gcc -o PR47558.exe test_main.c ./libtestcall.dylib
otool -L PR47558.exe
PR47558.exe:
libtestcall.dylib (compatibility version 0.0.0, current version 0.0.0)
/Users/howarth/dist/lib/libgcc_s.1.dylib (compatibility version 1.0.0,
current version 1.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version
125.2.1)
./PR47558.exe
Abort
gdb ./PR47558.exe
GNU gdb 6.3.50-20050815 (Apple version gdb-1510) (Wed Sep 22 02:45:02 UTC 2010)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome 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) r
Starting program: /Users/howarth/PR47558.exe
Reading symbols for shared libraries +++. done
Program received signal SIGABRT, Aborted.
0x00007fff87c05616 in __kill ()
(gdb) bt
#0 0x00007fff87c05616 in __kill ()
#1 0x00007fff87ca5cca in abort ()
#2 0x00000001000147a6 in uw_init_context_1 (context=0x7fff5fbfe5d0,
outer_cfa=0x7fff5fbfe800, outer_ra=0x100003f75) at
../../../gcc/libgcc/../gcc/unwind-dw2.c:1265
(gdb)
For the testcase in Comment 56 using my proposed patch from Comment 45...
gcc-4 -dynamiclib -o libtestcall.dylib -flat_namespace -undefined suppress
-single_module test_call.c
gcc-4 -o PR47558.exe test_main.c ./libtestcall.dylib
otool -L ./PR47558.exe
./PR47558.exe:
libtestcall.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version
125.2.10)
/sw/lib/gcc4.6/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current
version 1.0.0)
gdb ./PR47558.exe
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000010
0x00007fff839d3c35 in _Unwind_Resume ()
(gdb) bt
#0 0x00007fff839d3c35 in _Unwind_Resume ()
#1 0x0000000100003f75 in unwindcall ()
#2 0x0000000100000f7b in main ()
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden