From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Grover Newsgroups: gmane.lisp.guile.bugs Subject: "class-of" causes segmentation fault when display'd Date: Mon, 27 Jun 2005 10:21:51 -0400 Message-ID: <42C00B7F.7080108@mail.msen.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0823884461==" X-Trace: sea.gmane.org 1119888879 4013 80.91.229.2 (27 Jun 2005 16:14:39 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 27 Jun 2005 16:14:39 +0000 (UTC) Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Mon Jun 27 18:14:31 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DmwDx-0007bT-8n for guile-bugs@m.gmane.org; Mon, 27 Jun 2005 18:12:41 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DmwLc-0003ej-Kr for guile-bugs@m.gmane.org; Mon, 27 Jun 2005 12:20:36 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DmwLM-0003aG-KV for bug-guile@gnu.org; Mon, 27 Jun 2005 12:20:20 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DmwLC-0003Uf-Ir for bug-guile@gnu.org; Mon, 27 Jun 2005 12:20:11 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DmwLC-0003Tj-6K for bug-guile@gnu.org; Mon, 27 Jun 2005 12:20:10 -0400 Original-Received: from [148.59.80.48] (helo=ww8.msen.com) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1DmwNM-0004nL-HX for bug-guile@gnu.org; Mon, 27 Jun 2005 12:22:24 -0400 X-Sent-To: Original-Received: from [192.168.1.220] (pool-151-196-47-245.balt.east.verizon.net [151.196.47.245]) (authenticated bits=0) by ww8.msen.com (8.13.3/8.13.3) with ESMTP id j5RGHxYH050461 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Mon, 27 Jun 2005 12:18:00 -0400 (EDT) (envelope-from awgrover@mail.msen.com) User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050317) X-Accept-Language: en-us, en Original-To: bug-guile@gnu.org X-Enigmail-Version: 0.92.0.0 OpenPGP: id=5074AF60; url= X-Milter: Spamilter (Reciever: ww8.msen.com; Sender-ip: 151.196.47.245; Sender-helo: [192.168.1.220]; ) X-BeenThere: bug-guile@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:3031 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.bugs:3031 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --===============0823884461== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigE44C79460FEB8B746F8BF848" This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigE44C79460FEB8B746F8BF848 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Environment: * Guile 1.6.4 * Linux xxxxx 2.6.8-24.14-default #1 Tue Mar 29 09:27:43 UTC 2005 i686 i686 i386 GNU/Linux * SuSE 9.2 buildstamp = Fri Dec 3 18:43:57 UTC 2004 LIBS = -lqthreads -lpthread -lcrypt -lm libguileinterface = 15:0:3 Summary: Applying "class-of" causes segmentation fault if the (oop goops) module is not loaded (and if the result is display'd). Works fine if the module is loaded. Steps to reproduce: % guile -c '(display (class-of 1))' ; or % guile -q guile> (class-of 1) Notes: Does not seg-fault if the result is not displayed. 'write' and 'object->string' cause same behavior. I find it odd that the procedure is defined (before (oop goops) is loaded). Same behavior existed in previous guile release (1.4?). Transcript: ; repl % guile -q guile> class-of # guile> (class-of 1) Segmentation fault ; only if display'd % guile -q guile> (begin (class-of 1) (display "hello") (newline)) hello ; it's a true value guile> (if (class-of 1) (display #t) (display #f)) (newline) #t guile> ; immediate code % guile -c 'class-of' % guile -c '(display class-of)' # x (class-of 1) % guile -s x % % cat > x (display (class-of 1)) % guile -s x Segmentation fault ; --debug has no effect % guile --debug -c '(display (class-of 1))' Segmentation fault % Backtrace: I don't know when/why core files are created. This doesn't seem to leave a core file (neither in ~ or cwd). % gdb guile gdb guile GNU gdb 6.2.1 Copyright 2004 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 "i586-suse-linux"...(no debugging symbols found)...Using host libthread_db library "/lib/tls/libthread_db.so.1". (gdb) run -c '(display (class-of 1))' Starting program: /usr/bin/guile -c '(display (class-of 1))' (no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...[Thread debugging using libthread_db enabled] [New Thread 1076195456 (LWP 9267)] (no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)... Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 1076195456 (LWP 9267)] 0x400863c0 in scm_iprin1 () from /usr/lib/libguile.so.12 (gdb) bt #0 0x400863c0 in scm_iprin1 () from /usr/lib/libguile.so.12 #1 0x40087220 in scm_prin1 () from /usr/lib/libguile.so.12 #2 0x40087683 in scm_display () from /usr/lib/libguile.so.12 #3 0x4005678d in scm_ceval () from /usr/lib/libguile.so.12 #4 0x400526b2 in scm_i_eval_x () from /usr/lib/libguile.so.12 #5 0x4005d79c in scm_primitive_eval_x () from /usr/lib/libguile.so.12 #6 0x40098378 in inner_eval_string () from /usr/lib/libguile.so.12 #7 0x4005edbc in scm_c_with_fluids () from /usr/lib/libguile.so.12 #8 0x4005eec9 in scm_c_with_fluid () from /usr/lib/libguile.so.12 #9 0x40076a85 in scm_c_call_with_current_module () from /usr/lib/libguile.so.12 #10 0x400986ca in scm_eval_string () from /usr/lib/libguile.so.12 #11 0x4005631a in scm_ceval () from /usr/lib/libguile.so.12 #12 0x400555be in scm_ceval () from /usr/lib/libguile.so.12 #13 0x400526b2 in scm_i_eval_x () from /usr/lib/libguile.so.12 #14 0x4005d79c in scm_primitive_eval_x () from /usr/lib/libguile.so.12 #15 0x4005d7fd in inner_eval_x () from /usr/lib/libguile.so.12 #16 0x4004c785 in scm_internal_dynamic_wind () from /usr/lib/libguile.so.12 #17 0x40053f29 in scm_eval_x () from /usr/lib/libguile.so.12 #18 0x4008e99f in scm_shell () from /usr/lib/libguile.so.12 #19 0x400709e8 in scm_boot_guile () from /usr #20 0x080489f9 in main () (gdb) 'strace' doesn't look helpful: % strace guile -c '(display (class-of 1))' ... open("/usr/share/guile/1.6/ice-9/rdelim.scm", O_RDONLY) = 4 fcntl64(4, F_GETFL) = 0 (flags O_RDONLY) lseek(4, 0, SEEK_CUR) = 0 fstat64(4, {st_mode=S_IFREG|0644, st_size=6715, ...}) = 0 select(1024, [4], [], [], {0, 0}) = 1 (in [4], left {0, 0}) read(4, ";;; installed-scm-file\n\n;;;; Cop"..., 4096) = 4096 mmap2(NULL, 167936, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4027d000 select(1024, [4], [], [], {0, 0}) = 1 (in [4], left {0, 0}) read(4, "t (car args)))\n\t\t (set! args"..., 4096) = 2619 select(1024, [4], [], [], {0, 0}) = 1 (in [4], left {0, 0}) read(4, "", 4096) = 0 close(4) = 0 select(1024, [3], [], [], {0, 0}) = 1 (in [3], left {0, 0}) read(3, "", 4096) = 0 close(3) = 0 --- SIGSEGV (Segmentation fault) @ 0 (0) --- +++ killed by SIGSEGV +++ % strace guile -c '(class-of 1)' ... open("/usr/share/guile/1.6/ice-9/rdelim.scm", O_RDONLY) = 4 fcntl64(4, F_GETFL) = 0 (flags O_RDONLY) lseek(4, 0, SEEK_CUR) = 0 fstat64(4, {st_mode=S_IFREG|0644, st_size=6715, ...}) = 0 select(1024, [4], [], [], {0, 0}) = 1 (in [4], left {0, 0}) read(4, ";;; installed-scm-file\n\n;;;; Cop"..., 4096) = 4096 mmap2(NULL, 167936, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4027d 000 select(1024, [4], [], [], {0, 0}) = 1 (in [4], left {0, 0}) read(4, "t (car args)))\n\t\t (set! args"..., 4096) = 2619 select(1024, [4], [], [], {0, 0}) = 1 (in [4], left {0, 0}) read(4, "", 4096) = 0 close(4) = 0 select(1024, [3], [], [], {0, 0}) = 1 (in [3], left {0, 0}) read(3, "", 4096) = 0 close(3) = 0 exit_group(0) = ? -- Alan Grover awgrover@mail.msen.com +1.734.476.0969 --------------enigE44C79460FEB8B746F8BF848 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCwAt/bLLh2VB0r2ARAjCzAJ93qA7RozYV/fXkuzxHOzwPcF3EbACeISs6 rPhtmeYc0HZ1me9vY6VPfVA= =Bnop -----END PGP SIGNATURE----- --------------enigE44C79460FEB8B746F8BF848-- --===============0823884461== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Bug-guile mailing list Bug-guile@gnu.org http://lists.gnu.org/mailman/listinfo/bug-guile --===============0823884461==--