From: Tanaka Akira Date: 2007-09-24T18:24:04+09:00 Subject: [ruby-dev:31840] valgrind fiber test_fiber.rb を valgrind 下で動かすと Invalid read of size 4 になるのですが、 縮めると以下で再現できるようです。 % cat y.rb require 'fiber' Fiber.new do return end.resume % valgrind ./ruby y.rb ... ==15272== Invalid read of size 4 ==15272== at 0x80ECB1A: vm_throw (insnhelper.ci:1290) ==15272== by 0x80F2053: vm_eval (insns.def:1177) ==15272== by 0x80F5A11: vm_eval_body (vm.c:1162) ==15272== by 0x80EEA93: invoke_block (vm.c:582) ==15272== by 0x80EEC15: vm_invoke_proc (vm.c:621) ==15272== by 0x80FCF6E: rb_fiber_start (cont.c:576) ==15272== by 0x805A46E: ruby_exec_node (eval.c:231) ==15272== by 0x805A4E7: ruby_run_node (eval.c:256) ==15272== by 0x80576F4: main (main.c:46) ==15272== Address 0x4306CC0 is not stack'd, malloc'd or (recently) free'd y.rb:4:in `block in
': unexpected return (LocalJumpError) ==15272== ==15272== ERROR SUMMARY: 9 errors from 9 contexts (suppressed: 19 from 1) ==15272== malloc/free: in use at exit: 396,336 bytes in 6,565 blocks. ==15272== malloc/free: 6,994 allocs, 429 frees, 976,728 bytes allocated. ==15272== For counts of detected errors, rerun with: -v ==15272== searching for pointers to 6,565 not-freed blocks. ==15272== checked 703,584 bytes. ==15272== ==15272== LEAK SUMMARY: ==15272== definitely lost: 0 bytes in 0 blocks. ==15272== possibly lost: 68 bytes in 1 blocks. ==15272== still reachable: 396,268 bytes in 6,564 blocks. ==15272== suppressed: 0 bytes in 0 blocks. ==15272== Reachable blocks (those to which a pointer was found) are not shown. ==15272== To see them, rerun with: --show-reachable=yes -- [田中 哲][たなか あきら][Tanaka Akira]