From unknown Sat Jun 14 00:09:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#31594: Code causes guild compile to hang Resent-From: Tommi =?UTF-8?Q?H=C3=B6yn=C3=A4l=C3=A4nmaa?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Fri, 25 May 2018 15:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 31594 X-GNU-PR-Package: guile X-GNU-PR-Keywords: To: 31594@debbugs.gnu.org X-Debbugs-Original-To: bug-guile@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.152726235530328 (code B ref -1); Fri, 25 May 2018 15:33:01 +0000 Received: (at submit) by debbugs.gnu.org; 25 May 2018 15:32:35 +0000 Received: from localhost ([127.0.0.1]:48568 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fMEhn-0007t6-7f for submit@debbugs.gnu.org; Fri, 25 May 2018 11:32:35 -0400 Received: from eggs.gnu.org ([208.118.235.92]:40396) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fMEhm-0007su-Ly for submit@debbugs.gnu.org; Fri, 25 May 2018 11:32:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fMEhg-0001QB-FE for submit@debbugs.gnu.org; Fri, 25 May 2018 11:32:29 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: * X-Spam-Status: No, score=1.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, FROM_EXCESS_BASE64,HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:53300) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fMEhg-0001Py-Bz for submit@debbugs.gnu.org; Fri, 25 May 2018 11:32:28 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59586) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fMEhe-0000U5-Tj for bug-guile@gnu.org; Fri, 25 May 2018 11:32:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fMEhd-0001Nb-OT for bug-guile@gnu.org; Fri, 25 May 2018 11:32:26 -0400 Received: from mail-it0-x234.google.com ([2607:f8b0:4001:c0b::234]:54645) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fMEhd-0001Mw-Is for bug-guile@gnu.org; Fri, 25 May 2018 11:32:25 -0400 Received: by mail-it0-x234.google.com with SMTP id z6-v6so7297377iti.4 for ; Fri, 25 May 2018 08:32:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=DBhemOg4OjOn6cNuZHdHF48RFUIeeFrWMuk/o8hEur4=; b=nNGysVGCEw94LYyhPVA1fTilFgdhqPlj4K+DJ2vVxd6YqLDzSmGakaNa3kzBla8fU7 6w8V/fMm1r4jcgRKVZn/YNIgNAV+6Kny8x9C6BTqEk6rekIC+MV8/Qg13adJyL5qE2fO NGUbo/il8CrRw1lA/9tns5JVhuWg2Aj+YoZLYeI+pPfcnqJX8bQiU+s82AQYoFv1Q/9N 8MPwoA39GAQxsS6iUPmB4+NqVbRJfTmTXNaIJuOdeYmB5XNs6gAoT8w5dnO4V00L8MTB d6uuhOdZDh0p7aAaPH9imcOL302YmOW4Jp5a7I7WmS4HOLwGBMKCsuL241u+wgR2nQhL JfHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=DBhemOg4OjOn6cNuZHdHF48RFUIeeFrWMuk/o8hEur4=; b=MMPQVM7o8OD+137G4N8OTnApuH8wEsbOUxC5MfROHAYPhlngtghLKeiWPcJAVGAIna 9kTLifeojeVU5UzaTQrNYIFvcyPbaTxELO9Wjw/0rCyGtiJj9tke5WJmGFG/n6nxGyVF YKe8Uwsr6X9uinPovXQBmXjJoNOQUVD9bwwEArz49XXs/mKll+AtCmGEq83L6MUPWGxh NA67jfcEKxc4nMi/rMsc4U8iacj0Z+cxAVGIu9G8FsriZszwdn6C6o2AT+fjMNTtvQ4y +IEi8Y85fNU8l/sl0l5FiJuCo2ARUpgLqpOWwS3DYH7jIAKclECFVmE0tmOH35BJ5/cf I5Lw== X-Gm-Message-State: ALKqPweSIJn4KVgdKVM01jTRMrb92T15dj34dSGv2NVnFl3hQ2/taSlO ORuyXErOjd/M0QXTN8Njk0NAjlxDYMgvXZAF1Mrk X-Google-Smtp-Source: ADUXVKKWcXofza/9aJKqKiKPwNG/C5wPBvwzgq8RD4/qk/fkLeqoyvIC+1+wowc8fTxiBtdzCBQ/TgeEAKMQXLC5hQQ= X-Received: by 2002:a24:42c6:: with SMTP id i189-v6mr2494672itb.73.1527262344734; Fri, 25 May 2018 08:32:24 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a02:9008:0:0:0:0:0 with HTTP; Fri, 25 May 2018 08:32:24 -0700 (PDT) From: Tommi =?UTF-8?Q?H=C3=B6yn=C3=A4l=C3=A4nmaa?= Date: Fri, 25 May 2018 18:32:24 +0300 Message-ID: Content-Type: multipart/alternative; boundary="000000000000896d3f056d097967" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -3.9 (---) 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.9 (----) --000000000000896d3f056d097967 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable The following code causes command "guild compile" to hang: ---cut here--- (define (select-nearest-methods binder index v-fixed-args v-rest-arg vb-included) (dwl4 "select-nearest-methods") (assert (is-binder? binder)) (let ((n (vector-length vb-included))) (do ((i 0 (+ i 1))) ((>=3D i n)) (if (vector-ref vb-included i) (let ((t1 (get-item-at-index (vector-ref v-fixed-args i) (vector-ref v-rest-arg i) index))) (do ((j 0 (+ j 1))) ((>=3D j n)) (if (and (not (=3D i j)) (vector-ref vb-included j)) (let ((t2 (get-item-at-index (vector-ref v-fixed-args j) (vector-ref v-rest-arg j) index))) (if (is-t-subtype? binder t1 t2) ;; t2 is excluded (vector-set! vb-included j #f)))))))))) ---cut here--- However, the following code works fine: ---cut here--- (define (method-loop binder index v-fixed-args v-rest-arg vb-included t1 i n) (do ((j 0 (+ j 1))) ((>=3D j n)) (if (and (not (=3D i j)) (vector-ref vb-included j)) (let ((t2 (get-item-at-index (vector-ref v-fixed-args j) (vector-ref v-rest-arg j) index))) (if (is-t-subtype? binder t1 t2) ;; t2 is excluded (vector-set! vb-included j #f)))))) (define (select-nearest-methods binder index v-fixed-args v-rest-arg vb-included) (dwl4 "select-nearest-methods") (assert (is-binder? binder)) (let ((n (vector-length vb-included))) (do ((i 0 (+ i 1))) ((>=3D i n)) (if (vector-ref vb-included i) (let ((t1 (get-item-at-index (vector-ref v-fixed-args i) (vector-ref v-rest-arg i) index))) (method-loop binder index v-fixed-args v-rest-arg vb-included t1 i n)))))) ---cut here--- This problem occurs with guile 2.2.3. - Tommi H=C3=B6yn=C3=A4l=C3=A4nmaa --000000000000896d3f056d097967 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: base64 PGRpdiBkaXI9Imx0ciI+PGRpdj5UaGUgZm9sbG93aW5nIGNvZGUgY2F1c2VzIGNvbW1hbmQgJnF1 b3Q7Z3VpbGQgY29tcGlsZSZxdW90OyB0byBoYW5nOjwvZGl2PjxkaXY+LS0tY3V0I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XY+PGRpdj4tLS1jdXQgaGVyZS0tLTwvZGl2PjxkaXY+ PGJyPjwvZGl2PjxkaXY+VGhpcyBwcm9ibGVtIG9jY3VycyB3aXRoIGd1aWxlIDIuMi4zLjwvZGl2 PjxkaXY+PGJyPjwvZGl2PjxkaXY+wqDCoMKgwqAgLSBUb21taSBIw7Z5bsOkbMOkbm1hYTwvZGl2 PjxkaXY+PGJyPjwvZGl2PjwvZGl2Pg0K --000000000000896d3f056d097967-- From unknown Sat Jun 14 00:09:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#31594: Information on my system References: In-Reply-To: Resent-From: Tommi =?UTF-8?Q?H=C3=B6yn=C3=A4l=C3=A4nmaa?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Sun, 27 May 2018 13:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 31594 X-GNU-PR-Package: guile X-GNU-PR-Keywords: To: 31594@debbugs.gnu.org Received: via spool by 31594-submit@debbugs.gnu.org id=B31594.152742628013012 (code B ref 31594); Sun, 27 May 2018 13:05:02 +0000 Received: (at 31594) by debbugs.gnu.org; 27 May 2018 13:04:40 +0000 Received: from localhost ([127.0.0.1]:50216 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fMvLk-0003Nn-3F for submit@debbugs.gnu.org; Sun, 27 May 2018 09:04:40 -0400 Received: from mail-wr0-f175.google.com ([209.85.128.175]:41015) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fMvLh-0003Nb-Pl for 31594@debbugs.gnu.org; Sun, 27 May 2018 09:04:38 -0400 Received: by mail-wr0-f175.google.com with SMTP id u12-v6so16106128wrn.8 for <31594@debbugs.gnu.org>; Sun, 27 May 2018 06:04:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:from:subject:message-id:date:user-agent:mime-version :content-transfer-encoding:content-language; bh=8W1Qk1a9GjMAShaynmmyhwRxg2WMbMdC5mwbfrtqrS8=; b=oYRcOr0bYO+HX39NycSnDHN+M257/oOXIO4ks0HpPgHk5SW/9gg5Ie1yfZp+2/Lxpn OhL31wUZns4BbNZR0fCBFMvpjoWcT/jsXW5chGQkZOp8GGqlbyWo4UjkUW4X6Qqwwb9e X5RcPkv7YvEQ2ccanw1mD1O8wzh0YxYJ5egWHZZRItClh80wc1VMc2jb1G6+CdwfyWJN IapaXgIPhhoHqORlmk9oNLUne2LTjfAVNQKMObkYbZkSS9lV5BXXyr3Bqka5Mf8mzOnI L/D3JM3aIGRFIQ8uFaUmjD3K8jl7RZPKn9WUAj3TlosTvctaiiST/qPgJ4eSC7rG2XV6 y7aQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-transfer-encoding:content-language; bh=8W1Qk1a9GjMAShaynmmyhwRxg2WMbMdC5mwbfrtqrS8=; b=ezN7L7nYR38wrQf3H77wCjtmSPEBIb2Z7hIEdLJYkN0fytGbzZ2R7sl6DWiJjzfJLi 7Nvzfk/W65xWLzmea8Bc3TDVi+gTjhGByDQrhZPVrJ/1NPlclx2tJOuzHQ6HAkW67Zok eK5m3+p9KEe4KN7aQ5Xg5UcqnqTYGmlplKunPAVekxsoByc4bIPDPCYiNaVKSXJSibs4 tQJyzUeLRhfe/tr627iVgdJ5YrCvS2Cwz7nNUuI8Tk2cIonql/vkzdpML7QVWcF9ffNq eGT6ixDYj3N5rIPogv7rFltFF7/Efo+oUCrSW5Wwq9AeviAUjgRGTZjn3SM9Tgm7NNmZ bINQ== X-Gm-Message-State: ALKqPwelptucJuYw/PWp45x2Afc2j7VSUeOSI5VK7wk61D26ZD2EDn2P 0GyDO/VDsomBkacJrUr7omR6tNw= X-Google-Smtp-Source: ADUXVKLfhcZk7YifBPDgrdJHg3C6K/lUsrHdLP1Yees9/ZV81X6o9dvmgW953Fia5V81CxeLLCid+g== X-Received: by 2002:a19:7d05:: with SMTP id y5-v6mr5193783lfc.95.1527426271798; Sun, 27 May 2018 06:04:31 -0700 (PDT) Received: from [192.168.43.172] (37-219-225-112.nat.bb.dnainternet.fi. [37.219.225.112]) by smtp.gmail.com with ESMTPSA id g62-v6sm1157245lfk.54.2018.05.27.06.04.30 for <31594@debbugs.gnu.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 27 May 2018 06:04:31 -0700 (PDT) From: Tommi =?UTF-8?Q?H=C3=B6yn=C3=A4l=C3=A4nmaa?= Message-ID: Date: Sun, 27 May 2018 16:04:30 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Spam-Score: -1.6 (-) 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: -2.6 (--) I use Ubuntu 18.04 and I have the following Guile packages installed in my system: guile-2.2: 2.2.3+1-3build1 guile-2.2-dev: 2.2.3+1-3build1 guile-2.2-doc: 2.2.3+1-3build1 guile-2.2-libs: 2.2.3+1-3build1 guile-2.0: 2.0.13+1-5build2 guile-2.0-doc: 2.0.13+1-5build2 guile-2.0-libs: 2.0.13+1-5build2 Package guile-2.0-dev is not installed. I have selected guile-2.2 to be used with update-alternatives.      - Tommi Höynälänmaa From unknown Sat Jun 14 00:09:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#31594: Code causes guild compile to hang Resent-From: Mark H Weaver Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Tue, 05 Jun 2018 22:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 31594 X-GNU-PR-Package: guile X-GNU-PR-Keywords: To: Tommi =?UTF-8?Q?H=C3=B6yn=C3=A4l=C3=A4nmaa?= Cc: 31594@debbugs.gnu.org Received: via spool by 31594-submit@debbugs.gnu.org id=B31594.152823618028357 (code B ref 31594); Tue, 05 Jun 2018 22:03:02 +0000 Received: (at 31594) by debbugs.gnu.org; 5 Jun 2018 22:03:00 +0000 Received: from localhost ([127.0.0.1]:35550 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fQK2d-0007NI-1x for submit@debbugs.gnu.org; Tue, 05 Jun 2018 18:03:00 -0400 Received: from world.peace.net ([64.112.178.59]:50942) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fQK2b-0007N5-Mx for 31594@debbugs.gnu.org; Tue, 05 Jun 2018 18:02:58 -0400 Received: from mhw by world.peace.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1fQK2U-0006Su-U2; Tue, 05 Jun 2018 18:02:51 -0400 From: Mark H Weaver References: Date: Tue, 05 Jun 2018 18:01:34 -0400 In-Reply-To: ("Tommi \=\?utf-8\?B\?SMO2eW7DpGzDpG5tYWEiJ3M\=\?\= message of "Fri, 25 May 2018 18:32:24 +0300") Message-ID: <87efhk3nb5.fsf@netris.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) 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 (-) Hi, Tommi H=C3=B6yn=C3=A4l=C3=A4nmaa writes: > The following code causes command "guild compile" to hang: > ---cut here--- > (define (select-nearest-methods binder > index v-fixed-args v-rest-arg vb-included) > (dwl4 "select-nearest-methods") > (assert (is-binder? binder)) > (let ((n (vector-length vb-included))) > (do ((i 0 (+ i 1))) ((>=3D i n)) > (if (vector-ref vb-included i) > (let ((t1 (get-item-at-index > (vector-ref v-fixed-args i) > (vector-ref v-rest-arg i) > index))) > (do ((j 0 (+ j 1))) ((>=3D j n)) > (if (and (not (=3D i j)) > (vector-ref vb-included j)) > (let ((t2 (get-item-at-index > (vector-ref v-fixed-args j) > (vector-ref v-rest-arg j) > index))) > (if (is-t-subtype? binder t1 t2) > ;; t2 is excluded > (vector-set! vb-included j #f)))))))))) > ---cut here--- I can reproduce this with Guile-2.2.3 on my system running GuixSD. Simply pasting the above code into a pristine Guile REPL causes it to hang. I'm able to compile it to cps, but compiling it to bytecode gets stuck in what appears to be an infinite loop in 'specialize-operations' in (language cps specialize-numbers). The backtrace printer also gets stuck in a loop while trying to print one of the stack frames in (language cps specialize-numbers). See below for a transcript. Thanks for the report. To be continued... Mark --8<---------------cut here---------------start------------->8--- GNU Guile 2.2.3 Copyright (C) 1995-2017 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)> (define (select-nearest-methods binder index v-fixed-args v-rest-arg vb-included) (dwl4 "select-nearest-methods") (assert (is-binder? binder)) (let ((n (vector-length vb-included))) (do ((i 0 (+ i 1))) ((>=3D i n)) (if (vector-ref vb-included i) (let ((t1 (get-item-at-index (vector-ref v-fixed-args i) (vector-ref v-rest-arg i) index))) (do ((j 0 (+ j 1))) ((>=3D j n)) (if (and (not (=3D i j)) (vector-ref vb-included j)) (let ((t2 (get-item-at-index (vector-ref v-fixed-args j) (vector-ref v-rest-arg j) index))) (if (is-t-subtype? binder t1 t2) ;; t2 is excluded (vector-set! vb-included j #f)))))))))) ;;; :6:2: warning: possibly unbound variable `dwl4' ;;; :7:2: warning: possibly unbound variable `assert' ;;; :7:10: warning: possibly unbound variable `is-binder?' ;;; :11:16: warning: possibly unbound variable `get-item-at-index' ;;; :18:20: warning: possibly unbound variable `get-item-at-index' ;;; :22:16: warning: possibly unbound variable `is-t-subtype?' While compiling expression: User interrupt scheme@(guile-user)> ,use (system base compile) scheme@(guile-user)> (define code '(define (select-nearest-methods binder index v-fixed-args v-rest-arg vb-included) (dwl4 "select-nearest-methods") (assert (is-binder? binder)) (let ((n (vector-length vb-included))) (do ((i 0 (+ i 1))) ((>=3D i n)) (if (vector-ref vb-included i) (let ((t1 (get-item-at-index (vector-ref v-fixed-args i) (vector-ref v-rest-arg i) index))) (do ((j 0 (+ j 1))) ((>=3D j n)) (if (and (not (=3D i j)) (vector-ref vb-included j)) (let ((t2 (get-item-at-index (vector-ref v-fixed-args j) (vector-ref v-rest-arg j) index))) (if (is-t-subtype? binder t1 t2) ;; t2 is excluded (vector-set! vb-included j #f))))))))))) scheme@(guile-user)> ,pp code $2 =3D (define (select-nearest-methods binder index v-fixed-args v-rest-arg vb-included) (dwl4 "select-nearest-methods") (assert (is-binder? binder)) (let ((n (vector-length vb-included))) (do ((i 0 (+ i 1))) ((>=3D i n)) (if (vector-ref vb-included i) (let ((t1 (get-item-at-index (vector-ref v-fixed-args i) (vector-ref v-rest-arg i) index))) (do ((j 0 (+ j 1))) ((>=3D j n)) (if (and (not (=3D i j)) (vector-ref vb-included j)) (let ((t2 (get-item-at-index (vector-ref v-fixed-args j) (vector-ref v-rest-arg j) index))) (if (is-t-subtype? binder t1 t2) (vector-set! vb-included j #f)))))))))) scheme@(guile-user)> (define v (compile code #:from 'scheme #:to 'cps)) scheme@(guile-user)> v $3 =3D # scheme@(guile-user)> (define intmap->alist (@@ (language cps intmap) intmap= ->alist)) scheme@(guile-user)> ,pp (intmap->alist v) $4 =3D ((0 . #) (1 . #) (2 . #) (3 . #) (4 . #) (5 . #) (6 . #) (7 . #) (8 . #) (9 . #) (10 . #) (11 . #) (12 . #) (13 . #) (14 . #) (15 . #) (16 . #) (17 . #) (18 . #) (19 . #) (20 . #) (21 . #) (22 . #) (23 . #) (24 . #) (25 . #) (26 . #u64 11)))>) (27 . #) (28 . #) (29 . #) (30 . #) (31 . #) (32 . #) (33 . #) (34 . #) (35 . #) (36 . #) (37 . #) (38 . #) (39 . #) (40 . #) (41 . #) (42 . #u64 11)))>) (43 . #) (44 . #u64 11)))>) (45 . #) (46 . #) (47 . #) (48 . #) (49 . #) (50 . #) (51 . #) (52 . #) (53 . #) (54 . #) (55 . #) (56 . #) (57 . #) (58 . #u64 11)))>) (59 . #) (60 . #) (61 . #=3D 11 6)))= )>) (62 . #) (63 . #) (64 . #) (65 . #) (66 . #) (67 . #) (68 . #) (69 . #) (70 . #u64 8)))>) (71 . #) (72 . #u64 8)))>) (73 . #) (74 . #) (75 . #) (76 . #) (77 . #) (78 . #) (79 . #) (80 . #) (81 . #) (82 . #) (83 . #) (84 . #) (85 . #u64 8)))>) (86 . #=3D 8 6))))>) (87 . #) (88 . #) (89 . #) (90 . #) (91 . #scm 73)))>) (92 . #) (93 . #) (94 . #) (95 . #) (96 . #) (97 . #) (98 . #) (99 . #) (100 . #) (101 . #) (102 . #) (103 . #) (104 . #) (105 . #) (106 . #) (107 . #) (108 . #) (109 . #) (110 . #) (111 . #) (112 . #) (113 . #) (114 . #) (115 . #) (116 . #) (117 . #) (118 . #) (119 . #) (120 . #) (121 . #) (122 . #)) scheme@(guile-user)> (define vb (compile code #:from 'scheme #:to 'bytecode= )) ERROR: In procedure scm-error: User interrupt Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue. scheme@(guile-user) [1]> ,bt In current input: 82:11 13 (_) In system/base/compile.scm: 255:6 12 (compile _ #:from _ #:to _ #:env _ #:opts _) 183:32 11 (compile-fold _ _ _ ()) In language/cps/compile-bytecode.scm: 609:12 10 (compile-bytecode _ # ()) 603:12 9 (lower-cps _ _) In language/cps/optimize.scm: 106:0 8 (optimize-first-order-cps _ _) In language/cps/specialize-numbers.scm: 724:23 7 (specialize-numbers _) 438:10 6 (specialize-operations _) In language/cps/intmap.scm: 521:5 5 (visit-branch #(#(# # # =E2=80=A6) =E2=80=A6) =E2=80=A6) 521:5 4 (visit-branch #(# # # #= =E2=80=A6) =E2=80=A6) In language/cps/specialize-numbers.scm: --8<---------------cut here---------------end--------------->8--- From unknown Sat Jun 14 00:09:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#31594: Code causes guild compile to hang Resent-From: Mark H Weaver Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Wed, 06 Jun 2018 02:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 31594 X-GNU-PR-Package: guile X-GNU-PR-Keywords: To: Tommi =?UTF-8?Q?H=C3=B6yn=C3=A4l=C3=A4nmaa?= Cc: 31594@debbugs.gnu.org Received: via spool by 31594-submit@debbugs.gnu.org id=B31594.15282519097394 (code B ref 31594); Wed, 06 Jun 2018 02:26:02 +0000 Received: (at 31594) by debbugs.gnu.org; 6 Jun 2018 02:25:09 +0000 Received: from localhost ([127.0.0.1]:35740 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fQO8K-0001vB-QD for submit@debbugs.gnu.org; Tue, 05 Jun 2018 22:25:09 -0400 Received: from world.peace.net ([64.112.178.59]:52410) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fQO8I-0001ue-E6 for 31594@debbugs.gnu.org; Tue, 05 Jun 2018 22:25:07 -0400 Received: from mhw by world.peace.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1fQO8B-0007k2-3Q; Tue, 05 Jun 2018 22:24:59 -0400 From: Mark H Weaver References: <87efhk3nb5.fsf@netris.org> Date: Tue, 05 Jun 2018 22:23:41 -0400 In-Reply-To: <87efhk3nb5.fsf@netris.org> (Mark H. Weaver's message of "Tue, 05 Jun 2018 18:01:34 -0400") Message-ID: <87vaaw1wlu.fsf@netris.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) 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 (-) Mark H Weaver writes: > Tommi H=C3=B6yn=C3=A4l=C3=A4nmaa writes: > >> The following code causes command "guild compile" to hang: >> ---cut here--- >> (define (select-nearest-methods binder >> index v-fixed-args v-rest-arg vb-included) >> (dwl4 "select-nearest-methods") >> (assert (is-binder? binder)) >> (let ((n (vector-length vb-included))) >> (do ((i 0 (+ i 1))) ((>=3D i n)) >> (if (vector-ref vb-included i) >> (let ((t1 (get-item-at-index >> (vector-ref v-fixed-args i) >> (vector-ref v-rest-arg i) >> index))) >> (do ((j 0 (+ j 1))) ((>=3D j n)) >> (if (and (not (=3D i j)) >> (vector-ref vb-included j)) >> (let ((t2 (get-item-at-index >> (vector-ref v-fixed-args j) >> (vector-ref v-rest-arg j) >> index))) >> (if (is-t-subtype? binder t1 t2) >> ;; t2 is excluded >> (vector-set! vb-included j #f)))))))))) >> ---cut here--- Further investigation reveals that the loop in compute-significant-bits in (language cps specialize-numbers) fails to terminate. I instrumented it as follows: --8<---------------cut here---------------start------------->8--- diff --git a/module/language/cps/specialize-numbers.scm b/module/language/c= ps/specialize-numbers.scm index d5587037b..7be0b5e33 100644 --- a/module/language/cps/specialize-numbers.scm +++ b/module/language/cps/specialize-numbers.scm @@ -211,9 +211,21 @@ "Given the locally inferred types @var{types}, compute a map of VAR -> BITS indicating the significant bits needed for a variable. BITS may be #f to indicate all bits, or a non-negative integer indicating a bitmask." - (let ((preds (invert-graph (compute-successors cps kfun)))) + (pk 'compute-significant-bits cps types kfun) + (when (getenv "GUILE_DEBUG_CPS") + (format (current-warning-port) "CPS:\n") + (for-each (match-lambda + ((k . v) (format (current-warning-port) " ~s --> ~s\n" k = v))) + (reverse (intmap-fold acons cps '()))) + (format (current-warning-port) "TYPES:\n") + (for-each (match-lambda + ((k . v) (format (current-warning-port) " ~s --> ~s\n" k = v))) + (reverse (intmap-fold acons types '())))) + (pk 'compute-significant-bits-result + (let ((preds (pk 'preds (invert-graph (compute-successors cps kfun))))) (let lp ((worklist (intmap-keys preds)) (visited empty-intset) (out empty-intmap)) + (pk 'lp 'worklist worklist 'visited visited 'out out) (match (intset-prev worklist) (#f out) (label @@ -276,7 +288,7 @@ (add-unknown-uses out args)))) (($ $prompt escape? tag handler) (add-unknown-use out tag))))) - (_ out))))))))) + (_ out)))))))))) =20 (define (specialize-operations cps) (define (visit-cont label cont cps types sigbits) --8<---------------cut here---------------end--------------->8--- and here's a reformatted version of the resulting output when compiling Tommi's code above: --8<---------------cut here---------------start------------->8--- ;;; (compute-significant-bits # # 13) CPS: 0 --> # 1 --> # 2 --> # 3 --> # 4 --> # 5 --> # 6 --> # 7 --> # 8 --> # 9 --> # 10 --> # 11 --> # 12 --> # 13 --> # 14 --> # 15 --> # 16 --> # 17 --> # 18 --> # 19 --> # 20 --> # 21 --> # 22 --> # 23 --> # 24 --> # 25 --> # 26 --> # 27 --> # 28 --> # 29 --> # 30 --> # 31 --> # 32 --> # 33 --> # 34 --> #scm 30)))> 35 --> #=3D 16 3= 1))))> 36 --> #u64 16)))> 37 --> # 38 --> # 39 --> # 40 --> # 41 --> # 42 --> # 43 --> # 44 --> # 45 --> # 46 --> # 47 --> #=3D 41 31= ))))> 48 --> # 49 --> #u64 41)))> 50 --> # 51 --> # 52 --> # 53 --> # 54 --> # 55 --> # 56 --> # 57 --> # 58 --> # 59 --> # 60 --> # 61 --> # 62 --> # 63 --> # 64 --> # 65 --> # 66 --> # 67 --> # 68 --> # 69 --> #=3D 57 3= 1))))> 70 --> #u64 57)))> 71 --> # 72 --> # 73 --> # 74 --> # 75 --> # 76 --> # 77 --> # 78 --> # 79 --> # 80 --> # 81 --> #=3D 67 3= 1))))> 82 --> # 83 --> #u64 67)))> 84 --> # 85 --> # 86 --> # 87 --> # 88 --> # 89 --> # 90 --> # 91 --> # 92 --> # 93 --> # 94 --> # 95 --> # 96 --> # 97 --> # 98 --> # 99 --> # 100 --> # 101 --> # 102 --> # 103 --> # TYPES: 13 --> #(# #) 14 --> #(# #) 15 --> #(# #) 16 --> #(# #) 17 --> #(# #) 18 --> #(# #) 19 --> #(# #) 20 --> #(# #) 21 --> #(# #) 22 --> #(# #) 23 --> #(# #) 24 --> #(# #) 25 --> #(# #) 26 --> #(# #) 27 --> #(# #) 28 --> #(# #) 29 --> #(# #) 30 --> #(# #) 31 --> #(# #) 32 --> #(# #) 33 --> #(# #) 34 --> #(# #) 35 --> #(# # #) 36 --> #(# #) 37 --> #(# #) 38 --> #(# # #) 39 --> #(# #) 40 --> #(# #) 41 --> #(# #) 42 --> #(# #) 43 --> #(# #) 44 --> #(# #) 45 --> #(# #) 46 --> #(# #) 47 --> #(# # #) 48 --> #(# # #) 49 --> #(# #) 50 --> #(# #) 51 --> #(# # #) 52 --> #(# #) 53 --> #(# #) 54 --> #(# #) 55 --> #(# #) 56 --> #(# #) 57 --> #(# #) 58 --> #(# #) 59 --> #(# #) 60 --> #(# #) 61 --> #(# #) 62 --> #(# # #) 63 --> #(# #) 64 --> #(# #) 65 --> #(# #) 66 --> #(# #) 67 --> #(# #) 68 --> #(# #) 69 --> #(# # #) 70 --> #(# #) 71 --> #(# #) 72 --> #(# # #) 73 --> #(# #) 74 --> #(# #) 75 --> #(# #) 76 --> #(# #) 77 --> #(# #) 78 --> #(# #) 79 --> #(# #) 80 --> #(# #) 81 --> #(# # #) 82 --> #(# # #) 83 --> #(# #) 84 --> #(# #) 85 --> #(# # #) 86 --> #(# #) 87 --> #(# #) 88 --> #(# #) 89 --> #(# #) 90 --> #(# #) 91 --> #(# #) 92 --> #(# #) 93 --> #(# #) 94 --> #(# #) 95 --> #(# #) 96 --> #(# # #) 97 --> #(# #) 98 --> #(# #) 99 --> #(# #) 100 --> #(# #) 101 --> #(# #) 102 --> #(# #) 103 --> #(#) ;;; (preds #) ;;; (lp worklist # visited # ou= t #) ;;; (lp worklist # visited # ou= t #) ;;; (lp worklist # visited # ou= t #) ;;; (lp worklist # visited # ou= t #) ;;; (lp worklist # visited # ou= t #) ;;; (lp worklist # visited # ou= t #) ;;; (lp worklist # visited # ou= t #) ;;; (lp worklist # visited # ou= t #) ;;; (lp worklist # visited # ou= t #) ;;; (lp worklist # visited # ou= t #) ;;; (lp worklist # visited # ou= t #) ;;; (lp worklist # visited # ou= t #) ;;; (lp worklist # visited # ou= t #) ;;; (lp worklist # visited # ou= t #) ;;; (lp worklist # visited # ou= t #) ;;; (lp worklist # visited # ou= t #) ;;; (lp worklist # visited # ou= t #) ;;; (lp worklist # visited # ou= t #) ;;; (lp worklist # visited # ou= t #) ;;; (lp worklist # visited # ou= t #) ;;; (lp worklist # visited # ou= t #) ;;; (lp worklist # visited # ou= t #) ;;; (lp worklist # visited # ou= t #) ;;; (lp worklist # visited # ou= t #) ;;; (lp worklist # visited # ou= t #) ;;; (lp worklist # visited # ou= t #) ;;; (lp worklist # visited # ou= t #) ;;; (lp worklist # visited # ou= t #) ;;; (lp worklist # visited # ou= t #) ;;; (lp worklist # visited # ou= t #) ;;; (lp worklist # visited # ou= t #) ;;; (lp worklist # visited # ou= t #) ;;; (lp worklist # visited # ou= t #) ;;; (lp worklist # visited # ou= t #) ;;; (lp worklist # visited # ou= t #) ;;; (lp worklist # visited # ou= t #) ;;; (lp worklist # visited # ou= t #) ;;; (lp worklist # visited # ou= t #) ;;; (lp worklist # visited # ou= t #) ;;; (lp worklist # visited # ou= t #) ;;; (lp worklist # visited # ou= t #) ;;; [the 6 loop states above repeat forever] --8<---------------cut here---------------end--------------->8--- To be continued ... Mark