From: Hidetoshi NAGAI Date: 2008-08-03T02:38:00+09:00 Subject: [ruby-dev:35741] (ruby1.9) "irb -r tk" causes SEGV, but "irb -r tcltklib -r tk" doesn't 永井@知能.九工大です. 報告のみですみませんが,標題のように ruby 1.9 の irb で SEGV します. 下記のログのように,irb のプロンプトから "require 'tk'" を 実行した場合には SEGV しません. コマンドライン引数で "-r tk" を付けて読み込むようにすると SEGV します. ですが,コマンドライン引数を "-r tcltklib -r tk" というようにして, tk.rb の先頭で require している tcltklib.so を 先に読み込んでおくようにすると問題なく動きます. ======================================================================= $ ruby19 --version ruby 1.9.0 (2008-08-02 revision 0) [i686-linux] $ irb19 irb(main):001:0> require 'tk' => true irb(main):002:0> exit $ irb19 -r tcltklib -r tk irb(main):001:0> exit $ irb19 -r tk /usr/local/lib/ruby/1.9.0/tk/event.rb:451: [BUG] Segmentation fault ruby 1.9.0 (2008-08-02 revision 0) [i686-linux] -- control frame ---------- c:0018 p:---- s:0056 b:0056 l:000055 d:000055 CFUNC :_define_attribute_aliases c:0017 p:2046 s:0052 b:0052 l:002110 d:002110 CLASS /usr/local/lib/ruby/1.9.0/tk/event.rb:451 c:0016 p:0015 s:0049 b:0049 l:000048 d:000048 CLASS /usr/local/lib/ruby/1.9.0/tk/event.rb:16 c:0015 p:0035 s:0047 b:0047 l:000046 d:000046 TOP /usr/local/lib/ruby/1.9.0/tk/event.rb:15 c:0014 p:---- s:0045 b:0045 l:000044 d:000044 FINISH :set_encoding c:0013 p:0006 s:0043 b:0042 l:000041 d:000041 CLASS /usr/local/lib/ruby/1.9.0/tk.rb:913 c:0012 p:0063 s:0040 b:0040 l:000039 d:000039 TOP /usr/local/lib/ruby/1.9.0/tk.rb:912 c:0011 p:---- s:0031 b:0031 l:000030 d:000030 FINISH :set_encoding c:0010 p:---- s:0029 b:0029 l:000028 d:000028 CFUNC :require c:0009 p:0017 s:0025 b:0025 l:000018 d:000024 BLOCK /usr/local/lib/ruby/1.9.0/irb/init.rb:249 c:0008 p:---- s:0024 b:0024 l:000023 d:000023 FINISH :=== c:0007 p:---- s:0022 b:0022 l:000021 d:000021 CFUNC :each c:0006 p:0011 s:0019 b:0019 l:000018 d:000018 METHOD /usr/local/lib/ruby/1.9.0/irb/init.rb:247 c:0005 p:0071 s:0015 b:0015 l:000014 d:000014 METHOD /usr/local/lib/ruby/1.9.0/irb/init.rb:20 c:0004 p:0041 s:0011 b:0011 l:000010 d:000010 METHOD /usr/local/lib/ruby/1.9.0/irb.rb:53 c:0003 p:0033 s:0006 b:0006 l:000005 d:000005 TOP /usr/local/bin/irb19:12 c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH :private_class_method c:0001 p:0000 s:0002 b:0002 l:000001 d:000001 TOP :17 --------------------------- DBG> : "/usr/local/lib/ruby/1.9.0/tk/event.rb:451:in `_define_attribute_aliases'" DBG> : "/usr/local/lib/ruby/1.9.0/tk/event.rb:451:in `'" DBG> : "/usr/local/lib/ruby/1.9.0/tk/event.rb:16:in `'" DBG> : "/usr/local/lib/ruby/1.9.0/tk/event.rb:15:in `'" DBG> : "/usr/local/lib/ruby/1.9.0/tk.rb:913:in `'" DBG> : "/usr/local/lib/ruby/1.9.0/tk.rb:912:in `'" DBG> : "/usr/local/lib/ruby/1.9.0/irb/init.rb:249:in `require'" DBG> : "/usr/local/lib/ruby/1.9.0/irb/init.rb:249:in `block in load_modules'" DBG> : "/usr/local/lib/ruby/1.9.0/irb/init.rb:247:in `each'" DBG> : "/usr/local/lib/ruby/1.9.0/irb/init.rb:247:in `load_modules'" DBG> : "/usr/local/lib/ruby/1.9.0/irb/init.rb:20:in `setup'" DBG> : "/usr/local/lib/ruby/1.9.0/irb.rb:53:in `start'" DBG> : "/usr/local/bin/irb19:12:in `
'" -- backtrace of native function call (Use addr2line) -- 0x80e01b3 0x810079a 0x81007c6 0x80b2f85 0xb7f3502d 0xffffe440 0x80d5143 0x80d518b 0x80dee28 0x80d6905 0xb7a1ee32 0x80df3b7 0x80df509 0x80ddc5a 0x80d97ad 0x80dc7e8 0x80dcb52 0x810307b 0x81038eb 0x80d052b 0x80d05b9 0x80de3e0 0x80dc0c0 0x80dc7e8 0x80dcb52 0x810307b 0x81038eb 0x80df3b7 0x80df509 0x80ddc5a 0x80d97ad 0x80dc7e8 0x80d8714 0x80d6b6a 0x80e8d57 0x80df3b7 0x80df509 0x80ddc5a 0x80d97ad 0x80dc7e8 0x80dcb52 0x805a0ed 0x805a151 0x8058dc6 0xb7d9ec1f 0x8058ce9 ------------------------------------------------------- アボートしました ======================================================================= -- 永井 秀利 (nagai@ai.kyutech.ac.jp) 九州工業大学 大学院情報工学研究院 知能情報工学研究系