[PATCH] freeze required_paths in gem_prelude.rb

e$B;38}$H?=$7$^$9!#e(B
1.9 e$B$K$*$$$F%;!<%U%l%Y%ke(B4e$B4D6-$+$ie(B $LOAD_PATH
e$B$N=q$-49$($i$l$k$N$rKI;_$9$k%Q%C%A$rEj9FCW$7$^$9!#e(B

e$B8=:_e(B 1.9 e$B$G$Oe(B gem_prelude.rb e$B$K$*$$$FDI2C$5$l$F$$$ke(B
gem e$B$N3F%Q%9$,e(B freeze
e$B$5$l$F$$$J$$$?$a!"<!$N$h$&$K$7$F%;!<%U%l%Y%ke(B4e$B4D6-$+$ie(B
$LOAD_PATH e$B$r=q$-49$($i$l$k2DG=@-$,$"$j$^$9!#e(B

Thread.new do
$SAFE = 4
eval %q{
$LOAD_PATH.each do |path|
if path.tainted? and not path.frozen?
path.replace("/usr/lib")
end
end
}
end.join

gem
e$B$N3F%Q%9$r=q$-49$($k$3$H$NMxE@$O$J$$$H;W$$$^$9$N$G!"$3$l$i$OM=$ae(B
freeze e$B$7$F$*$/$N$,NI$$$H;W$o$l$^$9!#$$$+$,$G$7$g$&$+!#e(B

Index: gem_prelude.rb

— gem_prelude.rb (revision 17572)
+++ gem_prelude.rb (working copy)
@@ -174,6 +174,9 @@
unless require_paths.empty?
require_paths.first.instance_variable_set(:@gem_prelude_index,
true)
end
+

  •    require_paths.each {|path| path.freeze }
    
  •    # gem directories must come after -I and ENV['RUBYLIB']
       $:[$:.index(ConfigMap[:sitelibdir]),0] = require_paths
     end
    

e$BKL3$F;Bg3XBg3X1!J83X8&5f2J@lLg8&5f0we(B
e$B;38}7DB@e(B
[email protected]

e$B1sF#$G$9!#e(B

2008/06/25 22:11 Keita Y. [email protected]:

1.9 e$B$K$*$$$F%;!<%U%l%Y%ke(B4e$B4D6-$+$ie(B $LOAD_PATH e$B$N=q$-49$($i$l$k$N$rKI;_$9$k%Q%C%A$rEj9FCW$7$^$9!#e(B

e$B$4Js9p!u%Q%C%A$NEj9F$"$j$,$H$&$4$6$$$^$9!#e(B

e$BBh;0<TE*0U8+$G$9$,!"$3$N$h$&$K@H<e@-$K$J$j$=$&$JOC$Oe(B
[email protected]
e$B$KEj9F$7$FD:$/J}$,$$$$$+$H;W$$$^$9!#e(B

e$B$h$m$7$/$*4j$$$7$^$9!#e(B

e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B

In message “Re: [ruby-dev:35228] Re: [PATCH] freeze required_paths in
gem_prelude.rb”
on Wed, 25 Jun 2008 23:00:43 +0900, “Yusuke ENDOH” [email protected]
writes:

|2008/06/25 22:11 Keita Y. [email protected]:
|> 1.9 e$B$K$*$$$F%;!<%U%l%Y%ke(B4e$B4D6-$+$ie(B $LOAD_PATH e$B$N=q$-49$($i$l$k$N$rKI;_$9$k%Q%C%A$rEj9FCW$7$^$9!#e(B
|
|e$B$4Js9p!u%Q%C%A$NEj9F$"$j$,$H$&$4$6$$$^$9!#e(B

e$B;d$+$i$b$Ni$r8@$$$^$9!#$3$N%Q%C%A$O<h$j9~$s$G$$-$^$9$M!#e(B

|e$BBh;0<TE*0U8+$G$9$,!"$3$N$h$&$K@H<e@-$K$J$j$=$&$JOC$Oe(B
| [email protected]
|e$B$KEj9F$7$FD:$/J}$,$$$$$+$H;W$$$^$9!#e(B

e$B%;!<%U%l%Y%ke(B4e$B$K4X$7$F$O$3$A$i$G$b9=$o$J$$$H;W$$$^$9!#@5D>$Je(B
e$B$H$3$m!“%;!<%U%l%Y%ke(B4e$B$O!VEXNOL\I8!WE*$J$H$3$m$b$”$j$^$9$+$i!#e(B

e$B$G!“A0!9$+$i$3$Ne(Btainte$B$5$l$?%*%V%8%'%/%H$r=q$-49$($i$l$k$3$He(B
e$B$O5$$K$J$C$F$$$F!“30It$+$iF~NO$5$l$?$3$H$KM3Mh$9$ke(Btainte$B$H!“e(B
e$B%;!<%U%l%Y%ke(B3e$B0[>o$G@8@.$5$l$?$3$H$KM3Mh$9$ke(Btainte$B$OJ,N%$7$?J}e(B
e$B$,$h$$$N$G$O$J$$$+$H$b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apter 6e$B$b2r@b$7$F$/$@$5$$!#e(B

e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B

In message “Re: [ruby-dev:35233] Re: [PATCH] freeze required_paths in
gem_prelude.rb”
on Thu, 26 Jun 2008 01:29:35 +0900, Urabe S.
[email protected] writes:

|Yukihiro M. e$B$5$s$O=q$-$^$7$?e(B:
|> |e$BBh;0<TE*0U8+$G$9$,!"$3$N$h$&$K@H<e@-$K$J$j$=$&$JOC$Oe(B
|> | [email protected]
|> |e$B$KEj9F$7$FD:$/J}$,$$$$$+$H;W$$$^$9!#e(B
|>
|> e$B%;!<%U%l%Y%ke(B4e$B$K4X$7$F$O$3$A$i$G$b9=$o$J$$$H;W$$$^$9!#e(B
|
|e$B$s$J$o$-$c$J$$$G$9!#E,Ev$J$3$H$r8@$o$J$$$G$/$@$5$$!#$I$3$+$iJ($$$F=P$?OCe(B
|e$B$G$9$+$=$l$O!#e(B

Rubye$B3+H/$N=i4|$+$i!“%;!<%U%l%Y%ke(B4e$B$N40A4@-$rJ]>Z$7$?$3$H$O$J$$e(B
e$B$O$:$G$9!#$”$l$O$"$/$^$G$b;29MDxEY$NB8:_$G$9!#J]>Z$7$F$J$$0Be(B
e$BA4@-$N7g4Y$re(Bsecuritye$B$GHs8x3+$K5DO@$7$J$1$l$P$J$i$J$$M}M3$O$Je(B
e$B$$$N$G$O!#e(B

e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B

In message “Re: [ruby-dev:35235] Re: [PATCH] freeze required_paths in
gem_prelude.rb”
on Thu, 26 Jun 2008 03:09:02 +0900, Urabe S.
[email protected] writes:

|Yukihiro M. e$B$5$s$O=q$-$^$7$?e(B:
|> Rubye$B3+H/$N=i4|$+$i!“%;!<%U%l%Y%ke(B4e$B$N40A4@-$rJ]>Z$7$?$3$H$O$J$$e(B
|> e$B$O$:$G$9!#$”$l$O$“$/$^$G$b;29MDxEY$NB8:_$G$9!#J]>Z$7$F$J$$0Be(B
|> e$BA4@-$N7g4Y$re(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MQ$9$k>l9g!"8=:_$N%;%-%e%j%F%#%b%G%k$K$*$$$F$O:GDc8Be(B

ObjectSpace.each_object(Object) do |obj|
obj.freeze if obj.tainted? and not object.frozen?
end

e$B$r;vA0$K9T$J$&$/$i$$$G$J$$$H2?$,5/$3$k$+J,$+$j$^$;$se(B
e$B!J5U$K8@$($PBgDq$3$l$GLdBj$r7Z8:$G$-$k$H;W$$$^$9!K!#e(B
e$B$=$&$$$&1?MQCN<1$,$3$l$^$G$"$^$jC_@Q$5$l$F$$$J$$$h$&$K;W$o$l$F;DG0$G$9!#e(B

e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B

In message “Re: [ruby-dev:35239] Re: [PATCH] freeze required_paths in
gem_prelude.rb”
on Thu, 26 Jun 2008 10:03:38 +0900, Urabe S.
[email protected] writes:

|> e$B$$$d!“$J$$$G$9$M!#$,!”%;!<%U%l%Y%ke(B4e$B$O$h$j@Q6KE*$K!VJ]>Z$7$J$$!We(B
|> e$B$HL@<($7$?DA$7$$Nc$G$“$k$3$H$b;v<B$G$9!#e(B
|
|e$B$J$s$@$=$j$c!#$8$c$”$=$NJU$KE>$,$C$F$ke(BArray#replacee$B$H$+$N5!G=$h$j$be(B$SAFE
|e$B$H$$$&$“$+$i$5$^$K%;%-%e%j%F%#$K4XO”$7$F$$$k5!G=$NJ}$,$h$j4m$J$$$C$F$3$He(B
|e$B$G$9$+e(B?e$B$=$NH/A[$O26$K$O$J$$$G$9!#@_7W$H$7$FGKC>$7$F$$$^$9!#e(B

e$B;38}$5$s$+$i$b;XE&$,$“$j$^$7$?$,!”%;!<%U%l%Y%ke(B4e$B$H$$$&$3$H$O%3!<e(B
e$B%I$,?.Mj$G$-$J$$$H$$$&$3$H$G$9$+$i!“?.Mj$G$-$k%3!<%I$+$i<B9Te(B
e$B$5$l$ke(BArray#replacee$B$h$j$b!”?.Mj$G$-$J$$%3!<%I$r<B9T$9$k%;!<%Ue(B
e$B%l%Y%ke(B4e$B$NJ}$,$h$j4m$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1$l$P:#2s$N$OC1$J$ke(Binteger
overflowe$B$G!"$3$l$^$G$be(Bruby-deve$B$Je(B
e$B$I$GIaDL$KBP1~$7$F$-$?$b$N$HF1:,$G$7$?!#e(B

e$BA0$N%a!<%k$G!Ve(Bsecuritye$BAw$j!W$J$I$H$$$&I=8=$r;H$C$F8m2r$r>7$$e(B
e$B$?$3$H$O<U:a$7$^$9!#??0U$O!Ve(Bsecuritye$B$KJs9p$5$l$?$+$i$H$$$&M}e(B
e$BM3$G$$$D$^$G$b%/%m!<%:$GBP1~$7B3$1$k$N$O$I$&$+!W$G$7$?!#e(B

                            e$B$^$D$b$He(B e$B$f$-$R$me(B /:|)

e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B

In message “Re: [ruby-dev:35239] Re: [PATCH] freeze required_paths in
gem_prelude.rb”
on Thu, 26 Jun 2008 10:03:38 +0900, Urabe S.
[email protected] writes:

|e$B$J$s$@e(BRailse$B$,F0$+$J$$$H$+$$$&7o$O$^$D$b$H$5$s$bG’<1$7$F$?$N$+!#$J$s$+>pe(B
|e$BJs$H$+=$@5$H$+$*;}$A$@$C$?$j$7$^$9e(B?

e$BKNIt$5$s$,$b$C$F$$$k0J>e$N>pJs$O$J$$$H;W$$$^$9!#e(B

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

e$B$G$bJs9p$5$l$F$$$^$9$,!"$=$N%Q%C%A$G$OLdBj$O2r7h$7$J$$$s$G$7e(B
e$B$?$h$M!#e(B

e$BKNIt$G$9!#e(B

Yukihiro M. e$B$5$s$O=q$-$^$7$?e(B:

e$B$,!"$3$A$i$G!VG$0U$N%3!<%I$r<B9T$G$-$=$&$K$J$$!W!"!V%;%-%e%je(B
e$B%F%#>e=EMW$JLdBj$G$O$J$$!W$H;W$C$?;~E@$G@Q6KE*$K8x3+%P%0=$@5e(B
e$B$K@Z$jBX$($F$b$h$+$C$?$s$8$c$J$$$+$H;W$$$^$9!#;d$NM}2r$,@5$7e(B
e$B$1$l$P:#2s$N$OC1$J$ke(Binteger overflowe$B$G!"$3$l$^$G$be(Bruby-deve$B$Je(B
e$B$I$GIaDL$KBP1~$7$F$-$?$b$N$HF1:,$G$7$?!#e(B

e$B$3$NE@$K$OF10U$7$^$9!#$b$C$H$O$d$/$K6<0R$NE*3N$J8+@Q$j$,$G$-$?$i$h$+$C$?e(B
e$B$H;W$$$^$9!#e(B