# Openssl gem segfault

**URL:** <https://www.ruby-forum.com/t/openssl-gem-segfault/193615>\
**Category:** Ruby\
**Created:** [August 20, 2010, 5:24pm UTC](https://www.ruby-forum.com/t/openssl-gem-segfault/193615 "2010-08-20T17:24:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![clemmece](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/74df32/32.png) [@clemmece](https://www.ruby-forum.com/u/clemmece)\
**Post date:** [August 20, 2010, 5:24pm UTC](https://www.ruby-forum.com/t/openssl-gem-segfault/193615/1 "2010-08-20T17:24:05Z")

</div>

I’m seeing an unusual segfault when running unit tests. Google hasn’t  
had much to say about the openssl gem. Anyone have some insight into  
this?

$\> rake test:units --trace  
(in  
/DevEnvironment/Work/ejabberd/components/user\_activity/branches/invitations)  
\*\* Invoke test:units (first\_time)  
\*\* Execute test:units  
/opt/local/bin/ruby -I"lib:test"  
“/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake\_test\_loader.rb”  
“test/unit/event\_logs\_asynchronous\_test.rb”  
“test/unit/invitation\_handler\_asynchronous\_test.rb”  
“test/unit/invitation\_handler\_test.rb”  
“test/unit/user\_activity\_jack\_asyncronous\_test.rb”  
“test/unit/user\_activity\_jack\_test.rb” “test/unit/xmpp\_util\_test.rb”  
/opt/local/lib/ruby/1.8/openssl/ssl-internal.rb:30: [BUG] Segmentation  
fault  
ruby 1.8.7 (2010-06-23 patchlevel 299) [i686-darwin10]

rake aborted!  
Command failed with status (): [/opt/local/bin/ruby -I"lib:test"  
"/opt/loc…]  
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:995:in `sh' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1010:in`call’  
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1010:in `sh' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1094:in`sh’  
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1029:in `ruby' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1094:in`ruby’  
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/testtask.rb:117:in  
`define' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1112:in`verbose’  
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/testtask.rb:102:in  
`define' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in`call’  
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in  
`execute' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in`each’  
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in  
`execute' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in`invoke\_with\_call\_chain’  
/opt/local/lib/ruby/1.8/monitor.rb:242:in `synchronize' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in`invoke\_with\_call\_chain’  
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in`invoke\_task’  
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in  
`top_level' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in`each’  
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in  
`top_level' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in`standard\_exception\_handling’  
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in  
`top_level' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in`run’  
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in  
`standard_exception_handling' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in`run’  
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31  
/opt/local/bin/rake:19:in `load’  
/opt/local/bin/rake:19

The code at the segfault in ssl-internal.rb:30  
23 DEFAULT\_PARAMS = {  
24 :ssl\_version =\> “SSLv23”,  
25 :verify\_mode =\> OpenSSL::SSL::VERIFY\_PEER,  
26 :ciphers =\>  
“ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW”,  
27 :options =\> OpenSSL::SSL::OP\_ALL,  
28 }  
29  
30 DEFAULT\_CERT\_STORE = OpenSSL::X509::Store.new  
31 DEFAULT\_CERT\_STORE.set\_default\_paths  
32 if defined?(OpenSSL::X509::V\_FLAG\_CRL\_CHECK\_ALL)  
33 DEFAULT\_CERT\_STORE.flags = OpenSSL::X509::V\_FLAG\_CRL\_CHECK\_ALL  
34 end
