From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10152 invoked by alias); 14 Aug 2012 15:19:17 -0000 Received: (qmail 10142 invoked by uid 22791); 14 Aug 2012 15:19:16 -0000 X-SWARE-Spam-Status: No, hits=-5.4 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,TW_BF X-Spam-Check-By: sourceware.org Received: from mail-lb0-f169.google.com (HELO mail-lb0-f169.google.com) (209.85.217.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 14 Aug 2012 15:19:01 +0000 Received: by lbon3 with SMTP id n3so346490lbo.0 for ; Tue, 14 Aug 2012 08:18:59 -0700 (PDT) MIME-Version: 1.0 Received: by 10.152.125.116 with SMTP id mp20mr12678645lab.19.1344957539430; Tue, 14 Aug 2012 08:18:59 -0700 (PDT) Received: by 10.112.117.232 with HTTP; Tue, 14 Aug 2012 08:18:59 -0700 (PDT) In-Reply-To: <502A634B.8070307@redhat.com> References: <502A634B.8070307@redhat.com> Date: Tue, 14 Aug 2012 15:19:00 -0000 Message-ID: Subject: Re: "closures" not working on OS X 10.8 (Mountain Lion)? From: Reini Urban To: Andrew Haley Cc: Nathan Rajlich , libffi-discuss Content-Type: text/plain; charset=ISO-8859-1 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/msg00231.txt.bz2 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/