From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Luca Saiu Newsgroups: gmane.lisp.guile.bugs Subject: Likely bug: SMOBs and mark functions [Was: Re: [bug #30480] VM: load looks for files in the wrong directory] Date: Tue, 15 Feb 2011 12:59:14 +0100 Message-ID: <4D5A6A92.1080702@gnu.org> References: <20100719-005153.sv1523.70961@savannah.gnu.org> <20100719-005459.sv1523.65271@savannah.gnu.org> <20100719-005950.sv1523.43708@savannah.gnu.org> <20100724-161608.sv15145.2405@savannah.gnu.org> <20110213-185123.sv20118.98931@savannah.gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1297771148 3467 80.91.229.12 (15 Feb 2011 11:59:08 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 15 Feb 2011 11:59:08 +0000 (UTC) Cc: bug-guile@gnu.org, =?UTF-8?B?THVkb3ZpYyBDb3VydMOocw==?= Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Tue Feb 15 12:59:02 2011 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PpJYb-0002BG-VF for guile-bugs@m.gmane.org; Tue, 15 Feb 2011 12:59:02 +0100 Original-Received: from localhost ([127.0.0.1]:37300 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PpJYb-0000zx-4I for guile-bugs@m.gmane.org; Tue, 15 Feb 2011 06:59:01 -0500 Original-Received: from [140.186.70.92] (port=51332 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PpJYT-0000zO-Jt for bug-guile@gnu.org; Tue, 15 Feb 2011 06:58:54 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PpJYS-0000bA-BO for bug-guile@gnu.org; Tue, 15 Feb 2011 06:58:53 -0500 Original-Received: from mail.lipn.univ-paris13.fr ([194.254.163.24]:45310) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PpJYS-0000an-0W; Tue, 15 Feb 2011 06:58:52 -0500 Original-Received: from [10.10.0.234] (optimum.lipn.univ-paris13.fr [10.10.0.234]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: saiu@lipn.univ-paris13.fr) by mail.lipn.univ-paris13.fr (sendmail 8.9.3/8.9.2) with ESMTP id 49A5222E02; Tue, 15 Feb 2011 12:58:51 +0100 (CET) User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.15) Gecko/20101030 Icedove/3.0.10 In-Reply-To: <20110213-185123.sv20118.98931@savannah.gnu.org> X-Enigmail-Version: 1.0.1 OpenPGP: id=26C5D286; url=http://www-lipn.univ-paris13.fr/~saiu/lucasaiu.asc X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 194.254.163.24 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:5134 Archived-At: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 02/13/2011 07:51 PM, Andy Wingo wrote: > Update of bug #30480 (project guile): > Fixed, by turning load into a macro that expands to a call to > load-in-vicinity. Nasty or awesome? We report, you decide! Awesome :-). This solves the load problem in my old testcase, but testing the new version helped me to expose another problem. My code uses SMOBs with explicit GC mark funcions, as it was written for Guile 1.8; seeing a segmentation fault occurring only in 1.9 made me suspect of some mistake of mine, related to using SMOBs in some unsafe way; but now I find this unlikely, and I think it's a real bug. I've reproduced the problem by using the example in doc/example-smob/ which is much simpler than my own code; the failure is identical. [luca@optimum ~/projects-by-others/guile-from-git-mainline/doc/example-smob]$ ./myguile GNU Guile 1.9.15.114-b81eb Copyright (C) 1995-2011 Free Software Foundation, Inc. Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'. This program is free software, and you are welcome to redistribute it under certain conditions; type `,show c' for details. Enter `,help' for help. scheme@(guile-user)> make-image $1 = # scheme@(guile-user)> (define i (make-image "Whistler's Mother" 100 100)) scheme@(guile-user)> i $2 = # scheme@(guile-user)> (gc) scheme@(guile-user)> (gc) The current thread is at (nil); Segmentation fault gdb says that the problem is in smob.c, in the smob_mark function: SCM_I_CURRENT_THREAD->current_mark_stack_ptr = mark_stack_ptr; A quick printf showed me that the SCM_I_CURRENT_THREAD macro returned NULL. This happens on an x86_64 GNU/Linux machine, guile from today's git; 1.8 doesn't crash. Thanks. 2.0 will seriously rock :-). - -- Luca Saiu http://www-lipn.univ-paris13.fr/~saiu GNU epsilon: http://www.gnu.org/software/epsilon Marionnet: http://www.marionnet.org -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk1aapIACgkQvzOavibF0ob0rgCdHiCCyk58RxY/B1/JqHXZSlcj CdgAn1Vo0hP/l0cgNPgZ+ei/tKaPSoQH =PDrt -----END PGP SIGNATURE-----