e$B$3$s$P$s$O!"e(Bsheepman e$B$G$9!#e(B
DL::PtrData e$B$,0J2<$N$h$&$K$9$k$He(B core e$B$rEG$-$^$9!#e(B
PtrData e$B%/%i%9$O%]%$%s%?!<$N%i%C%Q!<$G$9$+$i!"07$$<!Bh$G$Oe(B
core e$B$rEG$$$F$7$^$&$N$O;EJ}$,$J$$$H;W$&$N$G$9$,!“0J2<$N>l9g$Ke(B core
e$B$re(B
e$BEG$$$F$7$^$&$N$O!”%P%0$J$s$8$c$J$$$+$H;W$$$^$9!#e(B
e$B;EMM$J$s$G$7$g$&$+e(B?
e$B$H$j$"$($:!"%Q%C%A$rE:IU$7$^$9!#e(B
$ cat t2.rb
require “dl”
sp = [‘a’, ‘b’, ‘c’].to_ptr
sp.to_a(‘S’)
$ ruby-1.8 -v t2.rb
ruby 1.8.6 (2007-03-05 patchlevel 5000) [i686-linux]
t2.rb:3: [BUG] Segmentation fault
ruby 1.8.6 (2007-03-05) [i686-linux]
zsh: abort ruby-1.8 -v t2.rb
$ svn diff ext/dl/ptr.c
Index: ext/dl/ptr.c
— ext/dl/ptr.c (revision 12023)
+++ ext/dl/ptr.c (working copy)
@@ -344,7 +344,7 @@
n = data->size / sizeof(void*);
break;
case ‘S’: case ‘s’:
ttateã•ã‚“ã«CCã—ã¾ã™ã€‚
At Mon, 12 Mar 2007 00:14:20 +0900,
sheepman wrote:
ã“ã‚“ã°ã‚“ã¯ã€sheepman ã§ã™ã€‚
DL::PtrData ãŒä»¥ä¸‹ã®ã‚ˆã†ã«ã™ã‚‹ã¨ core ã‚’åãã¾ã™ã€‚
PtrData クラスã¯ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã®ãƒ©ãƒƒãƒ‘ーã§ã™ã‹ã‚‰ã€æ‰±ã„次第ã§ã¯
core ã‚’åã„ã¦ã—ã¾ã†ã®ã¯ä»•æ–¹ãŒãªã„ã¨æ€ã†ã®ã§ã™ãŒã€ä»¥ä¸‹ã®å ´åˆã« core ã‚’
åã„ã¦ã—ã¾ã†ã®ã¯ã€ãƒã‚°ãªã‚“ã˜ã‚ƒãªã„ã‹ã¨æ€ã„ã¾ã™ã€‚
仕様ãªã‚“ã§ã—ょã†ã‹?
r4831 | ttate | 2003-10-22 23:29:20 +0900 (Wed, 22 Oct 2003) | 2 lines
Bugfix for PR#1196
ã¨ã„ã†ã‚³ãƒŸãƒƒãƒˆã«ä½•ã‹æ„図ãŒã‚ã‚Šãã†ã§ã™ãŒã€ã©ã†ã§ã—ょã†ã。
ruby 1.8.6 (2007-03-05) [i686-linux]
break;
case ‘S’: case ‘s’:
–
sheepman / TAMURA Takashi
[email protected]
–
/
/__ __ 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”
Akinori MUSHA wrote:
DL::PtrData e$B$,0J2<$N$h$&$K$9$k$He(B core e$B$rEG$-$^$9!#e(B
PtrData e$B%/%i%9$O%]%$%s%?!<$N%i%C%Q!<$G$9$+$i!"07$$<!Bh$G$Oe(B
core e$B$rEG$$$F$7$^$&$N$O;EJ}$,$J$$$H;W$&$N$G$9$,!“0J2<$N>l9g$Ke(B core e$B$re(B
e$BEG$$$F$7$^$&$N$O!”%P%0$J$s$8$c$J$$$+$H;W$$$^$9!#e(B
r4831 | ttate | 2003-10-22 23:29:20 +0900 (Wed, 22 Oct 2003) | 2 lines
Bugfix for PR#1196
e$B$H$$$&%3%_%C%H$K2?$+0U?^$,$"$j$=$&$G$9$,!"$I$&$G$7$g$&$M!#e(B
e$BA4$/3P$($F$$$J$$$N$G$9$,!";W$$=P$9EXNO$r$7$F$_$^$9!#e(B
e$BFC$K2?$b$J$1$l$P%Q%C%A$rH?1G$5$;$^$9!#e(B
Takaaki T. wrote:
e$BA4$/3P$($F$$$J$$$N$G$9$,!";W$$=P$9EXNO$r$7$F$_$^$9!#e(B
e$BFC$K2?$b$J$1$l$P%Q%C%A$rH?1G$5$;$^$9!#e(B
e$B$O$d$j0U?^$O;W$$=P$;$J$$$N$G$9$,!"%P%0$@$H;W$&$N$G%Q%C%A$Ne(B
e$BDL$j=$@5$r9T$$$^$7$?!#e(B
e$B0lO"$N%P%0Js9p$"$j$,$H$&$4$6$$$^$9!#e(B> sheepmane$B$5$se(B
e$B;~4V$,$G$-$?$i%F%9%H%1!<%9$K$bH?1G$5$;$F$*$-$?$$$H;W$$$^$9!#e(B