From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 828 invoked by alias); 8 Jan 2012 08:58:50 -0000 Received: (qmail 820 invoked by uid 22791); 8 Jan 2012 08:58:49 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_LOW,TW_BF X-Spam-Check-By: sourceware.org Received: from mail-vx0-f169.google.com (HELO mail-vx0-f169.google.com) (209.85.220.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 08 Jan 2012 08:58:36 +0000 Received: by vcge1 with SMTP id e1so2358569vcg.0 for ; Sun, 08 Jan 2012 00:58:35 -0800 (PST) Received: by 10.220.224.194 with SMTP id ip2mr6910214vcb.41.1326013115219; Sun, 08 Jan 2012 00:58:35 -0800 (PST) MIME-Version: 1.0 Received: by 10.52.112.42 with HTTP; Sun, 8 Jan 2012 00:58:14 -0800 (PST) In-Reply-To: References: <99F0629B-EA20-4AFD-B9F2-375A59E96658@users.sf.net> From: Nathan Rajlich Date: Sun, 08 Jan 2012 08:58:00 -0000 Message-ID: Subject: Re: Bus Error while trying to run the ffi_closure example in the documentation... To: Bobby Holley Cc: Timothy Wall , libffi-discuss Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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/msg00014.txt.bz2 Omg Bobby you're a life saver! That patch did the trick. Thanks all for all the help! Consider my case solved :) On Sat, Jan 7, 2012 at 10:27 PM, Bobby Holley wrote: > This might be what you're after: > https://bugzilla.mozilla.org/show_bug.cgi?id=3D682180 > > I emailed the patch to one of the libffi lists a while back - not sure > if it ever got merged in. > > Cheers, > -bholley > > On Sat, Jan 7, 2012 at 12:52 PM, Timothy Wall wrote: >> >> I'm using ffi_closure on OSX (not lion, though) amd64 target and it perf= orms as expected for me. >> >> Have you run the testsuite? =C2=A0there are ffi_closure tests in that. >> >> On Jan 7, 2012, at 3:28 PM, Nathan Rajlich wrote: >> >> > Ok so as a little update, the test program I linked to above work on >> > my Windows XP VM and Ubuntu VMs, so it looks like this might be >> > something with either the Darwin 64-bit support, or something with my >> > configuration. If somebody else has an OS X setup and could compile >> > the example above it would be really helpful. Thanks in advance! >> > >> > On Sat, Jan 7, 2012 at 12:14 PM, Nathan Rajlich wrote: >> >> Awww nobody? Well for easier reference, here's the source code used in >> >> question: https://gist.github.com/1575877 . It's straight from the >> >> libffi docs. Hopefully with the source here somebody else can try >> >> compiling and letting me know the result. Thanks! >> >> >> >> On Fri, Jan 6, 2012 at 12:17 PM, Nathan Rajlich wrote: >> >>> Hey all, >> >>> >> >>> So I'm trying to run the ffi_closure example from the libffi >> >>> documentation (the one that wraps fputs() ). When trying to run the >> >>> program, I get a "Bus Error: 10" and the program crashes. >> >>> >> >>> This is on OS X 64-bit (Lion). Put through gdb, this is what I get: >> >>> >> >>> =E2=88=9E ~/node-ffi/deps (gyp) $ gdb --args ./out/Debug/test >> >>> GNU gdb 6.3.50-20050815 (Apple version gdb-1705) (Fri Jul =C2=A01 10= :50:06 UTC 2011) >> >>> 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 co= nditions. >> >>> Type "show copying" to see the conditions. >> >>> There is absolutely no warranty for GDB. =C2=A0Type "show warranty" = for details. >> >>> This GDB was configured as "x86_64-apple-darwin"...Reading symbols f= or >> >>> shared libraries ... done >> >>> >> >>> (gdb) run >> >>> Starting program: /Users/nrajlich/node-ffi/deps/out/Debug/test >> >>> Reading symbols for shared libraries ++......................... done >> >>> >> >>> Program received signal EXC_BAD_ACCESS, Could not access memory. >> >>> Reason: KERN_PROTECTION_FAILURE at address: 0x0000000100100a20 >> >>> 0x0000000100100a20 in ?? () >> >>> (gdb) bt >> >>> #0 =C2=A00x0000000100100a20 in ?? () >> >>> #1 =C2=A00x0000000100001424 in start () >> >>> >> >>> >> >>> Thanks for looking, any thoughts would be appreciated! Cheers! >>