Rb_objspace_call_finalizer() is called twice

[email protected]$G$9!#(B

$B!!8=:_!"(Bgc.c $B$N2?%+=j$+$G(B finalizer_table $B$N(B NULL check
$B$r$7$F$$$^$9!#$3(B
$B$l$OL5BL$J$N$G!":G=i$K0l2s(B finalizer_table
$B$r=i4|2=!":G8e$K2rJ|$7$F$d$l(B
$B$P!"$3$l$i$N%A%’%C%/$OITMW$K$J$k$h$&$K;W$$$^$7$?!#(B

$B!!$G!"$d$C$F$_$?$i(B SEGV$B!#(B

$B!!(Bfinalizer_table $B$r(B rb_objspace_call_finalizer()
$B$G2rJ|$9$k$h$&$K$7$?$s(B
$B$G$9$,!"$3$$$D$,(B 2
$B2s8F$P$l$F$$$^$9!#$=$N$?$a!"$*$+$7$J$3$H$K$J$C$F$$$k!#(B

  • VM $B$N=*N;=hM}$G!"(Brb_objspace_free() $B$+$i(B
  • Ruby $B%W%m%;%9$N=*N;=hM}$G!"(Brb_gc_call_finalizer_at_exit() $B$+$i(B

$B!!$3$N4X?t<+BN$O!“6/@)E*$K%U%!%$%J%i%$%[email protected]$H;W$&$s$G$9$,!”(B
$B:#$N>u67!J([email protected]$7$$$N$G$7$g$&$+!#$o$6$o$6(B _atexit()
$B$C$F$N$r(B
$BJL$KMQ0U$7$F$$$k$C$F$3$H$O!"$3$l<+BN$O2?EY8F$P$l$F$bNI$$$O$:$C$F$3$H$+$7(B
$B$i$s!#$7$+$7!"[email protected]$-$F$$$k%%V%8%’%/%H$K$/$C$D$$$F$$$k%U%!%$%J%i%$(B
$B%6$b6/@)E
$K8F$V$O$:$J$N$G!"$d$O$j(B1$B2s$7$+!J:G8e$K$7$+!K8F$s$8$c$$$1$J$$(B
$B$h$&$J!#(B

$B!!$H$$$&$o$1$G!"[email protected]}$G$-$F$J$$5$$,$7$^$9!#(Bstatic
$B$8$c$J$$$N(B
$B$b$h$/$o$+$i$J$$!#$I$&$"$k$Y$-$G$7$g$&!#(B

$B$"$H!":#(B win32 $B0J30$G(B ENABLE_VM_OBJSPACE $B$,(B 1 $B$J$N$O!"(B

$B$J$<$G$7$g$&$+!#(B

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

In message “Re: [ruby-dev:42479] rb_objspace_call_finalizer() is called
twice”
on Fri, 29 Oct 2010 00:28:50 +0900, SASADA Koichi [email protected]
writes:

|$B!!(Bfinalizer_table $B$r(B rb_objspace_call_finalizer()
$B$G2rJ|$9$k$h$&$K$7$?$s(B
|$B$G$9$,!"$3$$$D$,(B 2 $B2s8F$P$l$F$$$^$9!#$=$N$?$a!"$$+$7$J$3$H$K$J$C$F$$$k!#(B
|
|- VM $B$N=N;=hM}$G!"(Brb_objspace_free() $B$+$i(B
|- Ruby $B%W%m%;%9$N=N;=hM}$G!"(Brb_gc_call_finalizer_at_exit() $B$+$i(B
|
|$B!!$3$N4X?t<+BN$O!"6/@)E
$K%U%!%$%J%i%$%[email protected]$H;W$&$s$G$9$,!"(B
|$B:#$N>u67!J([email protected]$7$$$N$G$7$g$&$+!#$o$6$o$6(B _atexit()
$B$C$F$N$r(B
|$BJL$KMQ0U$7$F$$$k$C$F$3$H$O!"$3$l<+BN$O2?EY8F$P$l$F$bNI$$$O$:$C$F$3$H$+$7(B
|$B$i$s!#$7$+$7!"[email protected]$-$F$$$k%
%V%8%’%/%H$K$/$C$D$$$F$$$k%U%!%$%J%i%$(B
|$B%6$b6/@)E
$K8F$V$O$:$J$N$G!"$d$O$j(B1$B2s$7$+!J:G8e$K$7$+!K8F$s$8$c$$$1$J$$(B
|$B$h$&$J!#(B
|
|$B!!$H$$$&$o$1$G!"[email protected]}$G$-$F$J$$5$$,$7$^$9!#(Bstatic $B$8$c$J$$$N(B
|$B$b$h$/$o$+$i$J$$!#$I$&$"$k$Y$-$G$7$g$&!#(B

2$B2s8F$S=P$9$h$&$K$J$C$?$N$O(Br25000$B$G%3%_%C%[email protected]$5$s$G$9!#(B
[email protected]$5$s$K?<$$0U?^$,$"$k$N$+!"$=$l$H$b$&$C$+$j$+$O$A$g$C$H(B
$B$o$+$j$^$;$s!#(B

[email protected]$G$9!#(B

At Fri, 29 Oct 2010 10:13:22 +0900,
Yukihiro M. wrote in [ruby-dev:42487]:

2$B2s8F$S=P$9$h$&$K$J$C$?$N$O(Br25000$B$G%3%_%C%[email protected]$5$s$G$9!#(B
[email protected]$5$s$K?<$$0U?^$,$"$k$N$+!"$=$l$H$b$&$C$+$j$+$O$A$g$C$H(B
$B$o$+$j$^$;$s!#(B

$B$b$A$m$s$&$C$+$j$G$7$g$&!#(B

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