# DL::Symbol#call dumps core

**URL:** <https://www.ruby-forum.com/t/dl-symbol-call-dumps-core/88444>\
**Category:** Development\
**Created:** [March 11, 2007, 4:10am UTC](https://www.ruby-forum.com/t/dl-symbol-call-dumps-core/88444 "2007-03-11T04:10:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sheepman](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/d07c76/32.png) [@sheepman](https://www.ruby-forum.com/u/sheepman)\
**Post date:** [March 11, 2007, 4:10am UTC](https://www.ruby-forum.com/t/dl-symbol-call-dumps-core/88444/1 "2007-03-11T04:10:49Z")

</div>

e$B$3$s$K$A$O!"e(B sheepman e$B$G$9!#e(B

dl(1.8e$B$KIUB0$NJ}e(B)e$B$N%^%K%e%"%k$r=q$$$F$$$F5$$,$D$$$?$s$G$9$,!"e(B  
e$B\<!$N$h$&$K$9$k$He(B core e$B$rEG$-$^$9!#e(B

strlast = DL.callback(‘IS’){|s|  
s[-1]  
}  
p strlast.call(“abcd”)[0].chr  
DL.remove\_callback(strlast)  
p strlast.call(“abcd”)[0].chr

$ ruby-1.8 -vrdl/import t.rb  
ruby 1.8.6 (2007-03-05 patchlevel 5000) [i686-linux]  
“d”  
t.rb:9: [BUG] Segmentation fault  
ruby 1.8.6 (2007-03-05) [i686-linux]

zsh: abort ruby-1.8 -vrdl/import t.rb

e$B0J2\<$O%Q%C%A$G$9!#e(B

# Index: mkcallback.rb

— mkcallback.rb (revision 12023)  
+++ mkcallback.rb (working copy)  
@@ -31,6 +31,9 @@  
subst\_code,  
“”,  
" obj = rb\_hash\_aref(DLFuncTable,  
rb\_assoc\_new(INT2NUM(#{rettype.to\_s}),INT2NUM(#{fnum.to\_s})));",

- " if(NIL\_P(obj))",
- " rb\_raise(rb\_eDLError, “callback funciton does not exist in  
DL::FuncTable”);",
- " Check\_Type(obj, T\_ARRAY);",  
" proto = rb\_ary\_entry(obj, 0);",  
" proc = rb\_ary\_entry(obj, 1);",  
" Check\_Type(proto, T\_STRING);",

---

<div class="post-metadata">

**Author:** ![sheepman](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/d07c76/32.png) [@sheepman](https://www.ruby-forum.com/u/sheepman)\
**Post date:** [March 11, 2007, 10:04am UTC](https://www.ruby-forum.com/t/dl-symbol-call-dumps-core/88444/2 "2007-03-11T10:04:13Z")

</div>

At Sun, 11 Mar 2007 12:09:59 +0900,  
sheepman wrote:

> $ ruby-1.8 -vrdl/import t.rb  
> ruby 1.8.6 (2007-03-05 patchlevel 5000) [i686-linux]  
> “d”  
> t.rb:9: [BUG] Segmentation fault  
> ruby 1.8.6 (2007-03-05) [i686-linux]
> 
> zsh: abort ruby-1.8 -vrdl/import t.rb
> 
> ä»¥ä¸‹ã¯ãƒ‘ãƒƒãƒã§ã™ã€‚

ã€€ã‚ã‚ŠãŒã¨ã†ã”ã–ã„ã¾ã™ã€‚ã‚¨ãƒ©ãƒ¼ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã ã‘ä¿®æ­£ã—ã¦ã‚³ãƒŸãƒƒãƒˆ  
ã—ã¾ã—ãŸã€‚

ã€€1.9 ã®æ–¹(DL2)ã¯è©²å½“éƒ¨åˆ†ãŒãªã„ã®ã§ãã®ã¾ã¾ã§ã™ã€‚ä¸Šã®ã‚³ãƒ¼ãƒ‰ã‚‚  
å‹•ãã¾ã›ã‚“ãŒã€äº’æ›ãƒ¬ã‚¤ãƒ¤ãŒãªã„ã¨ç§»è¡ŒãŒã¤ã‚‰ã„ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“ã­ã€‚

–  
/  
/\_\_ \_\_ [Akinori.org](http://Akinori.org) / [MUSHA.org](http://MUSHA.org)  
/ ) ) ) ) / [FreeBSD.org](http://FreeBSD.org) / [Ruby-lang.org](http://Ruby-lang.org)  
Akinori MUSHA aka / (\_ / ( (\_\_( @ [iDaemons.org](http://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”
