Dl/import is not thread safe

e$B$3$s$P$s$O!"e(Bsheepman e$B$G$9!#e(B

e$B$[$H$s$ILdBj$K$J$k>l9g$O$J$$$H;W$&$N$G$9$,!"e(B
dl/import e$B$N0J2<$NItJ,$,%9%l%C%I0BA4$G$O$J$$$N$G!"e(B
e$B%Q%C%A$rE:IU$7$^$9!#e(B

@retval e$B$,JV$5$l$kA0$K!“JL$N%9%l%C%I$Ge(B @retval e$B$NCM$re(B
e$BJQ$($i$l$k2DG=@-$,$”$k$H;W$$$^$9!#e(B

$ svn diff ext/dl/lib/dl/import.rb
Index: ext/dl/lib/dl/import.rb

— ext/dl/lib/dl/import.rb (revision 12023)
+++ ext/dl/lib/dl/import.rb (working copy)
@@ -87,7 +87,7 @@
" rs = dec.call(rs) if (dec && rs)",
" @retval = r",
" @args = rs",

  •     "  @retval",
    
  •     "  r",
        "}",
      ].join("\n"))
    

@@ -169,7 +169,7 @@
" rs = dec.call(rs) if dec",
" @retval = r",
" @args = rs",

  •     "  return @retval",
    
  •     "  return r",
        "end",
        "module_function :#{mname}",
      ].join("\n")

At Sun, 11 Mar 2007 23:39:59 +0900,
sheepman wrote:

ã»ã¨ã‚“ã©å•é¡Œã«ãªã‚‹å ´åˆã¯ãªã„ã¨æ€ã†ã®ã§ã™ãŒã€
dl/import の以下の部分がスレッド安全ではないので、
パッチを添付します。

@retval が返される前に、別のスレッドで @retval の値を
変えられる可能性があると思います。

 ありがとうございます。取り込みました。


/
/__ __ Akinori.org / MUSHA.org
/ ) ) ) ) / FreeBSD.org / Ruby-lang.org
Akinori MUSHA aka / (_ / ( (__( @ iDaemons.org / and.or.jp

“Different eyes see different things,
Different hearts beat on different strings –
But there are times for you and me when all such things agree”