# Valgrind fiber

**URL:** <https://www.ruby-forum.com/t/valgrind-fiber/115355>\
**Category:** Development\
**Created:** [September 24, 2007, 11:24am UTC](https://www.ruby-forum.com/t/valgrind-fiber/115355 "2007-09-24T11:24:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tanaka\_A](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/c67d28/32.png) [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Post date:** [September 24, 2007, 11:24am UTC](https://www.ruby-forum.com/t/valgrind-fiber/115355/1 "2007-09-24T11:24:40Z")

</div>

test\_fiber.rb e$B$re(B valgrind e$B2\<$GF0$+$9$He(B Invalid read of size  
4 e$B$K$J$k$N$G$9$,!"e(B  
e$B=L$a$k$H0J2\<$G:F8=$G$-$k$h$&$G$9!#e(B

% 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
