Re: [racket] Help debugging a ffi crash

2014-09-28 Thread Eric Dobson
That is almost surely it, thanks for the second pair of eyes. I had similar issues with a different type that I thought was a pointer but was actually a struct, but that one I couldn't even get a single call to work so it was much more obvious something was up. On Sun, Sep 28, 2014 at 11:08 AM, Ma

Re: [racket] Help debugging a ffi crash

2014-09-28 Thread Matthew Flatt
Looking at http://clang.llvm.org/doxygen/CXString_8h_source.html it seems that CXString as returned by clang_getCursorSpelling() is not a pointer: typedef struct { const void *data; unsigned private_flags; } CXString; If that's right, I'm a little surprised that `cursor-spelling` wor

[racket] Help debugging a ffi crash

2014-09-28 Thread Eric Dobson
I'm trying to debug an FFI crash that I'm seeing, and because it is dealing with C code the error just presents as a segfault. I believe I have tracked down what is causing the problem, but don't understand how it could be doing so. I have two racket functions which take a "cursor" (the foreign li