From: Tomoyuki Chikanaga Date: 2011-01-25T23:18:04+09:00 Subject: [ruby-dev:43108] [Ruby 1.9-Bug#4322][Open] valgrind report error for uncaught throw Bug #4322: valgrind report error for uncaught throw http://redmine.ruby-lang.org/issues/show/4322 起票者: Tomoyuki Chikanaga ステータス: Open, 優先度: Normal カテゴリ: core ruby -v: ruby 1.9.3dev (2011-01-25 trunk 30653) [i686-linux] 以下のようなスクリプトを valgrind を使って実行するとエラーが報告されます。 ## script GC.stress = true throw :tag ## message ==1141== Conditional jump or move depends on uninitialised value(s) ==1141== at 0x40276EB: strlen (mc_replace_strmem.c:242) ==1141== by 0x81031DB: BSD_vfprintf (vsnprintf.c:961) ==1141== by 0x81070C4: rb_vsprintf (sprintf.c:1175) ==1141== by 0x81B6628: rb_raise (error.c:1524) ==1141== by 0x8160964: rb_f_throw (vm_eval.c:1441) ==1141== by 0x815D0EC: call_cfunc (vm_insnhelper.c:316) ==1141== by 0x8162468: vm_call_method (vm_insnhelper.c:403) ==1141== by 0x8163C5B: vm_exec_core (insns.def:1010) ==1141== by 0x816947B: vm_exec (vm.c:1150) ==1141== by 0x81697D9: rb_iseq_eval_main (vm.c:1391) ==1141== by 0x805B861: ruby_exec_internal (eval.c:225) ==1141== by 0x805D331: ruby_run_node (eval.c:272) ==1141== ==1141== Conditional jump or move depends on uninitialised value(s) ==1141== at 0x40276F7: strlen (mc_replace_strmem.c:242) ==1141== by 0x81031DB: BSD_vfprintf (vsnprintf.c:961) ==1141== by 0x81070C4: rb_vsprintf (sprintf.c:1175) ==1141== by 0x81B6628: rb_raise (error.c:1524) ==1141== by 0x8160964: rb_f_throw (vm_eval.c:1441) ==1141== by 0x815D0EC: call_cfunc (vm_insnhelper.c:316) ==1141== by 0x8162468: vm_call_method (vm_insnhelper.c:403) ==1141== by 0x8163C5B: vm_exec_core (insns.def:1010) ==1141== by 0x816947B: vm_exec (vm.c:1150) ==1141== by 0x81697D9: rb_iseq_eval_main (vm.c:1391) ==1141== by 0x805B861: ruby_exec_internal (eval.c:225) ==1141== by 0x805D331: ruby_run_node (eval.c:272) test.rb:2:in `throw'==1141== ==1141== Conditional jump or move depends on uninitialised value(s) ==1141== at 0x4027B28: memchr (mc_replace_strmem.c:354) ==1141== by 0x805C2E9: error_print (eval_error.c:144) ==1141== by 0x805CA9A: error_handle (eval_error.c:270) ==1141== by 0x805D05B: ruby_cleanup (eval.c:163) ==1141== by 0x805D339: ruby_run_node (eval.c:265) ==1141== by 0x805AC2F: main (main.c:38) : ==1141== ==1141== Syscall param write(buf) points to uninitialised byte(s) ==1141== at 0x40007F2: (within /lib/ld-2.9.so) ==1141== by 0x4125C95: _IO_file_xsputn (in /lib/tls/i686/cmov/libc-2.9.so) ==1141== by 0x411B6E9: fwrite (in /lib/tls/i686/cmov/libc-2.9.so) ==1141== by 0x8073A4A: rb_write_error2 (io.c:6324) ==1141== by 0x805C314: error_print (eval_error.c:149) ==1141== by 0x805CA9A: error_handle (eval_error.c:270) ==1141== by 0x805D05B: ruby_cleanup (eval.c:163) ==1141== by 0x805D339: ruby_run_node (eval.c:265) ==1141== by 0x805AC2F: main (main.c:38) ==1141== Address 0x4593d37 is 15 bytes inside a block of size 121 alloc'd ==1141== at 0x40270FC: realloc (vg_replace_malloc.c:429) ==1141== by 0x8068D0E: vm_xrealloc (gc.c:727) ==1141== by 0x811F726: rb_str_resize (string.c:1762) ==1141== by 0x81011D1: ruby__sfvwrite (sprintf.c:1148) ==1141== by 0x81021DD: BSD_vfprintf (vsnprintf.c:333) ==1141== by 0x81070C4: rb_vsprintf (sprintf.c:1175) ==1141== by 0x81B6628: rb_raise (error.c:1524) ==1141== by 0x8160964: rb_f_throw (vm_eval.c:1441) ==1141== by 0x815D0EC: call_cfunc (vm_insnhelper.c:316) ==1141== by 0x8162468: vm_call_method (vm_insnhelper.c:403) ==1141== by 0x8163C5B: vm_exec_core (insns.def:1010) ==1141== by 0x816947B: vm_exec (vm.c:1150) uncaught throw :tag (ArgumentError) from test.rb:2:in `
' ---------------------------------------- http://redmine.ruby-lang.org