From: Kikutani Makoto Date: 1997-12-08T11:42:23+09:00 Subject: [ruby-list:5574] tcltklib error (Re: wave viewer) きくたにです。 Sun, Dec 07, 1997 at 01:23:08AM +0900 において Yukihiro Matsumoto さん曰く: > |% ruby tkfrom.rb > |/usr/lib/ruby/parsedate.rb:14:in parsedate': failed to allocate memory (fatal) > | from tkfrom.rb:106 > | from tkfrom.rb:96:in each' > | from tkfrom.rb:96 > | > |なども出てます。 > > これはregex.cのバグです. from.rbも同じエラーだったのですが、そっちはパッチで直りました。But tkfrom のほうは、 % ruby tkfrom.rb /usr/lib/ruby/tk.rb:7: [BUG] Segmentation fault zsh: 3754 abort ruby tkfrom.rb とつれないです。gdbで追ってこうと思ったのですが、以下のようになり、 私は .so の中を追ってく方法を知らないのでした。 tcl/tkはここ会社では8.0(日本語なし)なんですが関係あるのかな。 % gdb /usr/bin/ruby GDB is free software and you are welcome to distribute copies of it under certain conditions; type "show copying" to see the conditions. There is absolutely no warranty for GDB; type "show warranty" for details. GDB 4.16 (i486-debian-linux), Copyright 1996 Free Software Foundation, Inc... (gdb) b dln_load Breakpoint 1 at 0x80586aa: file dln.c, line 1171. (gdb) run tkfrom.rb Starting program: /usr/bin/ruby tkfrom.rb Breakpoint 1, dln_load (file=0x80e0fd0 "/usr/lib/ruby/i686-linux/tcltklib.so") at dln.c:1171 1171 init_funcname(buf, file); (gdb) n 1178 int len = strlen(file); (gdb) 1188 if ((handle = dlopen(file, RTLD_LAZY|RTLD_GLOBAL)) == NULL) { (gdb) 1192 if ((init_fct = (void(*)())dlsym(handle, buf)) == NULL) { (gdb) 1196 (*init_fct)(); (gdb) p init_fct $1 = (void (*)()) 0x40164b80 (gdb) s Program received signal SIGSEGV, Segmentation fault. 0x40207c41 in Tcl_FindExecutable () (gdb) bt #0 0x40207c41 in Tcl_FindExecutable () #1 0x40164c6a in Init_tcltklib () at /usr/local/src/Lang/ruby-1.1b0/ext/tcltklib/tcltklib.c:184 #2 0x8058738 in dln_load ( file=0x80e0fd0 "/usr/lib/ruby/i686-linux/tcltklib.so") at dln.c:1196 #3 0x8065032 in f_require (obj=1074950884, fname=1074809904) at eval.c:3775 #4 0x8062b02 in rb_call (class=1074953364, recv=1074950884, mid=7545, argc=1, argv=0xbffff358, scope=1) at eval.c:3010 #5 0x805ecd7 in rb_eval (self=1074950884, node=0x40115378) at eval.c:1713 #6 0x805d650 in rb_eval (self=1074950884, node=0x401152d8) at eval.c:1350 #7 0x805ba6f in eval_node (self=1074950884) at eval.c:740 #8 0x806499e in f_load (obj=1074950884, fname=1074877584) at eval.c:3645 #9 0x806516c in f_require (obj=1074950884, fname=1074877584) at eval.c:3794 #10 0x8062b02 in rb_call (class=1074953364, recv=1074950884, mid=7545, argc=1, argv=0xbffff7bc, scope=1) at eval.c:3010 #11 0x805ecd7 in rb_eval (self=1074950884, node=0x4011b2b4) at eval.c:1713 #12 0x805d650 in rb_eval (self=1074950884, node=0x4011b28c) at eval.c:1350 #13 0x805ba6f in eval_node (self=1074950884) at eval.c:740 #14 0x805bb7f in ruby_run () at eval.c:773 #15 0x804eb3d in main (argc=2, argv=0xbffffa5c, envp=0xbffffa68) at main.c:37 (gdb) -- 人生を背負い投げ 菊谷 誠(Kikutani Makoto) kikutani@eis.or.jp kikutani@jdc.ericsson.se hgf03701@niftyserve.or.jp http://www.eis.or.jp/muse/kikutani/