# 1.8 Marshal.load(open("/dev/null"))

**URL:** <https://www.ruby-forum.com/t/1-8-marshal-load-open-dev-null/138534>\
**Category:** Development\
**Created:** [May 24, 2008, 4:30am UTC](https://www.ruby-forum.com/t/1-8-marshal-load-open-dev-null/138534 "2008-05-24T04:30:53Z")\
**Posts on this page:** 2\
**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:** [May 24, 2008, 4:30am UTC](https://www.ruby-forum.com/t/1-8-marshal-load-open-dev-null/138534/1 "2008-05-24T04:30:53Z")

</div>

rubyspec e$B$,Mn$A$F$$$?$N$G$A$g$C$H$_$F$_$?$H$3$m!"0J2\<$G4qL/e(B  
e$B$JF0:n$r$9$k$h$&$G$9!#e(B  
[http://www.rubyist.net/~akr/chkbuild/debian-sarge/ruby-1.8/log/20080524T103507.txt.gz](http://www.rubyist.net/~akr/chkbuild/debian-sarge/ruby-1.8/log/20080524T103507.txt.gz)

% ./ruby -ve ‘Marshal.load(open(“/dev/null”))’  
ruby 1.8.7 (2008-05-24 patchlevel 5000) [i686-linux]  
-e:1:in `load’: getc reentered (RuntimeError)  
from -e:1  
zsh: exit 1 ./ruby -ve ‘Marshal.load(open(“/dev/null”))’

valgrind e$B$r$+$1$F$\_$k$H$J$K$+=P$F$-$^$9!#e(B

% valgrind ./ruby -e ‘Marshal.load(open(“/dev/null”))’  
==12994== Memcheck, a memory error detector.  
==12994== Copyright (C) 2002-2006, and GNU GPL’d, by Julian Seward et  
al.  
==12994== Using LibVEX rev 1658, a library for dynamic binary  
translation.  
==12994== Copyright (C) 2004-2006, and GNU GPL’d, by OpenWorks LLP.  
==12994== Using valgrind-3.2.1-Debian, a dynamic binary instrumentation  
framework.  
==12994== Copyright (C) 2000-2006, and GNU GPL’d, by Julian Seward et  
al.  
==12994== For more details, rerun with: -v  
==12994==  
==12994== Use of uninitialised value of size 4  
==12994== at 0x807F986: reentrant\_check (marshal.c:92)  
==12994== by 0x807FA2C: r\_byte (marshal.c:826)  
==12994== by 0x807FAFE: marshal\_load (marshal.c:1435)  
==12994== by 0x805646D: call\_cfunc (eval.c:5743)  
==12994== by 0x805F731: rb\_call0 (eval.c:5899)  
==12994== by 0x8060400: rb\_call (eval.c:6146)  
==12994== by 0x805DB99: rb\_eval (eval.c:3492)  
==12994== by 0x806B21D: ruby\_exec\_internal (eval.c:1642)  
==12994== by 0x806B255: ruby\_exec (eval.c:1662)  
==12994== by 0x806B280: ruby\_run (eval.c:1672)  
==12994== by 0x80533FE: main (main.c:48)  
-e:1:in `load’: getc reentered (RuntimeError)  
from -e:1  
==12994==  
==12994== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 17 from  
1)  
==12994== malloc/free: in use at exit: 341,490 bytes in 7,626 blocks.  
==12994== malloc/free: 7,899 allocs, 273 frees, 345,017 bytes allocated.  
==12994== For counts of detected errors, rerun with: -v  
==12994== searching for pointers to 7,626 not-freed blocks.  
==12994== checked 554,296 bytes.  
==12994==  
==12994== LEAK SUMMARY:  
==12994== definitely lost: 0 bytes in 0 blocks.  
==12994== possibly lost: 0 bytes in 0 blocks.  
==12994== still reachable: 341,490 bytes in 7,626 blocks.  
==12994== suppressed: 0 bytes in 0 blocks.  
==12994== Reachable blocks (those to which a pointer was found) are not  
shown.  
==12994== To see them, rerun with: --show-reachable=yes  
zsh: exit 1 valgrind ./ruby -e ‘Marshal.load(open(“/dev/null”))’

---

<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:** [May 26, 2008, 1:04am UTC](https://www.ruby-forum.com/t/1-8-marshal-load-open-dev-null/138534/2 "2008-05-26T01:04:12Z")

</div>

At Sat, 24 May 2008 11:20:12 +0900,  
Tanaka A. wrote:

> rubyspec ãŒè½ã¡ã¦ã„ãŸã®ã§ã¡ã‚‡ã£ã¨ã¿ã¦ã¿ãŸã¨ã“ã‚ã€ä»¥ä¸‹ã§å¥‡å¦™  
> ãªå‹•ä½œã‚’ã™ã‚‹ã‚ˆã†ã§ã™ã€‚  
> [http://www.rubyist.net/~akr/chkbuild/debian-sarge/ruby-1.8/log/20080524T103507.txt.gz](http://www.rubyist.net/~akr/chkbuild/debian-sarge/ruby-1.8/log/20080524T103507.txt.gz)
> 
> % ./ruby -ve ‘Marshal.load(open(“/dev/null”))’  
> ruby 1.8.7 (2008-05-24 patchlevel 5000) [i686-linux]  
> -e:1:in `load’: getc reentered (RuntimeError)  
> from -e:1  
> zsh: exit 1 ./ruby -ve ‘Marshal.load(open(“/dev/null”))’

ã‚ã‚ŠãŒã¨ã†ã”ã–ã„ã¾ã™ã€‚ã¾ã¤ã‚‚ã¨ã•ã‚“ãŒä¿®æ­£ã—ãŸã‚ˆã†ã§ã™ã€‚
