From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 29 20:28:54 2016 Received: (at submit) by debbugs.gnu.org; 30 Apr 2016 00:28:54 +0000 Received: from localhost ([127.0.0.1]:56217 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1awImE-0000oo-CC for submit@debbugs.gnu.org; Fri, 29 Apr 2016 20:28:54 -0400 Received: from eggs.gnu.org ([208.118.235.92]:33621) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1awImC-0000oa-VC for submit@debbugs.gnu.org; Fri, 29 Apr 2016 20:28:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1awIlx-0001Dp-Ae for submit@debbugs.gnu.org; Fri, 29 Apr 2016 20:28:43 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:40575) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1awIlx-0001Al-7j for submit@debbugs.gnu.org; Fri, 29 Apr 2016 20:28:37 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52511) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1awIll-00048G-EH for bug-guile@gnu.org; Fri, 29 Apr 2016 20:28:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1awIlX-0000ub-Ig for bug-guile@gnu.org; Fri, 29 Apr 2016 20:28:17 -0400 Received: from dustycloud.org ([50.116.34.160]:60944) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1awIlX-0000nm-Eb for bug-guile@gnu.org; Fri, 29 Apr 2016 20:28:11 -0400 Received: from oolong (localhost [127.0.0.1]) by dustycloud.org (Postfix) with ESMTPS id CB4A8266FB for ; Fri, 29 Apr 2016 20:27:56 -0400 (EDT) User-agent: mu4e 0.9.13; emacs 24.5.1 From: Christopher Allan Webber To: bug-guile@gnu.org Subject: Infinite recursion in GOOPS in Guile 2.2 Date: Fri, 29 Apr 2016 19:27:56 -0500 Message-ID: <87wpngx7n7.fsf@dustycloud.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) Heya all, So I've been building something with GOOPS, and I decided to try it out with Guile 2.2. Unfortunately, I hit a pretty nasty bug. You can try it yourself... the code is pretty short: (use-modules (oop goops) (srfi srfi-9)) (define-class ()) (define-method (time-to-break (some-class ) not-a-class) (display "We're never going home are we?\n")) ;; And now, call it (time-to-break (make ) 1) This will loop forever and *never* complete. Why? Turns out this is why, from goops.scm: (define (single-arity-cache-dispatch cache nargs cache-miss) (match cache (() cache-miss) (((typev . cmethod) . cache) (cond ((eqv? nargs (vector-length typev)) (let ((cache-miss (single-arity-cache-dispatch cache nargs cache= -miss))) I'm not sure what was supposed to happen (presumably the cache was supposed to be narrowed down somehow), but what happens here is that single-arity-cache-dispatch keeps calling single-arity-cache-dispatch forever. scheme@(guile-user) [1]> ,bt In oop/goops.scm: 1437:41939 (cache-miss #< e8a1e0> #< id: "5c787e65bbeb3= 4b27ffd16eead286fc6:1" to: ("8394701db8=E2=80=A6>) 1486:41938 (memoize-effective-method! _ _ _) 1466:131937 (recompute-generic-function-dispatch-procedure! #<= hive-process-message (1)>) 1452:161936 (compute-generic-function-dispatch-procedure _) 1378:251935 (single-arity-cache-dispatch _ 2 _) 1378:251934 (single-arity-cache-dispatch _ 2 _) 1378:251933 (single-arity-cache-dispatch _ 2 _) 1378:251932 (single-arity-cache-dispatch _ 2 _) 1378:251931 (single-arity-cache-dispatch _ 2 _) 1378:251930 (single-arity-cache-dispatch _ 2 _) 1378:251929 (single-arity-cache-dispatch _ 2 _) 1378:251928 (single-arity-cache-dispatch _ 2 _) 1378:251927 (single-arity-cache-dispatch _ 2 _) 1378:251926 (single-arity-cache-dispatch _ 2 _) 1378:251925 (single-arity-cache-dispatch _ 2 _) 1378:251924 (single-arity-cache-dispatch _ 2 _) ... etc ... (g?)Oops! - Chris From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 29 22:26:55 2016 Received: (at 23404) by debbugs.gnu.org; 30 Apr 2016 02:26:55 +0000 Received: from localhost ([127.0.0.1]:56267 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1awKcR-00056D-Mq for submit@debbugs.gnu.org; Fri, 29 Apr 2016 22:26:55 -0400 Received: from dustycloud.org ([50.116.34.160]:37862) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1awKcP-000564-KB for 23404@debbugs.gnu.org; Fri, 29 Apr 2016 22:26:53 -0400 Received: from oolong (localhost [127.0.0.1]) by dustycloud.org (Postfix) with ESMTPS id 93096266FB for <23404@debbugs.gnu.org.>; Fri, 29 Apr 2016 22:26:52 -0400 (EDT) User-agent: mu4e 0.9.13; emacs 24.5.1 From: Christopher Allan Webber To: 23404@debbugs.gnu.org Subject: Re: Infinite recursion in GOOPS in Guile 2.2 Date: Fri, 29 Apr 2016 21:26:52 -0500 Message-ID: <87vb2zygpf.fsf@dustycloud.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.0 (-) X-Debbugs-Envelope-To: 23404 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) It looks like my example was incomplete. It turns out loading and passing in an srfi-9 record is critical to instantiating the bug. Why? I'm not sure... (use-modules (oop goops) (srfi srfi-9)) (define-class ()) (define-record-type (make-some-record foo) some-record? (foo some-record-foo)) (define-method (time-to-break (some-class ) not-a-class) (display "We're never going home are we?\n")) ;; Now it'll break (time-to-break (make ) (make-some-record 1)) From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 29 22:27:22 2016 Received: (at 23404) by debbugs.gnu.org; 30 Apr 2016 02:27:22 +0000 Received: from localhost ([127.0.0.1]:56271 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1awKcr-00057G-TU for submit@debbugs.gnu.org; Fri, 29 Apr 2016 22:27:22 -0400 Received: from dustycloud.org ([50.116.34.160]:37870) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1awKcr-000579-7k for 23404@debbugs.gnu.org; Fri, 29 Apr 2016 22:27:21 -0400 Received: from oolong (localhost [127.0.0.1]) by dustycloud.org (Postfix) with ESMTPS id E39EC266FB for <23404@debbugs.gnu.org>; Fri, 29 Apr 2016 22:27:20 -0400 (EDT) User-agent: mu4e 0.9.13; emacs 24.5.1 From: Christopher Allan Webber To: 23404@debbugs.gnu.org Subject: Re: Infinite recursion in GOOPS in Guile 2.2 Date: Fri, 29 Apr 2016 21:27:20 -0500 Message-ID: <87twijygon.fsf@dustycloud.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.0 (-) X-Debbugs-Envelope-To: 23404 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) It looks like my example was incomplete. It turns out loading and passing in an srfi-9 record is critical to instantiating the bug. Why? I'm not sure... (use-modules (oop goops) (srfi srfi-9)) (define-class ()) (define-record-type (make-some-record foo) some-record? (foo some-record-foo)) (define-method (time-to-break (some-class ) not-a-class) (display "We're never going home are we?\n")) ;; Now it'll break (time-to-break (make ) (make-some-record 1)) From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 28 10:12:59 2017 Received: (at 23404-done) by debbugs.gnu.org; 28 Feb 2017 15:13:00 +0000 Received: from localhost ([127.0.0.1]:60401 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cijSV-0001CG-O3 for submit@debbugs.gnu.org; Tue, 28 Feb 2017 10:12:59 -0500 Received: from pb-sasl2.pobox.com ([64.147.108.67]:61190 helo=sasl.smtp.pobox.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cijSU-0001C9-1M for 23404-done@debbugs.gnu.org; Tue, 28 Feb 2017 10:12:58 -0500 Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-sasl2.pobox.com (Postfix) with ESMTP id E41A15F4B7; Tue, 28 Feb 2017 10:12:54 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=ASLHTkZ7c6WClN/zjT7a1LOdqW0=; b=qt6DB+ deVkKAk03mtf5wXpL2ZbGAuDK4t2IYUgqaPY4Io+gSYl4FGEzOOENsej6/r+O++Z 1+JsrR4Zq6jOS7FHg4B3a3W+dhj9eJhPfCK4UG6Rv1vsVY08u7uf18c6mLCHlV1N 2kfBYTy4PDK0iVyX2H6SKrLx9y3Nsjk3l18/Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=py5+SCN8tebIfIjxOgRJJCx/YuKEAtg6 NRUM419rc4nsV5iNRGPsKnEQn768vTOfSbleQqBoxVSDbZjXYZY5cj5+1Daj1bYc o0BkQuGTX500MZJY2Q24x3NmmO32rs9+rjFhICSO31E8LCxPv3hnZ6XD3h7R9aIt t9V5aOfdY60= Received: from pb-sasl2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-sasl2.pobox.com (Postfix) with ESMTP id DC4815F4B6; Tue, 28 Feb 2017 10:12:54 -0500 (EST) Received: from clucks (unknown [88.160.190.192]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pb-sasl2.pobox.com (Postfix) with ESMTPSA id F2D685F4B4; Tue, 28 Feb 2017 10:12:53 -0500 (EST) From: Andy Wingo To: Christopher Allan Webber Subject: Re: bug#23404: Infinite recursion in GOOPS in Guile 2.2 References: <87wpngx7n7.fsf@dustycloud.org> <87twijygon.fsf@dustycloud.org> Date: Tue, 28 Feb 2017 16:12:46 +0100 In-Reply-To: <87twijygon.fsf@dustycloud.org> (Christopher Allan Webber's message of "Fri, 29 Apr 2016 21:27:20 -0500") Message-ID: <87lgsql575.fsf@pobox.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: 60E6A8AC-FDC8-11E6-9D17-6141F2301B6D-02397024!pb-sasl2.pobox.com X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 23404-done Cc: 23404-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) On Sat 30 Apr 2016 04:27, Christopher Allan Webber writes: > It looks like my example was incomplete. It turns out loading and > passing in an srfi-9 record is critical to instantiating the bug. > > Why? I'm not sure... > > (use-modules (oop goops) > (srfi srfi-9)) > (define-class ()) > (define-record-type > (make-some-record foo) > some-record? > (foo some-record-foo)) > > (define-method (time-to-break (some-class ) not-a-class) > (display "We're never going home are we?\n")) > > ;; Now it'll break > (time-to-break (make ) (make-some-record 1)) This appears to be fixed, somehow (?). Please reopen if you can still produce the bug. Andy From unknown Thu Jun 19 16:22:29 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 29 Mar 2017 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator