From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25288 invoked by alias); 30 Oct 2012 18:19:00 -0000 Received: (qmail 25164 invoked by uid 22791); 30 Oct 2012 18:18:58 -0000 X-SWARE-Spam-Status: No, hits=-3.2 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,TW_BF X-Spam-Check-By: sourceware.org Received: from mail-ee0-f41.google.com (HELO mail-ee0-f41.google.com) (74.125.83.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 30 Oct 2012 18:18:53 +0000 Received: by mail-ee0-f41.google.com with SMTP id c4so401414eek.0 for ; Tue, 30 Oct 2012 11:18:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-originating-ip:in-reply-to:references:date :message-id:subject:from:to:cc:content-type:x-gm-message-state; bh=PDOS5E8xIHVdSVSCbtNAaAtfmd8M/BdC5mZ2pBoRwUU=; b=LqaVhtsJ4D6nfmEimm/YEUp5sYhd4nl1Q2uUfjZtntjA1fPa+2jng5JlE7CemQoUhH xHYTdcaf+jNYpDbnBaxuIjSCEnMc3CFYUOKBvvoPKlG6RVr1ANrZOCw7lb+5Lyz2IpRb RfKu7w4DFeehUYBP+tEykd+mSf98kFdAwwNazXlNTGD2bkL634sOLZ8pTZhdaAKJDrxh FN6Pl9UOC27y4AhgszC4gHCYS9SBNto5BFCXRTScHWJrwSJVduOwGe/b4JTe4xA7uQAm 3hNjM01SghEE66PCURTElAHjBIOt48hr0Qll/NfYW+xb7Y6AB9J0MUm/UhGbk97fxM02 bkCw== MIME-Version: 1.0 Received: by 10.14.203.65 with SMTP id e41mr76446790eeo.34.1351621132068; Tue, 30 Oct 2012 11:18:52 -0700 (PDT) Received: by 10.223.88.27 with HTTP; Tue, 30 Oct 2012 11:18:51 -0700 (PDT) In-Reply-To: References: <502A634B.8070307@redhat.com> Date: Tue, 30 Oct 2012 18:19:00 -0000 Message-ID: Subject: Re: "closures" not working on OS X 10.8 (Mountain Lion)? From: Anthony Green To: Nathan Rajlich Cc: libffi-discuss Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQmY3kzFsBaHSN12J9cJInSAn/uw53vcb+jKjj9VXspvygSpWKtBcNH4x9qsHAGatpJUagr2 X-IsSubscribed: yes Mailing-List: contact libffi-discuss-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libffi-discuss-owner@sourceware.org X-SW-Source: 2012/txt/msg00265.txt.bz2 The FFI_MMAP_EXEC_WRIT issue should be resolved for Mountain Lion now, although I don't have access to any Apple systems to test with. Thanks! Anthony Green On Sun, Sep 16, 2012 at 5:09 PM, Nathan Rajlich wrote: > So it looks like there's a problem with the ./configure script on > Mountain Lion now, such that it doesn't properly define > FFI_MMAP_EXEC_WRIT. > > It seems that 236c9391321f83ad40daf03f40c35c9ebc1da6b3 is inadequate, > and once I applied the Mozilla patch that Bobby linked to above then > things worked as expected: > https://github.com/rbranson/node-ffi/commit/c1c5ad02a0e03d1727824d9d6f99a9ff6f976be1 > > Just thought I'd let you know of my findings, cheers! > > On Wed, Sep 12, 2012 at 5:50 PM, Nathan Rajlich wrote: >> So does anybody else have any suggestions for diagnosing this? Things >> work fine on Leopard, Snow Leopard, and Lion, just not Mountain Lion. >> I'm stumped as for a way to make any progress here. >> >> On Tue, Aug 14, 2012 at 10:23 PM, Nathan Rajlich wrote: >>> Bobby, I believe that that patch has indeed been merged upstream in >>> https://github.com/atgreen/libffi/commit/236c9391321f83ad40daf03f40c35c9ebc1da6b3. >>> So I guess it's not that. >>> >>> Reini, that sounded like a good idea to me but it doesn't seem to >>> change anything for me. This is what I did: >>> >>> $ cd libffi # still the v3.0.11 tag >>> $ CFLAGS="-Xlinker -no_pie" CXXFLAGS="-Xlinker -no_pie" >>> LDFLAGS="-no_pie" ./configure --enable-static --disable-shared >>> --disable-builddir --with-pic >>> $ CFLAGS="-Xlinker -no_pie" CXXFLAGS="-Xlinker -no_pie" LDFLAGS="-no_pie" make >>> $ gcc -o closure-test closure.c .libs/libffi.a -Iinclude -Xlinker -no_pie >>> $ ./closure-test >>> Bus error: 10 >>> >>> Andrew, well shucks :) >>> >>> Anybody else have any ideas? >>> >>> On Tue, Aug 14, 2012 at 8:18 AM, Reini Urban wrote: >>>> On Tue, Aug 14, 2012 at 9:40 AM, Andrew Haley wrote: >>>>> On 08/13/2012 07:28 PM, Nathan Rajlich wrote: >>>>>> It seems to me that closures are no longer working on OS X v10.8 >>>>>> (a.k.a. Mountain Lion). I first noticed this when the node-ffi test >>>>>> suite started failing with a "Bus Error", so just now I ran a simple >>>>>> closure example from the internet and encounter the same error when I >>>>>> try to run that. Note that this is using the libffi v3.0.11 tag. My >>>>>> test case and shell session are outlined in this gist here: >>>>>> https://gist.github.com/3342783. >>>>>> >>>>>> I don't personally know what's going on here, but am hoping somebody >>>>>> on this list will. I can provide any more additional information >>>>>> necessary. Cheers and thanks in advance! >>>>> >>>>> This is probably because of heap execute protection. Unfortunately I >>>>> don't know how it works on OS X: you need an Apple export. >>>> >>>> --no_pie is needed. >>>> >>>> See also http://code.google.com/p/address-sanitizer/issues/detail?id=29 >>>> how to disable ASLR with various MacOSX versions: >>>> e.g. export DYLD_NO_PIE=1 on 10.6 >>>> link with --no_pie since 10.7 >>>> -- >>>> Reini Urban >>>> http://cpanel.net/ http://www.perl-compiler.org/