From: "Iñaki Baz Castillo" Date: 2011-01-12T10:02:16+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've repeated the same test but using the Ragel HTTP parser (in > em-http-request gem) and it doesn't crash, so I expect some bug in my > C code :( 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! -- Iñaki Baz Castillo