From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Christopher Allan Webber Newsgroups: gmane.lisp.guile.bugs Subject: bug#23404: Infinite recursion in GOOPS in Guile 2.2 Date: Fri, 29 Apr 2016 19:27:56 -0500 Message-ID: <87wpngx7n7.fsf@dustycloud.org> 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 1461976194 21808 80.91.229.3 (30 Apr 2016 00:29:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 30 Apr 2016 00:29:54 +0000 (UTC) To: 23404@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Sat Apr 30 02:29:42 2016 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 1awImz-0001K9-Ng for guile-bugs@m.gmane.org; Sat, 30 Apr 2016 02:29:41 +0200 Original-Received: from localhost ([::1]:56884 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1awIms-0005hv-Mb for guile-bugs@m.gmane.org; Fri, 29 Apr 2016 20:29:34 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53143) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1awIma-0005HF-TX for bug-guile@gnu.org; Fri, 29 Apr 2016 20:29:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1awImP-0001ZN-7f for bug-guile@gnu.org; Fri, 29 Apr 2016 20:29:11 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:43880) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1awImP-0001Ww-4y for bug-guile@gnu.org; Fri, 29 Apr 2016 20:29:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1awImL-0000pE-Nv for bug-guile@gnu.org; Fri, 29 Apr 2016 20:29:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Christopher Allan Webber Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Sat, 30 Apr 2016 00:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 23404 X-GNU-PR-Package: guile X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-guile@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.14619761343155 (code B ref -1); Sat, 30 Apr 2016 00:29:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 30 Apr 2016 00:28:54 +0000 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.lisp.guile.bugs:8003 Archived-At: 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