Subject:
Re: [ruby-ffi] Re: Possible issues with Ruby FFI on ARM processor (Raspberry PI)
From:
Kim Burgestrand
Date:
2/28/13 12:57 AM
To:
ruby-ffi@googlegroups.com

On Wednesday, 27 February 2013 at 23:46, Wayne Meissner wrote:
It is also possible there are bugs in libspotify itself - you could try converting your C example to use malloc() allocated memory instead of stack/global memory (i.e. emulate what FFI does), and see if it fails in the same way.
Updated the rest of the MemoryPointers (as far as I am aware). The ruby example still appears to segfault. 
 
I converted the C example to use malloc()-allocated memory, and freeing it aggressively after it’s purpose
has been fulfilled, and I’m happy to say that the C example now also segfault with similar errors (randomly).
I also removed the calls to free (no time to upload), and it appears the library still segfault.

From what I can gather from this, it appears the library has some issues with malloc()-memory, only on the
ARM platform. That is interesting. I’ll have to experiment some this evening to see if I can figure out exactly
which part of it is, and probably file a bug report with the library authors.

Thanks Wayne; the problem existing because of stack/heap memory was not something that could have
occurred to me.

— Kim

--
 
---
You received this message because you are subscribed to the Google Groups "ruby-ffi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ruby-ffi+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.