From: iga50@... Date: 2002-12-13T16:49:59+09:00 Subject: [ruby-list:36757] ruby 1.6.7+ruby-postgres-0.7.0でSegmentation fault 五十嵐と申します。 「Redhat Linux 7.1」+「ruby 1.6.7」+「ruby-postgres-0.7.0」 +「postgresql-7.1.2」でpostgresqlにアクセスするスクリプトを作っています。 しかし、PGconnのexec(sql)メソッドの部分でSegmentation faultを起こしてし まい、正常に処理ができません。 スクリプト中には、幾つかのexec(sql)メソッドを記述しているのですが、実行 するごとにSegmentation faultを引き起こすexec(sql)メソッドの位置が異なり、 デバッグに行き詰まってしまいました。 私自身がruby初心者であることもあり、私のrubyの使い方が悪いのだと思うので すが、どうやって問題を解決したらよいかアドバイスしていただけないでしょう か。 尚、スクリプト実行時の内容は以下のとおりです。 アドバイスの程よろしくお願いいたします。 %gdb /usr/local/bin/ruby GNU gdb 5.0rh-5 Red Hat Linux 7.1 Copyright 2001 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or 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. This GDB was configured as "i386-redhat-linux"... (gdb) run ./stars2nntp.rb Starting program: /usr/local/bin/ruby ./stars2nntp.rb Program received signal SIGSEGV, Segmentation fault. 0x400f7341 in chunk_alloc (ar_ptr=0x401a0f00, nb=368) at malloc.c:2781 2781 malloc.c: No such file or directory. in malloc.c (gdb) q The program is running. Exit anyway? (y or n) y % /usr/local/bin/ruby -v ruby 1.6.7 (2002-03-01) [i686-linux] %