[Bug #1763] SecurityError on an Exception object because of modification of instance variable #__Thr

Bug #1763: SecurityError on an Exception object because of modification
of instance variable #ThrowState
http://redmine.ruby-lang.org/issues/show/1763

e$B5/I<<Te(B: Hidetoshi Nagai
e$B%9%F!<%?%9e(B: Open, e$BM%@hEYe(B: Normal
ruby -v: ruby 1.9.2dev (2009-07-08) [i686-linux]

e$B0J2<$h$&$JNc$G!$Nc30%%V%8%’%/%H$N%$%s%9%?%s%9JQ?te(B
(#ThrowState) e$BA`:n$Ne(B
SecurityError e$B$H$J$j!$E,@Z$JNc30>u67$rB
$($k$3$H$,$G$-$^$;$s!%e(B

cmd = proc{p “cmd: safe_level == #{$SAFE}”; raise SystemExit}
safe0_p = proc{|*args| p args}

proc{
$SAFE = 4
begin
cmd.call
rescue SystemExit => e
safe0_p[“SystemExit: #{e.inspect}”]
raise e
rescue Exception => e
safe0_p[“Exception (NOT SystemExit): #{e.inspect}”]
raise e
end
}.call

vm.c e$B$Ne(B vm_exec()
[email protected]_Dj$7$h$&$H$7$F$$$k$?$a!$%f!<%6$K$h$kBP=h$,6K$a$F:$Fq$G$9!%e(B
e$BNc30%*%V%8%’%/%H$Ke(B untrust [email protected]_Dj$7$h$&$K$b!$e(B
$SAFE==0 e$B$Ne(B cmd e$B$+$i8+$F30B&$Ne(B safe level
e$B$OJ,$+$j$^$;$s$+$ie(B
untrust e$B$9$Y$-$+$I$&$+H=CG$G$-$^$;$s$7!$e(B
e$B$=$N30B&$Oe(B $SAFE==4 e$B$G$9$N$Ge(B untrust
[email protected]_Dj$9$k8"8B$,$"$j$^$;$s!%e(B

e$B%A%1%C%He(B #1763 e$B$,99?7$5$l$^$7$?!#e(B (by Nobuyoshi N.)

e$B%9%F!<%?%9e(B Assignede$B$+$ie(BClosede$B$KJQ99e(B
e$B?JD=e(B % 0e$B$+$ie(B100e$B$KJQ99e(B

Applied in changeset r24148.

http://redmine.ruby-lang.org/issues/show/1763

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs