From: Eric Wong Date: 2014-09-25T21:26:52+00:00 Subject: [ruby-core:65274] Re: [ruby-trunk - Bug #10284] [Open] Segmentation fault on Ruby 2.1.2 and 2.1.3 moreno.carullo@gmail.com wrote: > Hi all, I often (let's say 50% of the times the test suite is run) get this segmentation fault on both mentioned versions. > Please note that the method/line where it breaks is always different! Where else is it failing besides the backtrace you gave us? Does it also fail in OpenSSL extension code or in other places? It would be hugely helpful if you could isolate this to a small test case which fails independently of your rails app. > The application is Rails 4 running on FreeBSD 10.0/amd64. > > ~~~ > ./usr/local/lib/ruby/gems/2.1.0/gems/activesupport-4.0.9/lib/active_support/message_verifier.rb:65: [BUG] Segmentation fault at 0x00000000000008 > ruby 2.1.3p242 (2014-09-19 revision 47630) [x86_64-freebsd10.0] Which compiler and version are you using? Likewise for OpenSSL. Thanks. I took a quick look at ossl_hmac_s_hexdigest and nothing really jumped out at me. I've also verified the HMAC/HMAC_Update functions actually take size_t (at least on my Debian 7.0 system) arguments where we pass RSTRING_LEN (as opposed to RSTRING_LENINT) despite the hmac(3SSL) manpage documenting those parameters as (regular) ints.