[cffi-devel] Weird segfaults interfacing with libsane

Luís Oliveira luismbo at gmail.com
Thu May 22 04:27:22 UTC 2008


On Thu, May 22, 2008 at 12:01 AM, Rupert Swarbrick
<rswarbrick at googlemail.com> wrote:
> I realise that that's not the sort of question for the cffi list,
> _but_ I wrote a trivial C program that I think should be equivalent
> and it doesn't die. I can't work out *how* libsane can work in one
> case and not the other (!) so I was wondering if anyone could make any
> suggestions. I'm attaching the two source files here.

The only difference I could spot between the C and Lisp programs is
that version should be an :int, not a :pointer. (But that doesn't
matter on 32-bit linux since they're the same size there.) In any
case, it seems to work for me on Linux/amd64.

Have you tried running the program in other Lisps? CLISP and/or CMUCL,
for instance.

-- 
Luís Oliveira
http://student.dei.uc.pt/~lmoliv/



More information about the cffi-devel mailing list