This is the mail archive of the libffi-discuss@sourceware.org mailing list for the libffi project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Bus Error while trying to run the ffi_closure example in the documentation...


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 <nathan@tootallnate.net> 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:
>
> â ~/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 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 conditions.
> 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!


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]