sirupsen/sysvmq

segfault when sending non-string messages

alexdean opened this issue · 3 comments

on OSX 10.9, MRI ruby 2.1.2

require 'sysvmq'
mq = SysVMQ.new(0xDEADC0DE, 1024, SysVMQ::IPC_CREAT | 0666)
mq.send 1

=> segfault

Also occurs with mq.send :symbol, but not with mq.send Time.now. (Though in that case the enqueued message ends up being an empty string).

if messages are required to be strings, it would be helpful for the gem to raise an exception when client supplies a non-string message.

backtraces (on OSX and Debian) moved to a gist to keep the issue report a little less cluttered.

https://gist.github.com/alexdean/3b9c3f70d9964e170c20

@alexdean thanks for your bug report!

I've addressed this in #11.

https://rubygems.org/gems/sysvmq 0.2.2 released with the fix.