e$B1sF#$H?=$7$^$9!#e(B
e$B$/$@$i$J$$Js9p$P$+$j$G62=L$G$9$,!"e(B[ruby-dev:31848]
e$B$H;w$?$h$&$J%P%0$re(B
e$BE,Ev$KC5$7$F$_$^$7$?!#e(B1.9 e$B$P$C$+$j$G$9!#e(B
e$B860x$rD4$Y$k5$NO$,L5$$$N$GJs9p$@$1$G$9$_$^$;$s!#e(B
e$BLse(B 100 e$BK|%(%s%H%j$N%O%C%7%e%j%F%i%ke(B:
$ time ./ruby -ve ‘eval("{" + “0=>0,” * 1000000 + “0=>0}”)’
ruby 1.9.0 (2007-09-24 patchlevel 0) [i686-linux]
(eval):1: – control frame ----------
c:0006 p:261958 s:302670847 b:0012 l:000004 d:000011 EVAL (eval):1
c:0005 p:---- s:0011 b:0011 l:000010 d:000010 FINISH :new
c:0004 p:---- s:0009 b:0009 l:000008 d:000008 CFUNC :eval
c:0003 p:0018 s:0005 b:0005 l:000004 d:000004 TOP -e:1
c:0002 p:---- s:0003 b:0003 l:000002 d:000002 FINISH :inherited
c:0001 p:---- s:0001 b:-001 l:000000 d:000000 ------
SEGV recieved in SEGV handler
real 0m13.298s
user 0m6.130s
sys 0m6.510s
e$BLse(B 100 e$BK|JQ?t$NB?=EBeF~e(B:
$ time ./ruby -ve ‘p eval(“x,” * 1000000 + “=0”)’
ruby 1.9.0 (2007-09-24 patchlevel 0) [i686-linux]
(eval):1: – control frame ----------
c:0006 p:0006 s:1000015 b:0014 l:000004 d:000013 EVAL (eval):1
c:0005 p:---- s:0012 b:0012 l:000011 d:000011 FINISH :new
c:0004 p:---- s:0010 b:0010 l:000009 d:000009 CFUNC :eval
c:0003 p:0016 s:0006 b:0005 l:000004 d:000004 TOP -e:1
c:0002 p:---- s:0003 b:0003 l:000002 d:000002 FINISH :inherited
c:0001 p:---- s:0001 b:-001 l:000000 d:000000 ------
SEGV recieved in SEGV handler
real 0m8.164s
user 0m3.510s
sys 0m4.580s
e$BLse(B 100 e$BK|0z?t$N%a%=%C%I8F$S=P$7e(B:
$ time ./ruby -ve ‘def foo(*a); end; eval(“foo(” + “0,” * 1000000 +
“0)”)’
ruby 1.9.0 (2007-09-24 patchlevel 0) [i686-linux]
(eval):1: – control frame ----------
c:0006 p:261957 s:302705663 b:0012 l:000004 d:000011 EVAL (eval):1
c:0005 p:---- s:0011 b:0011 l:000010 d:000010 FINISH :new
c:0004 p:---- s:0009 b:0009 l:000008 d:000008 CFUNC :eval
c:0003 p:0018 s:0005 b:0005 l:000004 d:000004 TOP -e:1
c:0002 p:---- s:0003 b:0003 l:000002 d:000002 FINISH :inherited
c:0001 p:---- s:0001 b:-001 l:000000 d:000000 ------
SEGV recieved in SEGV handler
real 0m6.178s
user 0m2.910s
sys 0m3.200s
false e$B$,e(B || e$B$Ge(B 25000 e$B8DO"$J$C$?<0e(B:
$ time ./ruby -ve ‘eval(“false||” * 25000 + “true”)’
ruby 1.9.0 (2007-09-24 patchlevel 0) [i686-linux]
e$B%;%0%a%s%F!<%7%g%s0cH?$G$9e(B
real 0m3.888s
user 0m3.390s
sys 0m0.490s