From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Newsgroups: gmane.lisp.guile.bugs Subject: bug#13074: VM Segfaults with Bad `Call' Instruction Date: Wed, 05 Dec 2012 15:10:10 +0100 Message-ID: <87hao0r3nh.fsf@gnu.org> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1354716665 6863 80.91.229.3 (5 Dec 2012 14:11:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 5 Dec 2012 14:11:05 +0000 (UTC) Cc: 13074@debbugs.gnu.org To: Noah Lavine Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Wed Dec 05 15:11:18 2012 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TgFgx-0004yf-Tm for guile-bugs@m.gmane.org; Wed, 05 Dec 2012 15:11:16 +0100 Original-Received: from localhost ([::1]:52527 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TgFgl-0004io-Ux for guile-bugs@m.gmane.org; Wed, 05 Dec 2012 09:11:03 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:50332) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TgFge-0004id-Jy for bug-guile@gnu.org; Wed, 05 Dec 2012 09:11:02 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TgFgc-0007Ym-MQ for bug-guile@gnu.org; Wed, 05 Dec 2012 09:10:56 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:44212) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TgFgc-0007YW-J1 for bug-guile@gnu.org; Wed, 05 Dec 2012 09:10:54 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TgFgj-00080D-Iv for bug-guile@gnu.org; Wed, 05 Dec 2012 09:11:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-guile@gnu.org Resent-Date: Wed, 05 Dec 2012 14:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13074 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Original-Received: via spool by 13074-submit@debbugs.gnu.org id=B13074.135471662930721 (code B ref 13074); Wed, 05 Dec 2012 14:11:01 +0000 Original-Received: (at 13074) by debbugs.gnu.org; 5 Dec 2012 14:10:29 +0000 Original-Received: from localhost ([127.0.0.1]:54463 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TgFgB-0007zR-IL for submit@debbugs.gnu.org; Wed, 05 Dec 2012 09:10:28 -0500 Original-Received: from mail1-relais-roc.national.inria.fr ([192.134.164.82]:19818) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TgFg8-0007zG-CA for 13074@debbugs.gnu.org; Wed, 05 Dec 2012 09:10:25 -0500 X-IronPort-AV: E=Sophos;i="4.84,221,1355094000"; d="scan'208";a="184732618" Original-Received: from reverse-83.fdn.fr (HELO pluto) ([80.67.176.83]) by mail1-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES128-SHA; 05 Dec 2012 15:10:10 +0100 In-Reply-To: (Noah Lavine's message of "Tue, 4 Dec 2012 22:26:52 -0500") User-Agent: Gnus/5.130005 (Ma Gnus v0.5) Emacs/24.2 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:6640 Archived-At: Hi Noah, Noah Lavine skribis: > diff --git a/libguile/vm-i-system.c b/libguile/vm-i-system.c > index 7153ab5..dff2ab2 100644 > --- a/libguile/vm-i-system.c > +++ b/libguile/vm-i-system.c > @@ -793,7 +793,9 @@ VM_DEFINE_INSTRUCTION (55, call, "call", 1, -1, 1) > > VM_HANDLE_INTERRUPTS; > > - if (SCM_UNLIKELY (!SCM_PROGRAM_P (program))) > + if (SCM_UNLIKELY (program =3D=3D NULL)) > + goto vm_error_bad_instruction; > + else if (SCM_UNLIKELY (!SCM_PROGRAM_P (program))) > { > if (SCM_STRUCTP (program) && SCM_STRUCT_APPLICABLE_P (program)) > { I=E2=80=99d rather not apply it, because it adds overhead for every call fo= r a situation that cannot happen when using Guile=E2=80=99s compiler, IIUC. WDYT? Thanks, Ludo=E2=80=99.