From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32313 invoked by alias); 7 Jan 2012 20:14:55 -0000 Received: (qmail 32302 invoked by uid 22791); 7 Jan 2012 20:14:53 -0000 X-SWARE-Spam-Status: No, hits=-1.6 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; Sat, 07 Jan 2012 20:14:37 +0000 Received: by vcge1 with SMTP id e1so2196850vcg.0 for ; Sat, 07 Jan 2012 12:14:36 -0800 (PST) Received: by 10.220.226.1 with SMTP id iu1mr6136790vcb.71.1325967276322; Sat, 07 Jan 2012 12:14:36 -0800 (PST) MIME-Version: 1.0 Received: by 10.52.112.42 with HTTP; Sat, 7 Jan 2012 12:14:16 -0800 (PST) In-Reply-To: References: From: Nathan Rajlich Date: Sat, 07 Jan 2012 20:14:00 -0000 Message-ID: Subject: Re: Bus Error while trying to run the ffi_closure example in the documentation... To: 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/msg00010.txt.bz2 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 wr= ote: > 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:0= 6 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 conditi= ons. > Type "show copying" to see the conditions. > There is absolutely no warranty for GDB. =C2=A0Type "show warranty" for d= etails. > This GDB was configured as "x86_64-apple-darwin"...Reading symbols for > 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!