From: Hiroshi Nakamura Date: 2011-06-26T23:57:03+09:00 Subject: [ruby-dev:43952] [Ruby 1.9 - Bug #4445] ext/openssl の verify_callback が rb_protect で保護されていない Issue #4445 has been updated by Hiroshi Nakamura. Assignee changed from Hiroshi Nakamura to Martin Bosslet Martin, can you handle this? Original reporter said that verify_cb does not use rb_protect to invoke a callback so an error raised from the callback passed directly to Ruby interpreter. Proposed patch looks good but we should check the rational of the current code (svn blame & svn log) and do some test around this. ---------------------------------------- Bug #4445: ext/openssl の verify_callback が rb_protect で保護されていない http://redmine.ruby-lang.org/issues/4445 Author: Ippei Obayashi Status: Assigned Priority: Normal Assignee: Martin Bosslet Category: ext Target version: 1.9.3 ruby -v: ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-linux] =begin openssl では 証明書の検証に付加的な機能を付けるための callback を設定できます。これをrubyから利用できるようになっていますが rb_protect を使っていないため、openssl ライブラリ内部を飛び越えて 例外が飛ぶようになってしまう状態です。 現在ではSEGVが発生する等の問題は見つかってはいませんがメモリリークなど 起きている可能性が高いです。 とりあえず大域脱出を止めるパッチを添付します。例外を適当な場所で再送するべきかもしれませんが それはしていません。 =end -- http://redmine.ruby-lang.org