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: closure api problems


On Fri, Nov 13, 2009 at 10:14 AM, Aaron Patterson
<aaron@tenderlovemaking.com> wrote:
>
> Hi everyone,
>
> I'm doing my best to get a simple example using the closure API working.
> I think I'm missing something simple, but I'm not sure what it is!
>
> I've installed libffi from master (on github) to my home directory and
> compiled and linked the cls_uchar.c example against that, and I always
> end up with a Bus Error.
>
> Here is the output from my shell:
>
> ? ?$ pwd
> ? ?/Users/apatterson/git/libffi
> ? ?$ git status
> ? ?# On branch master
> ? ?nothing to commit (working directory clean)
> ? ?$ gcc -o foo \
> ? ?-I/Users/apatterson/lib/libffi-3.0.9rc1/include/ -I. \
> ? ?-L/Users/apatterson/lib testsuite/libffi.call/cls_uchar.c -lffi
> ? ?$ ./foo
> ? ?Bus error
> ? ?$
>
> Here is the (unfortunately not too helpful) gdb stack trace:
>
> ? ?(gdb) run
> ? ?Starting program: /Users/apatterson/git/libffi/foo
> ? ?Reading symbols for shared libraries ++. done
>
> ? ?Program received signal EXC_BAD_ACCESS, Could not access memory.
> ? ?Reason: KERN_PROTECTION_FAILURE at address: 0x0000000100100080
> ? ?0x0000000100100080 in ?? ()
> ? ?(gdb) bt
> ? ?#0 ?0x0000000100100080 in ?? ()
> ? ?#1 ?0x0000000100000da4 in start ()
> ? ?(gdb)
>
> I'm running 64bit OS X (Snow Leopard). ?Any help would be greatly
> appreciated!

I've tested on 64bit and 32bit linux.? It works in both those places
and seems to be isolated to 64bit OS X.

How can I run the test suite?  "make test" doesn't seem to work.  What
can I provide to help debug this problem?

Thanks!

--
Aaron Patterson
http://tenderlovemaking.com/


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