Subject:
[ruby-ffi] Re: Segfault problem somewhere between ruby-ffi and bound lib
From:
Wayne Meissner
Date:
7/5/12 11:10 PM
To:
ruby-ffi@googlegroups.com


Could you provide a minimal reproducible test case?

i.e. the minimum function/struct mappings you need, plus the smallest amount of code required to reproduce.

Without any of that, its a tad impossible to say why its crashing for you.

On Saturday, June 30, 2012 1:35:23 AM UTC+10, Alex Peuchert wrote:
Hi ruby-ffi group

I try to access the OPSEC library developed by CheckPoint. The library itself provides an async interface with its own event dispatch loop; results and data are delivered to callback functions.
The problem is that I get a segfault while receiving data back from the other side. This happens inside the event loop of the library, so there is no ruby statement executed right before that. I enabled some library debugging statements and put the output into a GIST: https://gist.github.com/3018584

I additionally tried to do the same steps with a pure C program and this works without problems. So I expect the problem to lie somewhere between that OPSEC lib and ruby-ffi.

Now, the question is: How can I trace down where the problem is? I absolutely have no experience in finding segfaults.

Thanks in advance for your help, Alex