Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion -mmacosx-version-min=10.6 behavior with additional libgcc_s.1.dylib's

Received: by 10.142.139.18 with SMTP id m18mr869447wfd.64.1296833319987;
        Fri, 04 Feb 2011 07:28:39 -0800 (PST)
X-BeenThere: darwin-dev@googlegroups.com
Received: by 10.142.53.8 with SMTP id b8ls736400wfa.3.p; Fri, 04 Feb 2011
 07:28:39 -0800 (PST)
Received: by 10.142.12.16 with SMTP id 16mr2401270wfl.5.1296833319758;
        Fri, 04 Feb 2011 07:28:39 -0800 (PST)
Received: by 10.142.12.16 with SMTP id 16mr2401269wfl.5.1296833319729;
        Fri, 04 Feb 2011 07:28:39 -0800 (PST)
Return-Path: <darwin-dev-bounces+darwin-dev-garchive-73044=googlegroups....@lists.apple.com>
Received: from bz1.apple.com (bz.apple.com [17.254.13.36])
        by gmr-mx.google.com with ESMTPS id f13si930544wfo.4.2011.02.04.07.28.39
        (version=TLSv1/SSLv3 cipher=RC4-MD5);
        Fri, 04 Feb 2011 07:28:39 -0800 (PST)
Received-SPF: pass (google.com: manual fallback record for domain of darwin-dev-bounces+darwin-dev-garchive-73044=googlegroups....@lists.apple.com designates 17.254.13.36 as permitted sender) client-ip=17.254.13.36;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: manual fallback record for domain of darwin-dev-bounces+darwin-dev-garchive-73044=googlegroups....@lists.apple.com designates 17.254.13.36 as permitted sender) smtp.mail=darwin-dev-bounces+darwin-dev-garchive-73044=googlegroups....@lists.apple.com
Received: from lists.apple.com (unknown [17.128.113.151])
	by bz1.apple.com (Postfix) with ESMTP id 20EA3205540E5
	for <darwin-dev-garchive-73044@googlegroups.com>; Fri,  4 Feb 2011 07:28:39 -0800 (PST)
Received: from master.lists.apple.com (localhost [127.0.0.1])
	by lists.apple.com (Postfix) with ESMTP id 134962E2105BD
	for <darwin-dev-garchive-73044@googlegroups.com>; Fri,  4 Feb 2011 07:28:39 -0800 (PST)
X-Original-To: darwin-...@lists.apple.com
Delivered-To: darwin-...@lists.apple.com
Received: from relay1.apple.com (relay1.apple.com [17.128.113.31])
	by lists.apple.com (Postfix) with ESMTP id 57C2A2E210586;
	Fri,  4 Feb 2011 07:28:36 -0800 (PST)
Received: from mail-in12.apple.com (mail-in.apple.com [17.254.13.10])
	by relay1.apple.com (Postfix) with ESMTP id 4741A10B6E993;
	Fri,  4 Feb 2011 07:28:36 -0800 (PST)
X-AuditID: 11fe0d0a-b7cc0ae000005d4e-bb-4d4c1b2188bd
Received: from bromo.med.uc.edu (bromo.med.uc.edu [129.137.3.146])
	by mail-in12.apple.com (Apple Secure Mail Relay) with SMTP id
	84.56.23886.22B1C4D4; Fri,  4 Feb 2011 07:28:36 -0800 (PST)
Received: from bromo.med.uc.edu (localhost.localdomain [127.0.0.1])
	by bromo.med.uc.edu (Postfix) with ESMTP id F1AADB2DE3;
	Fri,  4 Feb 2011 10:28:32 -0500 (EST)
Received: (from howarth@localhost)
	by bromo.med.uc.edu (8.14.3/8.14.3/Submit) id p14FSW24028015;
	Fri, 4 Feb 2011 10:28:32 -0500
Date: Fri, 4 Feb 2011 10:28:32 -0500
From: Jack Howarth <howa...@bromo.med.uc.edu>
To: xcode-us...@lists.apple.com, darwin-...@lists.apple.com,
	kled...@apple.com
Message-ID: <20110204152832.GA27...@bromo.med.uc.edu>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.5.18 (2008-05-17)
X-Brightmail-Tracker: AAAAAA==
Cc: ia...@gcc.gnu.org, mikest...@comcast.net
Subject: RE: -mmacosx-version-min=10.6 behavior with additional
	libgcc_s.1.dylib's
X-BeenThere: darwin-...@lists.apple.com
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "Technical discussion list for general Darwin software development.
	This does not include Carbon, Cocoa,
	or Darwin Streaming Server." <darwin-dev.lists.apple.com>
List-Unsubscribe: <http://lists.apple.com/mailman/listinfo/darwin-dev>,
	<mailto:darwin-dev-requ...@lists.apple.com?subject=unsubscribe>
List-Post: <mailto:darwin-...@lists.apple.com>
List-Help: <mailto:darwin-dev-requ...@lists.apple.com?subject=help>
List-Subscribe: <http://lists.apple.com/mailman/listinfo/darwin-dev>,
	<mailto:darwin-dev-requ...@lists.apple.com?subject=subscribe>
Sender: darwin-dev-bounces+darwin-dev-garchive-73044=googlegroups....@lists.apple.com
Errors-To: darwin-dev-bounces+darwin-dev-garchive-73044=googlegroups....@lists.apple.com

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      (Darwin-...@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-dev/darwin-dev-garchive-73044%40googlegroups.com

This email sent to darwin-dev-garchive-73044@googlegroups.com