From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 11 18:21:06 2012 Received: (at submit) by debbugs.gnu.org; 11 Aug 2012 22:21:06 +0000 Received: from localhost ([127.0.0.1]:50058 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T0K3N-0004Ye-UO for submit@debbugs.gnu.org; Sat, 11 Aug 2012 18:21:06 -0400 Received: from eggs.gnu.org ([208.118.235.92]:55063) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T0Ieo-0002Zs-3K for submit@debbugs.gnu.org; Sat, 11 Aug 2012 16:51:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T0IWg-0005BD-9e for submit@debbugs.gnu.org; Sat, 11 Aug 2012 16:43:15 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:43137) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T0IWg-0005B9-6S for submit@debbugs.gnu.org; Sat, 11 Aug 2012 16:43:14 -0400 Received: from eggs.gnu.org ([208.118.235.92]:60670) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T0IWe-0005SZ-0I for bug-guile@gnu.org; Sat, 11 Aug 2012 16:43:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T0IWc-0005Ap-SL for bug-guile@gnu.org; Sat, 11 Aug 2012 16:43:11 -0400 Received: from mail-we0-f169.google.com ([74.125.82.169]:56608) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T0IWc-0005Af-LC for bug-guile@gnu.org; Sat, 11 Aug 2012 16:43:10 -0400 Received: by weys10 with SMTP id s10so1897237wey.0 for ; Sat, 11 Aug 2012 13:43:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:user-agent:mime-version :content-transfer-encoding:content-type; bh=rktG4YY0R6DcON33JBsp17ZSFgBxqJBO3i4n6Pr+ZcI=; b=UAhr+cnrEs6OKMuznbgoQNOCzIwevoc/VMvIMTNxQi+NLO0Jwh/2XZ+evVWHBtFhQD wFX7q9ECHYLtwO1TYfOJtvyH1vKm8uFd7hyHs8Cc51ypqzbc5eDILzpcVW+2lzE5PmGV 6eO0OIq33rwCThT2lapG00habMe8xh+/pwBDMxp4YDvOTuEqSrIeDTZVpRfRv5il91wB NB8d6tuADQkaCTSLU4+N71PuRtw6r6DuE562nB23C6bV3rGLm/SZw9ha6oKoO5QCNK+V QWb0p1U8vurrAnI6Lw17QYfGkyfhQkc2SpylMJtFNny1kERzfdl02CzzgKQmG6didoGH Sczw== Received: by 10.180.82.39 with SMTP id f7mr6000545wiy.2.1344717789560; Sat, 11 Aug 2012 13:43:09 -0700 (PDT) Received: from feufohost2.localnet (203.82.69.86.rev.sfr.net. [86.69.82.203]) by mx.google.com with ESMTPS id dc3sm6274339wib.7.2012.08.11.13.43.07 (version=SSLv3 cipher=OTHER); Sat, 11 Aug 2012 13:43:08 -0700 (PDT) From: Feufochmar To: bug-guile@gnu.org Subject: guile 2.0.6: "Value out of range: 0" when compiling a procedure Date: Sat, 11 Aug 2012 22:46:39 +0200 Message-ID: <4948904.AakC0Hv2Hj@feufohost2> User-Agent: KMail/4.9 (Linux/3.4.7-1-ARCH; KDE/4.9.0; x86_64; ; ) MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.1 (------) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sat, 11 Aug 2012 18:21:04 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.1 (------) Hello, guile 2.0.6 fails to compile the following procedure with the error "Value out of range: 0". ~~~~~~~ ;; get all points inside a distance of the half-line starting from (x0 . y0) and containing (x1 . y1) ;; the argument dist is the square of the distance we want to reach (define (get-half-line-points x0 y0 x1 y1 dist) (if (and (eq? x0 x1) (eq? y0 y1)) (list (cons x0 y0)) (letrec* ((steep? (> (abs (- y1 y0)) (abs (- x1 x0)))) (x-orig (if steep? y0 x0)) (y-orig (if steep? x0 y0)) (x-dest (if steep? y1 x1)) (y-dest (if steep? x1 y1)) (delta-x (abs (- x-dest x-orig))) (delta-y (abs (- y-dest y-orig))) (delta-err (/ delta-y delta-x)) (x-step (if (< x-orig x-dest) 1 -1)) (y-step (if (< y-orig y-dest) 1 -1)) (plot (lambda (x y error points) (if (< dist (+ (expt (- x x-orig) 2) (expt (- y y-orig) 2))) (reverse points) (let ((new-error (+ error delta-err))) (plot (+ x-step x) (if (>= new-error 0.5) (+ y y-step) y) (if (>= new-error 0.5) (- new-error 1) new-error) (cons (if steep? (cons y x) (cons x y)) points))))))) (plot x-orig y-orig 0 '()) ))) ~~~~~~~ The backtrace I have with guild compile : $ guild compile test.scm Backtrace: In language/tree-il/optimize.scm: 44: 19 [optimize! # # ...] In language/tree-il/cse.scm: 537: 18 [visit # # ...] 543: 17 [visit # # ...] 483: 16 [visit # # # ...] 537: 15 [visit # # ...] 543: 14 [visit # # ...] 429: 13 [visit # # # ...] 370: 12 [lp (#) () #] 537: 11 [visit # # ...] 543: 10 [visit # # ...] 437: 9 [visit # # ...] 533: 8 [visit # # ...] 370: 7 [lp (# # # #) () #] 533: 6 [visit # # ...] 370: 5 [lp (#) () #] 403: 4 [return # #] 333: 3 [find-dominating-lexical # 0 ...] 315: 2 [unroll # 19 13] In ice-9/vlist.scm: 303: 1 [vlist-ref # 19] In ice-9/boot-9.scm: 106: 0 [# out-of-range ...] ice-9/boot-9.scm:106:20: In procedure #: ice-9/boot-9.scm:106:20: Value out of range: 0 Feufochmar From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 12 07:38:12 2012 Received: (at 12182) by debbugs.gnu.org; 12 Aug 2012 11:38:12 +0000 Received: from localhost ([127.0.0.1]:50689 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T0WUl-0008Ji-NK for submit@debbugs.gnu.org; Sun, 12 Aug 2012 07:38:12 -0400 Received: from mail-wi0-f170.google.com ([209.85.212.170]:38119) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T0WUj-0008JZ-F4 for 12182@debbugs.gnu.org; Sun, 12 Aug 2012 07:38:10 -0400 Received: by wibhq12 with SMTP id hq12so2254255wib.3 for <12182@debbugs.gnu.org>; Sun, 12 Aug 2012 04:29:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type:content-transfer-encoding; bh=pKOO8CqXazpnaRdRiP17uK+v9itFdYEM/A49iPPG4Yk=; b=tlS9SPjqkD/fdz/WWwtLdjJIiNTwKQIR40eSMZt3Hljk7WCy6hHOvj9GEs04BLyC+8 lzw08oZK650pMlmNGhNWhceQXkbgGf3XP+011RfU7hzZG1wjRBaLQ8vxBsOdAe0T0oCY RhNJzX8Wd0/JHmePTNCma6QdxZNxAfzYTXOAxlDtop6AfGQaD+LDXka5rpx/zRzx2k1P uZRqMrnG9gMjne+HBslpI4RN89ptWE3K4XWbQdBaKmOQYBZX0FwuHIZG65Xu1PT+m0bV eh678j75jgiu59MZeQpJ0mIFixfyLLhBRjJr+ki4BEy4B2ST3eirrsOtbXKSIAm93yMU CH7w== Received: by 10.216.214.85 with SMTP id b63mr4546515wep.154.1344770982365; Sun, 12 Aug 2012 04:29:42 -0700 (PDT) Received: from Kagami.home (host109-154-209-14.range109-154.btcentralplus.com. [109.154.209.14]) by mx.google.com with ESMTPS id cu1sm9777651wib.6.2012.08.12.04.29.40 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 12 Aug 2012 04:29:41 -0700 (PDT) From: Ian Price To: Feufochmar Subject: Re: bug#12182: guile 2.0.6: "Value out of range: 0" when compiling a procedure References: <4948904.AakC0Hv2Hj@feufohost2> Date: Sun, 12 Aug 2012 12:29:32 +0100 In-Reply-To: <4948904.AakC0Hv2Hj@feufohost2> (Feufochmar's message of "Sat, 11 Aug 2012 22:46:39 +0200") Message-ID: <87r4rcfiw3.fsf@Kagami.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 12182 Cc: 12182@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.3 (--) Feufochmar writes: > > The backtrace I have with guild compile : > > $ guild compile test.scm > Backtrace: > In language/tree-il/optimize.scm: > 44: 19 [optimize! # #= ...] > In language/tree-il/cse.scm: > 537: 18 [visit # # ...] > 543: 17 [visit # # .= ..] > 483: 16 [visit # # # ...] > 537: 15 [visit # # ...] > 543: 14 [visit # # .= ..] > 429: 13 [visit # # # ...] > 370: 12 [lp (#) () #] > 537: 11 [visit # # ...] > 543: 10 [visit # # .= ..] > 437: 9 [visit # # ...] > 533: 8 [visit # # ...] > 370: 7 [lp (# # # #) () #] > 533: 6 [visit # # ...] > 370: 5 [lp (#) () #] > 403: 4 [return # #] > 333: 3 [find-dominating-lexical # 0 ...] > 315: 2 [unroll # 19 13] > In ice-9/vlist.scm: > 303: 1 [vlist-ref # 19] > In ice-9/boot-9.scm: > 106: 0 [# = out-of-range ...] > > ice-9/boot-9.scm:106:20: In procedure #: > ice-9/boot-9.scm:106:20: Value out of range: 0 I am not familiar with the cse module, but a quick perusal of the code leads me to think that the unroll procedure in cse.scm expects the invariant base + n <=3D (vlist-length db) scheme@(guile=E2=88=92user) [1]> ,up In language/tree=E2=88=92il/cse.scm: 315:10 1 (unroll # 19 13) scheme@(guile=E2=88=92user) [1]> ,up In language/tree=E2=88=92il/cse.scm: 333:28 2 (find=E2=88=92dominating=E2=88=92lexical # =E2=80=A6) scheme@(guile=E2=88=92user) [1]> ,locals Local variables: $13 =3D exp =3D # $14 =3D effects =3D 0 $15 =3D env =3D # $16 =3D db =3D # $17 =3D entry=E2=88=92matches? =3D # $18 =3D unroll =3D # $19 =3D h =3D 72117960 $20 =3D env=E2=88=92len =3D 11 $21 =3D db=E2=88=92len =3D 19 $22 =3D n =3D 1 $23 =3D m =3D 16 $24 =3D v =3D (#(# =E2=80=A6) . #) $25 =3D w =3D #(# =E2=80=A6) $26 =3D x =3D 72117960 $27 =3D len =3D 4 $28 =3D w =3D # $29 =3D w =3D y=E2=88=92step $30 =3D w =3D y=E2=88=92step=E2=88=92827 $31 =3D w =3D 3 scheme@(guile=E2=88=92user) [1]> ,use (ice-9 vlist) scheme@(guile=E2=88=92user) [1]> (vlist-ref $15 $22) $34 =3D (#(# y=E2=88=92step y=E2=88=92step=E2=88=92827= 3) . 72117960) The only call to unroll, is (unroll db m (- db-len db-len*)) the missing db-len* is the fourth element of the vector in $34 or 3. So the call works out at (unroll db 16 (- 19 3)) =3D=3D (unroll db 16 16) and obviously 16 + 16 > 19 Not sure if that's helped at all, but the bug intrigued me when he brought it up on #guile yesterday --=20 Ian Price -- shift-reset.com "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - from "The Wizardy Compiled" From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 23 18:21:05 2012 Received: (at 12182-done) by debbugs.gnu.org; 23 Nov 2012 23:21:05 +0000 Received: from localhost ([127.0.0.1]:35447 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tc2YS-0006zw-SI for submit@debbugs.gnu.org; Fri, 23 Nov 2012 18:21:05 -0500 Received: from xanadu.aquilenet.fr ([88.191.123.111]:41379) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tc2YQ-0006zp-Ng for 12182-done@debbugs.gnu.org; Fri, 23 Nov 2012 18:21:03 -0500 Received: from localhost (localhost [127.0.0.1]) by xanadu.aquilenet.fr (Postfix) with ESMTP id 49B39AC74; Sat, 24 Nov 2012 00:19:33 +0100 (CET) Received: from xanadu.aquilenet.fr ([127.0.0.1]) by localhost (xanadu.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lx4ufDW2w1VC; Sat, 24 Nov 2012 00:19:33 +0100 (CET) Received: from pluto (reverse-83.fdn.fr [80.67.176.83]) by xanadu.aquilenet.fr (Postfix) with ESMTPSA id B17C1AC70; Sat, 24 Nov 2012 00:19:32 +0100 (CET) From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Feufochmar Subject: Re: bug#12182: guile 2.0.6: "Value out of range: 0" when compiling a procedure References: <4948904.AakC0Hv2Hj@feufohost2> Date: Sat, 24 Nov 2012 00:19:32 +0100 In-Reply-To: <4948904.AakC0Hv2Hj@feufohost2> (Feufochmar's message of "Sat, 11 Aug 2012 22:46:39 +0200") Message-ID: <87mwy7ewl7.fsf@gnu.org> User-Agent: Gnus/5.130005 (Ma Gnus v0.5) Emacs/24.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 1.5 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi, Sorry for the late reply. Feufochmar skribis: [...] Content analysis details: (1.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% [score: 0.5000] X-Debbugs-Envelope-To: 12182-done Cc: 12182-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 1.5 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi, Sorry for the late reply. Feufochmar skribis: [...] Content analysis details: (1.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% [score: 0.4970] Hi, Sorry for the late reply. Feufochmar skribis: > $ guild compile test.scm > Backtrace: > In language/tree-il/optimize.scm: > 44: 19 [optimize! # #= ...] > In language/tree-il/cse.scm: > 537: 18 [visit # # ...] > 543: 17 [visit # # .= ..] > 483: 16 [visit # # # ...] > 537: 15 [visit # # ...] > 543: 14 [visit # # .= ..] > 429: 13 [visit # # # ...] > 370: 12 [lp (#) () #] > 537: 11 [visit # # ...] > 543: 10 [visit # # .= ..] > 437: 9 [visit # # ...] > 533: 8 [visit # # ...] > 370: 7 [lp (# # # #) () #] > 533: 6 [visit # # ...] > 370: 5 [lp (#) () #] > 403: 4 [return # #] > 333: 3 [find-dominating-lexical # 0 ...] > 315: 2 [unroll # 19 13] > In ice-9/vlist.scm: > 303: 1 [vlist-ref # 19] > In ice-9/boot-9.scm: > 106: 0 [# = out-of-range ...] > > ice-9/boot-9.scm:106:20: In procedure #: > ice-9/boot-9.scm:106:20: Value out of range: 0 This is the same issue as 12883, which is now fixed in the stable-2.0 branch (will be in 2.0.7): http://git.savannah.gnu.org/cgit/guile.git/commit/?h=3Dstable-2.0&id=3D2c= 7b7e0f214be5ec5184949a94209668775f60bc Thanks, Ludo=E2=80=99. From unknown Sat Aug 16 16:07:40 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 22 Dec 2012 12:24:04 +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