From: "Iñaki Baz Castillo" Date: 2011-01-12T11:07:18+09:00 Subject: Re: Ruby 1.9.2-p0: segmenfault in multithreading when using a custom C extension 2011/1/12 Iñaki Baz Castillo : > I think I've found the problem! and it could be related to a bug in Ruby: > > In my SIP parser (Ruby C extension like Ragel HTTP parser) I generate > Ruby string encoded in UTF-8 using: > >  rb_enc_str_new(s, len, rb_utf8_encoding()); > > But if I change it to: > >  rb_str_new(s, len) > > then the segment fault does NEVER occur! In order to demostrate the problem I've reported the bug in Ruby tracker by providing a code that generates the segmentfault just when using rb_enc_str_new: http://redmine.ruby-lang.org/issues/show/4272 -- Iñaki Baz Castillo