From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13401 invoked by alias); 6 Jan 2012 20:18:16 -0000 Received: (qmail 13391 invoked by uid 22791); 6 Jan 2012 20:18:15 -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; Fri, 06 Jan 2012 20:18:01 +0000 Received: by vcge1 with SMTP id e1so1700538vcg.0 for ; Fri, 06 Jan 2012 12:18:00 -0800 (PST) Received: by 10.220.149.68 with SMTP id s4mr4469343vcv.43.1325881080208; Fri, 06 Jan 2012 12:18:00 -0800 (PST) MIME-Version: 1.0 Received: by 10.52.112.42 with HTTP; Fri, 6 Jan 2012 12:17:39 -0800 (PST) From: Nathan Rajlich Date: Fri, 06 Jan 2012 20:18:00 -0000 Message-ID: Subject: 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/msg00009.txt.bz2 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 1 10:50:06 UTC 2= 011) 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 condition= s. 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) 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 0x0000000100100a20 in ?? () #1 0x0000000100001424 in start () Thanks for looking, any thoughts would be appreciated! Cheers!