[MacRuby] #1151: Segfault occurs with OpenSSL::Cipher when redefined the initialize().

MacRuby ruby-noreply at macosforge.org
Sun Feb 6 00:14:04 PST 2011


#1151: Segfault occurs with OpenSSL::Cipher when redefined the initialize().
----------------------------------+-----------------------------------------
 Reporter:  watson1978@…          |       Owner:  lsansonetti@…        
     Type:  defect                |      Status:  new                  
 Priority:  blocker               |   Milestone:                       
Component:  MacRuby               |    Keywords:                       
----------------------------------+-----------------------------------------
 Likely CRuby 1.9.2, this problem occurs in MacRuby.[[BR]]
 http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/35079

 Test Script:
 {{{
 #!ruby
 require 'openssl'
 module OpenSSL
   class Cipher
     def initialize; end
   end
 end
 ossl = OpenSSL::Cipher.new
 ossl.block_size
 }}}

 BackTrace:
 {{{
 Program received signal EXC_BAD_ACCESS, Could not access memory.
 Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000004
 0x00007fff8422aae4 in EVP_CIPHER_block_size ()
 (gdb) bt
 #0  0x00007fff8422aae4 in EVP_CIPHER_block_size ()
 #1  0x00000001033a959c in ossl_cipher_block_size (self=8590019488,
 sel=<value temporarily unavailable, due to optimizations>) at
 ossl_cipher.c:494
 #2  0x000000010013b60c in __rb_vm_rcall [inlined] () at /Users/watson/src
 /macruby-trunk-svn/dispatcher.cpp:159
 #3  0x000000010013b60c in ruby_dispatch [inlined] () at /Users/watson/src
 /macruby-trunk-svn/dispatcher.cpp:466
 #4  0x000000010013b60c in rb_vm_dispatch () at dispatcher.cpp:850
 #5  0x00000001033008d6 in ?? ()
 #6  0x000000010330015f in ?? ()
 #7  0x0000000100155a2f in rb_vm_run (fname=0x2000502a0
 "/Users/watson/tmp/test.rb", node=0x20005b440, binding=0x0,
 inside_eval=false) at vm.cpp:3930
 #8  0x000000010003905b in ruby_run_node (n=0x20005b440) at eval.c:211
 #9  0x0000000100000c15 in main (argc=3, argv=0x100e1de40,
 envp=0x7fff5fbfee60) at main.cpp:40
 }}}

-- 
Ticket URL: <http://www.macruby.org/trac/ticket/1151>
MacRuby <http://macruby.org/>



More information about the macruby-tickets mailing list