From unknown Thu Sep 11 13:55:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12883: [2.0.6] CSE bug 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, 14 Nov 2012 15:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 12883 X-GNU-PR-Package: guile X-GNU-PR-Keywords: To: 12883@debbugs.gnu.org X-Debbugs-Original-To: bug-guile@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.135290686323750 (code B ref -1); Wed, 14 Nov 2012 15:28:02 +0000 Received: (at submit) by debbugs.gnu.org; 14 Nov 2012 15:27:43 +0000 Received: from localhost ([127.0.0.1]:42231 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TYesQ-0006B0-TN for submit@debbugs.gnu.org; Wed, 14 Nov 2012 10:27:43 -0500 Received: from eggs.gnu.org ([208.118.235.92]:39194) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TYesN-0006An-Jq for submit@debbugs.gnu.org; Wed, 14 Nov 2012 10:27:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TYerk-0007OT-Nk for submit@debbugs.gnu.org; Wed, 14 Nov 2012 10:27:03 -0500 Received: from lists.gnu.org ([208.118.235.17]:39338) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TYerk-0007OP-KN for submit@debbugs.gnu.org; Wed, 14 Nov 2012 10:27:00 -0500 Received: from eggs.gnu.org ([208.118.235.92]:33661) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TYerh-0002RU-Hk for bug-guile@gnu.org; Wed, 14 Nov 2012 10:27:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TYere-0007NC-Fb for bug-guile@gnu.org; Wed, 14 Nov 2012 10:26:57 -0500 Received: from xanadu.aquilenet.fr ([88.191.123.111]:48870) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TYere-0007Mp-67 for bug-guile@gnu.org; Wed, 14 Nov 2012 10:26:54 -0500 Received: from localhost (localhost [127.0.0.1]) by xanadu.aquilenet.fr (Postfix) with ESMTP id 52084A9DA for ; Wed, 14 Nov 2012 16:26:42 +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 jBgs3Vvy-JTo for ; Wed, 14 Nov 2012 16:26:42 +0100 (CET) Received: from pluto (reverse-83.fdn.fr [80.67.176.83]) by xanadu.aquilenet.fr (Postfix) with ESMTPSA id 7E019A9D9 for ; Wed, 14 Nov 2012 16:26:41 +0100 (CET) From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 24 Brumaire an 221 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu Date: Wed, 14 Nov 2012 16:26:41 +0100 Message-ID: <871ufwfbny.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-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -4.4 (----) 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: -4.4 (----) Hello, This piece of code triggers a CSE bug: --8<---------------cut here---------------start------------->8--- (use-modules (ice-9 match)) (define (snix-derivation->guix-package derivation) (match derivation (((_ _ _)) #t))) --8<---------------cut here---------------end--------------->8--- Or just: --8<---------------cut here---------------start------------->8--- (define (snix-derivation->guix-package v) (let ((failure (lambda () (error 'match "no matching pattern")))) (if (and (pair? v) (null? (cdr v))) (let ((w foo) (x (cdr w))) (if (and (pair? x) (null? (cdr x))) #t (failure))) (failure)))) --8<---------------cut here---------------end--------------->8--- Details: --8<---------------cut here---------------start------------->8--- scheme@(guile-user) [1]> ,bt In geiser/evaluation.scm: 59:13 26 (call-with-result #) In unknown file: 25 (call-with-output-string #) In ice-9/r4rs.scm: 176:4 24 (with-output-to-port #> #) In geiser/evaluation.scm: 63:19 23 (#) In ice-9/r4rs.scm: 180:4 22 (with-error-to-port #> #) In geiser/evaluation.scm: 64:45 21 (#) 75:21 20 (ev) In system/base/compile.scm: 231:6 19 (compile (define (snix-derivation->guix-package v) (let ((fail= ure (lambda () (error (quote match) "no =E2=80=A6")))) (=E2=80=A6))) # =E2= =80=A6) 177:32 18 (lp (# # # =E2=80=A6) =E2= =80=A6) In language/tree-il/compile-glil.scm: 65:2 17 (compile-glil #guix-package = (lambda ((name . snix-derivation->guix-package)) (la=E2=80=A6> =E2=80=A6) In language/tree-il/optimize.scm: 44:6 16 (optimize! #guix-package (lambda ((=E2=80=A6> =E2=80=A6) In language/tree-il/cse.scm: 537:31 15 (visit #guix-package (lambda ((name=E2=80=A6> =E2=80=A6) 543:33 14 (visit #guix-package (lambda ((name . snix-der=E2=80=A6> =E2=80=A6) 483:32 13 (visit #guix-package (lambda= ((name . snix-derivation->guix-package)) (lambda-ca=E2=80=A6> =E2=80=A6) 537:31 12 (visit #guix-packag= e)) (lambda-case (((v) #f #f #f () (v-66965)) (let (=E2=80=A6> =E2=80=A6) 543:33 11 (visit # =E2=80=A6) 430:34 10 (visit # =E2=80=A6) 496:31 9 (visit # =E2=80=A6) 496:31 8 (visit # =E2=80=A6) 430:34 7 (visit # =E2=80=A6) 553:39 6 (lp (#) =E2=80=A6) 429:33 5 (visit # =E2=80=A6) 370:41 4 (lp (#) =E2=80=A6) 403:15 3 (return # =E2=80=A6) 333:28 2 (find-dominating-lexical # =E2=80=A6) 315:10 1 (unroll # 8 1) In ice-9/vlist.scm: 303:8 0 (vlist-ref # 8) scheme@(guile-user) [1]> ,locals Local variables: $11 =3D vlist =3D # $12 =3D index =3D 8 $13 =3D index =3D 0 $14 =3D base =3D #(#() #f 0 0 0) $15 =3D offset =3D 0 $16 =3D content =3D #() $17 =3D offset =3D 0 scheme@(guile-user) [1]> ,error ice-9/vlist.scm:303:8: In procedure vlist-ref: ice-9/vlist.scm:303:8: Value out of range: 0 --8<---------------cut here---------------end--------------->8--- Ludo=E2=80=99. From unknown Thu Sep 11 13:55:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12883: [2.0.6] CSE bug Resent-From: Stefan Israelsson Tampe Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-guile@gnu.org Resent-Date: Wed, 14 Nov 2012 21:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12883 X-GNU-PR-Package: guile X-GNU-PR-Keywords: To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 12883@debbugs.gnu.org Received: via spool by 12883-submit@debbugs.gnu.org id=B12883.135292975229653 (code B ref 12883); Wed, 14 Nov 2012 21:50:01 +0000 Received: (at 12883) by debbugs.gnu.org; 14 Nov 2012 21:49:12 +0000 Received: from localhost ([127.0.0.1]:42886 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TYkpa-0007iD-Nu for submit@debbugs.gnu.org; Wed, 14 Nov 2012 16:49:11 -0500 Received: from mail-qa0-f51.google.com ([209.85.216.51]:49056) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TYkpX-0007i5-1I for 12883@debbugs.gnu.org; Wed, 14 Nov 2012 16:49:08 -0500 Received: by mail-qa0-f51.google.com with SMTP id t11so719192qaa.3 for <12883@debbugs.gnu.org>; Wed, 14 Nov 2012 13:48:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=0hNoXlqgG+iO/73wqu6Kh9OlGvoIQr//OVll1QEFFmM=; b=A45hdXiMVvWKe/4SZEBGtgEZyuUA5Ar6JUUH9CRdyyJe8tdoP6EJn6WzBU1AnEKU1L 1Nws3Hbz3Bc0oKlqejIvXoXP36l2oXQbYNEXbDmHQukykK7xxWa3WpKNlkE1wFQKA6yz nhSNJfuaM13P70vSFLMSHBGgENU8Ss6kjMzrActyeu8Wyj7bp/Hep3TZjGWqSlDG7lwa ymOaM/xHh66eGaZQ9UTMuGbs4Z/O6d3dEpHMeV71xBmGPt0nkqFEt7j4vv1xfP8rw2sA 2HhoL2/NxERbREslo0V6cSgnoBBvgGJIkQ+t4GqCnVPtwDXS1BCm/H9dI1h3anZfKvGO oXXw== MIME-Version: 1.0 Received: by 10.49.5.137 with SMTP id s9mr6032882qes.64.1352929709153; Wed, 14 Nov 2012 13:48:29 -0800 (PST) Received: by 10.49.121.104 with HTTP; Wed, 14 Nov 2012 13:48:29 -0800 (PST) In-Reply-To: <871ufwfbny.fsf@gnu.org> References: <871ufwfbny.fsf@gnu.org> Date: Wed, 14 Nov 2012 22:48:29 +0100 Message-ID: From: Stefan Israelsson Tampe Content-Type: multipart/alternative; boundary=047d7bea3476b85ca004ce7b7e3b X-Spam-Score: 0.1 (/) 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: -0.7 (/) --047d7bea3476b85ca004ce7b7e3b Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Hey, the unroll code looks really weird in find-dominating-lexical, I know it's difficult to just come in and propose a change, but hey it can only help :-) With this code, (define (find-dominating-lexical exp effects env db) (define (entry-matches? v1 v2) (match (if (vector? v1) v1 v2) (#(exp* name sym db) (tree-il=3D? exp exp*)) (_ #f))) (define (unroll db base n) (log 'unroll db base n) ;; logging the code (or (zero? n) (and (< base (vlist-length db)) (match (vlist-ref db base) (('lambda . h*) ;; See note in find-dominating-expression. (and (not (depends-on-effects? effects &all-effects)) (unroll db (1+ base) (1- n)))) ((#(exp* effects* ctx*) . h*) (and (effects-commute? effects effects*) (unroll db (1+ base) (1- n)))))))) (let ((h (tree-il-hash exp))) (and (effect-free? (exclude-effects effects &type-check)) (vhash-assoc exp env entry-matches? (hasher h)) (let ((env-len (vlist-length env)) (db-len (vlist-length db))) (let lp ((n 0) (m 0)) (and (< n env-len) (match (vlist-ref env n) ((#(exp* name sym db-len*) . h*) (log 'lp name db-len* n m (- db-len db-len*)) ;; logging the code (let ((niter (- (- db-len db-len*) m))) ;; niter added here (stis) (and (unroll db m niter) (if (and (=3D h h*) (tree-il=3D? exp* exp)) (make-lexical-ref (tree-il-src exp) name sym) (lp (1+ n) (- db-len db-len*))))))))))))) I get the log log lp x 20 0 0 2) (log unroll # 0 2) (log unroll # 1 1) (log unroll # 2 0) (log lp x 17 1 2 5) (log unroll # 2 3) (log unroll # 3 2) (log unroll # 4 1) (log unroll # 5 0) (log lp x 14 2 5 8) (log unroll # 5 3) (log unroll # 6 2) (log unroll # 7 1) (log unroll # 8 0) (log lp w 12 3 8 10) (log unroll # 8 2) (log unroll # 9 1) (log unroll # 10 0) (log lp failure 9 4 10 13) (log unroll # 10 3) (log unroll # 11 2) (log unroll # 12 1) (log unroll # 13 0) This looks better no? am I surfing at a differnt planet? (We could even remove the duplicate checks if we like but it's unimportant for the end result) /Stefan On Wed, Nov 14, 2012 at 4:26 PM, Ludovic Court=E8s wrote: > Hello, > > This piece of code triggers a CSE bug: > > --8<---------------cut here---------------start------------->8--- > (use-modules (ice-9 match)) > > (define (snix-derivation->guix-package derivation) > (match derivation > (((_ _ _)) > #t))) > --8<---------------cut here---------------end--------------->8--- > > Or just: > > --8<---------------cut here---------------start------------->8--- > (define (snix-derivation->guix-package v) > (let ((failure > (lambda () > (error 'match "no matching pattern")))) > (if (and (pair? v) > (null? (cdr v))) > (let ((w foo) > (x (cdr w))) > (if (and (pair? x) > (null? (cdr x))) > #t > (failure))) > (failure)))) > --8<---------------cut here---------------end--------------->8--- > > Details: > > --8<---------------cut here---------------start------------->8--- > scheme@(guile-user) [1]> ,bt > In geiser/evaluation.scm: > 59:13 26 (call-with-result #) > In unknown file: > 25 (call-with-output-string # ice-9/r4rs.scm:236:3 (p)>) > In ice-9/r4rs.scm: > 176:4 24 (with-output-to-port # /dev/pts/3>> #) > In geiser/evaluation.scm: > 63:19 23 (#) > In ice-9/r4rs.scm: > 180:4 22 (with-error-to-port # /dev/pts/3>> #) > In geiser/evaluation.scm: > 64:45 21 (#) > 75:21 20 (ev) > In system/base/compile.scm: > 231:6 19 (compile (define (snix-derivation->guix-package v) (let > ((failure (lambda () (error (quote match) "no =85")))) (=85))) # =85) > 177:32 18 (lp (# # compile-asm (x e opts)> # =85) =85) > In language/tree-il/compile-glil.scm: > 65:2 17 (compile-glil #guix-packag= e > (lambda ((name . snix-derivation->guix-package)) (la=85> =85) > In language/tree-il/optimize.scm: > 44:6 16 (optimize! # ()) (define snix-derivation->guix-package (lambda ((=85> =85) > In language/tree-il/cse.scm: > 537:31 15 (visit # (define snix-derivation->guix-package (lambda ((name=85> =85) > 543:33 14 (visit # snix-derivation->guix-package (lambda ((name . snix-der=85> =85) > 483:32 13 (visit #guix-package > (lambda ((name . snix-derivation->guix-package)) (lambda-ca=85> =85) > 537:31 12 (visit # snix-derivation->guix-package)) (lambda-case (((v) #f #f #f () (v-66965)) > (let (=85> =85) > 543:33 11 (visit # (let (failure) (failure-66977) ((lambda () (lambda-case=85> =85) > 430:34 10 (visit # (lambda-case ((() #f #f #f () ()) (apply (primitive er=85> =85) > 496:31 9 (visit # v-66965)) (if (apply (primitive null?) (apply (primitive =85> =85) > 496:31 8 (visit # (primitive cdr) (lexical v v-66965))) (let (x) (x-66968) ((ap=85> =85) > 430:34 7 (visit # (toplevel w))) (begin (toplevel foo) (let (failure) (f=85> =85) > 553:39 6 (lp (# (lambda-case ((() #f #f #f () ()) (apply (primitive err=85>) =85) > 429:33 5 (visit # (lambda-case ((() #f #f #f () ()) (apply (primitive er=85> =85) > 370:41 4 (lp (# (apply (primitive error) (const match) (const "no mat=85>) =85) > 403:15 3 (return # ()) (apply (primitive error) (const match) (const "no m=85> =85) > 333:28 2 (find-dominating-lexical # ((() #f #f #f () ()) (apply (primitive error) (const ma=85> =85) > 315:10 1 (unroll # 8 1) > In ice-9/vlist.scm: > 303:8 0 (vlist-ref # 8) > scheme@(guile-user) [1]> ,locals > Local variables: > $11 =3D vlist =3D # > $12 =3D index =3D 8 > $13 =3D index =3D 0 > $14 =3D base =3D #(#() #f 0 0 0) > $15 =3D offset =3D 0 > $16 =3D content =3D #() > $17 =3D offset =3D 0 > scheme@(guile-user) [1]> ,error > ice-9/vlist.scm:303:8: In procedure vlist-ref: > ice-9/vlist.scm:303:8: Value out of range: 0 > --8<---------------cut here---------------end--------------->8--- > > Ludo=92. > > > > --047d7bea3476b85ca004ce7b7e3b Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Hey, the unroll code looks really weird in find-dominating-lexical, I know = it's difficult to
just come in and propose a change, but hey it can= only help :-)

With this code,

(define (find-dominating-lexic= al exp effects env db)
=A0=A0=A0 (define (entry-matches? v1 v2)
=A0=A0=A0=A0=A0 (match (if (vec= tor? v1) v1 v2)
=A0=A0=A0=A0=A0=A0=A0 (#(exp* name sym db)
=A0=A0=A0= =A0=A0=A0=A0=A0 (tree-il=3D? exp exp*))
=A0=A0=A0=A0=A0=A0=A0 (_ #f)))=A0=A0=A0=A0=A0
=A0=A0=A0 (define (unroll db base n)
=A0=A0=A0=A0= =A0 (log 'unroll db base n)=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ;; logging the= code
=A0=A0=A0=A0=A0 (or (zero? n)
=A0=A0=A0=A0=A0=A0=A0=A0=A0 (and (< bas= e (vlist-length db))
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (match (= vlist-ref db base)
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ((&#= 39;lambda . h*)
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ;; S= ee note in find-dominating-expression.
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0 (and (not (depends-on-effects? effects &all-effects)= )
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (unroll = db (1+ base) (1- n))))
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 = ((#(exp* effects* ctx*) . h*)
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0 (and (effects-commute? effects effects*)
=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (unroll db (1+ base) (1- n)))= )))))

=A0=A0=A0 (let ((h (tree-il-hash exp)))
=A0=A0=A0=A0=A0 (and (effect= -free? (exclude-effects effects &type-check))
=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0 (vhash-assoc exp env entry-matches? (hasher h))
=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0 (let ((env-len (vlist-length env))
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (db-len (vlist-length db))= )
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (let lp ((n 0) (m 0))
=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (and (< n env-len)
=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (match (vlist-ref env n)
= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ((#(exp* na= me sym db-len*) . h*)
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (log = 9;lp name db-len* n m (- db-len db-len*))=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0 ;; logging the code
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 (let ((niter (- (- db-len db-len*) m)))=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ;; niter= added here (stis)
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (a= nd (unroll db m niter)
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (if (and (=3D h h*) (tree-il=3D? ex= p* exp))
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (make-lexical-ref (tree-il-src exp) na= me sym)
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (lp (1+ n) (- db-len db-len*))))))))))= )))

I get the log
log lp x 20 0 0 2)

(log unroll #<vhash 1df5e= e0 22 pairs> 0 2)

(log unroll #<vhash 1df5ee0 22 pairs> 1 1= )

(log unroll #<vhash 1df5ee0 22 pairs> 2 0)

(log lp x = 17 1 2 5)

(log unroll #<vhash 1df5ee0 22 pairs> 2 3)

(log unroll #&l= t;vhash 1df5ee0 22 pairs> 3 2)

(log unroll #<vhash 1df5ee0 22 = pairs> 4 1)

(log unroll #<vhash 1df5ee0 22 pairs> 5 0)

(log lp x 14 2 5 8)

(log unroll #<vhash 1df5ee0 22 pairs> = 5 3)

(log unroll #<vhash 1df5ee0 22 pairs> 6 2)

(log un= roll #<vhash 1df5ee0 22 pairs> 7 1)

(log unroll #<vhash 1df= 5ee0 22 pairs> 8 0)

(log lp w 12 3 8 10)

(log unroll #<vhash 1df5ee0 22 pairs>= 8 2)

(log unroll #<vhash 1df5ee0 22 pairs> 9 1)

(log u= nroll #<vhash 1df5ee0 22 pairs> 10 0)

(log lp failure 9 4 10 1= 3)

(log unroll #<vhash 1df5ee0 22 pairs> 10 3)

(log unroll #&= lt;vhash 1df5ee0 22 pairs> 11 2)

(log unroll #<vhash 1df5ee0 2= 2 pairs> 12 1)

(log unroll #<vhash 1df5ee0 22 pairs> 13 0)<= br>

This looks better no? am I surfing at a differnt planet?
(We cou= ld even remove the duplicate checks if we like but it's unimportant for= the end result)

/Stefan


On Wed, Nov 14, 2012 at 4:26 PM, Ludovic Court=E8s <ludo@gnu.org>= wrote:
Hello,

This piece of code triggers a CSE bug:

--8<---------------cut here---------------start------------->8---
(use-modules (ice-9 match))

(define (snix-derivation->guix-package derivation)
=A0 (match derivation
=A0 =A0 (((_ _ _))
=A0 =A0 =A0#t)))
--8<---------------cut here---------------end--------------->8---

Or just:

--8<---------------cut here---------------start------------->8---
(define (snix-derivation->guix-package v)
=A0 (let ((failure
=A0 =A0 =A0 =A0 =A0(lambda ()
=A0 =A0 =A0 =A0 =A0 =A0(error 'match "no matching pattern")))= )
=A0 =A0 (if (and (pair? v)
=A0 =A0 =A0 =A0 =A0 =A0 =A0(null? (cdr v)))
=A0 =A0 =A0 =A0 (let ((w foo)
=A0 =A0 =A0 =A0 =A0 =A0 =A0 (x (cdr w)))
=A0 =A0 =A0 =A0 =A0 (if (and (pair? x)
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(null? (cdr x)))
=A0 =A0 =A0 =A0 =A0 =A0 =A0 #t
=A0 =A0 =A0 =A0 =A0 =A0 =A0 (failure)))
=A0 =A0 =A0 =A0 (failure))))
--8<---------------cut here---------------end--------------->8---

Details:

--8<---------------cut here---------------start------------->8---
scheme@(guile-user) [1]> ,bt
In geiser/evaluation.scm:
=A0 =A0 59:13 26 (call-with-result #<procedure ev ()>)
In unknown file:
=A0 =A0 =A0 =A0 =A0 25 (call-with-output-string #<procedure 33727c0 at i= ce-9/r4rs.scm:236:3 (p)>)
In ice-9/r4rs.scm:
=A0 =A0 176:4 24 (with-output-to-port #<variable 3374bb0 value: #<out= put: file /dev/pts/3>> #<procedure 4725360 at geiser/evaluation=85= >)
In geiser/evaluation.scm:
=A0 =A0 63:19 23 (#<procedure 4725360 at geiser/evaluation.scm:60:15 ()&= gt;)
In ice-9/r4rs.scm:
=A0 =A0 180:4 22 (with-error-to-port #<variable 33748f0 value: #<outp= ut: file /dev/pts/3>> #<procedure 4725300 at geiser/evaluation.=85= >)
In geiser/evaluation.scm:
=A0 =A0 64:45 21 (#<procedure 4725300 at geiser/evaluation.scm:64:21 ()&= gt;)
=A0 =A0 75:21 20 (ev)
In system/base/compile.scm:
=A0 =A0 231:6 19 (compile (define (snix-derivation->guix-package v) (let= ((failure (lambda () (error (quote match) "no =85")))) (=85))) #= =85)
=A0 =A0177:32 18 (lp (#<procedure compile-glil (x e opts)> #<proce= dure compile-asm (x e opts)> #<procedure compile-bytecode (ass=85>= =85) =85)
In language/tree-il/compile-glil.scm:
=A0 =A0 =A065:2 17 (compile-glil #<tree-il (define snix-derivation->g= uix-package (lambda ((name . snix-derivation->guix-package)) (la=85> = =85)
In language/tree-il/optimize.scm:
=A0 =A0 =A044:6 16 (optimize! #<tree-il (lambda () (lambda-case ((() #f = #f #f () ()) (define snix-derivation->guix-package (lambda ((=85> =85= )
In language/tree-il/cse.scm:
=A0 =A0537:31 15 (visit #<tree-il (lambda () (lambda-case ((() #f #f #f = () ()) (define snix-derivation->guix-package (lambda ((name=85> =85)<= br> =A0 =A0543:33 14 (visit #<tree-il (lambda-case ((() #f #f #f () ()) (def= ine snix-derivation->guix-package (lambda ((name . snix-der=85> =85)<= br> =A0 =A0483:32 13 (visit #<tree-il (define snix-derivation->guix-packa= ge (lambda ((name . snix-derivation->guix-package)) (lambda-ca=85> = =85)
=A0 =A0537:31 12 (visit #<tree-il (lambda ((name . snix-derivation->g= uix-package)) (lambda-case (((v) #f #f #f () (v-66965)) (let (=85> =85)<= br> =A0 =A0543:33 11 (visit #<tree-il (lambda-case (((v) #f #f #f () (v-6696= 5)) (let (failure) (failure-66977) ((lambda () (lambda-case=85> =85)
=A0 =A0430:34 10 (visit #<tree-il (let (failure) (failure-66977) ((lambd= a () (lambda-case ((() #f #f #f () ()) (apply (primitive er=85> =85)
=A0 =A0496:31 =A09 (visit #<tree-il (if (apply (primitive pair?) (lexica= l v v-66965)) (if (apply (primitive null?) (apply (primitive =85> =85) =A0 =A0496:31 =A08 (visit #<tree-il (if (apply (primitive null?) (apply = (primitive cdr) (lexical v v-66965))) (let (x) (x-66968) ((ap=85> =85) =A0 =A0430:34 =A07 (visit #<tree-il (let (x) (x-66968) ((apply (primitiv= e cdr) (toplevel w))) (begin (toplevel foo) (let (failure) (f=85> =85) =A0 =A0553:39 =A06 (lp (#<tree-il (let (failure) (failure-66973) ((lambd= a () (lambda-case ((() #f #f #f () ()) (apply (primitive err=85>) =85) =A0 =A0429:33 =A05 (visit #<tree-il (let (failure) (failure-66973) ((lam= bda () (lambda-case ((() #f #f #f () ()) (apply (primitive er=85> =85) =A0 =A0370:41 =A04 (lp (#<tree-il (lambda () (lambda-case ((() #f #f #f = () ()) (apply (primitive error) (const match) (const "no mat=85>) = =85)
=A0 =A0403:15 =A03 (return #<tree-il (lambda () (lambda-case ((() #f #f = #f () ()) (apply (primitive error) (const match) (const "no m=85> = =85)
=A0 =A0333:28 =A02 (find-dominating-lexical #<tree-il (lambda () (lambda= -case ((() #f #f #f () ()) (apply (primitive error) (const ma=85> =85) =A0 =A0315:10 =A01 (unroll #<vhash 2c63040 8 pairs> 8 1)
In ice-9/vlist.scm:
=A0 =A0 303:8 =A00 (vlist-ref #<vhash 2c63040 8 pairs> 8)
scheme@(guile-user) [1]> ,locals
=A0 Local variables:
=A0 $11 =3D vlist =3D #<vhash 2c63040 8 pairs>
=A0 $12 =3D index =3D 8
=A0 $13 =3D index =3D 0
=A0 $14 =3D base =3D #(#() #f 0 0 0)
=A0 $15 =3D offset =3D 0
=A0 $16 =3D content =3D #()
=A0 $17 =3D offset =3D 0
scheme@(guile-user) [1]> ,error
ice-9/vlist.scm:303:8: In procedure vlist-ref:
ice-9/vlist.scm:303:8: Value out of range: 0
--8<---------------cut here---------------end--------------->8---

Ludo=92.




--047d7bea3476b85ca004ce7b7e3b-- From unknown Thu Sep 11 13:55:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12883: [2.0.6] CSE bug 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, 14 Nov 2012 22:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12883 X-GNU-PR-Package: guile X-GNU-PR-Keywords: To: Stefan Israelsson Tampe Cc: 12883@debbugs.gnu.org Received: via spool by 12883-submit@debbugs.gnu.org id=B12883.135293109931623 (code B ref 12883); Wed, 14 Nov 2012 22:12:02 +0000 Received: (at 12883) by debbugs.gnu.org; 14 Nov 2012 22:11:39 +0000 Received: from localhost ([127.0.0.1]:42902 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TYlBK-0008E0-S6 for submit@debbugs.gnu.org; Wed, 14 Nov 2012 17:11:39 -0500 Received: from xanadu.aquilenet.fr ([88.191.123.111]:48638) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TYlBI-0008Ds-3U for 12883@debbugs.gnu.org; Wed, 14 Nov 2012 17:11:37 -0500 Received: from localhost (localhost [127.0.0.1]) by xanadu.aquilenet.fr (Postfix) with ESMTP id 390F62E9B; Wed, 14 Nov 2012 23:10:55 +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 CzRTBjImuvja; Wed, 14 Nov 2012 23:10:55 +0100 (CET) Received: from pluto (reverse-83.fdn.fr [80.67.176.83]) by xanadu.aquilenet.fr (Postfix) with ESMTPSA id 4636F297; Wed, 14 Nov 2012 23:10:54 +0100 (CET) From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <871ufwfbny.fsf@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 24 Brumaire an 221 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu Date: Wed, 14 Nov 2012 23:10:53 +0100 In-Reply-To: (Stefan Israelsson Tampe's message of "Wed, 14 Nov 2012 22:48:29 +0100") Message-ID: <876257bzte.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 Stefan, Can you send the proposed change as a unidiff patch? TIA, =?UTF-8?Q?Ludo=E2=80=99.?= [...] 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-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 Stefan, Can you send the proposed change as a unidiff patch? TIA, =?UTF-8?Q?Ludo=E2=80=99.?= [...] 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.4986] Hi Stefan, Can you send the proposed change as a unidiff patch? TIA, Ludo=E2=80=99. From unknown Thu Sep 11 13:55:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12883: [2.0.6] CSE bug Resent-From: Stefan Israelsson Tampe Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-guile@gnu.org Resent-Date: Thu, 15 Nov 2012 16:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12883 X-GNU-PR-Package: guile X-GNU-PR-Keywords: To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 12883@debbugs.gnu.org Received: via spool by 12883-submit@debbugs.gnu.org id=B12883.13529963558581 (code B ref 12883); Thu, 15 Nov 2012 16:20:02 +0000 Received: (at 12883) by debbugs.gnu.org; 15 Nov 2012 16:19:15 +0000 Received: from localhost ([127.0.0.1]:45431 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TZ29q-0002EM-GQ for submit@debbugs.gnu.org; Thu, 15 Nov 2012 11:19:14 -0500 Received: from mail-qc0-f172.google.com ([209.85.216.172]:54090) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TZ29o-0002EF-RT for 12883@debbugs.gnu.org; Thu, 15 Nov 2012 11:19:13 -0500 Received: by mail-qc0-f172.google.com with SMTP id b25so1211032qca.3 for <12883@debbugs.gnu.org>; Thu, 15 Nov 2012 08:18:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=di+/MA0jEy43BRix3PCmUtBFvjRuD7Mx8zpau4ow9v4=; b=cKdXtlXGDvZKoKtjh7sYyZyCUYhmfM3MODTbrR+qnk3JDQfn9sDhyV+4fFSwcUqtg7 NlFLxzQkTJr2PE/X+9dWhGI2LI2VYzCEyiawI35Z/zJJt2E1PULqBGR5U6YjJ3vNLD/c ZWvXyHyScYNMv2qaiLxycjaz3f01ET8UMLn7fEPsKP+aQ41L/dSmqEk6vqY1YVwOdM7C 4dpvevpIVlVsHTKmDRKxpkzbkreI8Lxp8tm/Hlqgf+rRxGRRUOoiP7GOJL0h2Lyu97ur 4n09uoPKk0/A468cUDFGe/5QAbYX3oDO6kTGhiVGHffr/uTGG7eWpT6kO5kt9N8+Nj2A hdnA== MIME-Version: 1.0 Received: by 10.224.39.83 with SMTP id f19mr1551748qae.76.1352996309636; Thu, 15 Nov 2012 08:18:29 -0800 (PST) Received: by 10.49.121.104 with HTTP; Thu, 15 Nov 2012 08:18:29 -0800 (PST) In-Reply-To: <876257bzte.fsf@gnu.org> References: <871ufwfbny.fsf@gnu.org> <876257bzte.fsf@gnu.org> Date: Thu, 15 Nov 2012 17:18:29 +0100 Message-ID: From: Stefan Israelsson Tampe Content-Type: multipart/mixed; boundary=20cf3074b3a66b146404ce8b0063 X-Spam-Score: 0.1 (/) 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: 0.1 (/) --20cf3074b3a66b146404ce8b0063 Content-Type: multipart/alternative; boundary=20cf3074b3a66b146004ce8b0061 --20cf3074b3a66b146004ce8b0061 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable I did git diff cse.scm > cse.diff and send it with this mail (I removed the logging code though) On Wed, Nov 14, 2012 at 11:10 PM, Ludovic Court=E8s wrote: > Hi Stefan, > > Can you send the proposed change as a unidiff patch? > > TIA, > Ludo=92. > --20cf3074b3a66b146004ce8b0061 Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: quoted-printable I did

git diff cse.scm > cse.diff

and send it with this m= ail (I removed the logging code though)






On Wed, Nov 14, 2012 at 11:10= PM, Ludovic Court=E8s <ludo@gnu.org> wrote:
Hi Stefan,

Can you send the proposed change as a unidiff patch?

TIA,
Ludo=92.

--20cf3074b3a66b146004ce8b0061-- --20cf3074b3a66b146404ce8b0063 Content-Type: application/octet-stream; name="cse.diff" Content-Disposition: attachment; filename="cse.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_h9k382f80 ZGlmZiAtLWdpdCBhL21vZHVsZS9sYW5ndWFnZS90cmVlLWlsL2NzZS5zY20gYi9tb2R1bGUvbGFu Z3VhZ2UvdHJlZS1pbC9jc2Uuc2NtCmluZGV4IDQwZjY0MTkuLjllNjgzYmEgMTAwNjQ0Ci0tLSBh L21vZHVsZS9sYW5ndWFnZS90cmVlLWlsL2NzZS5zY20KKysrIGIvbW9kdWxlL2xhbmd1YWdlL3Ry ZWUtaWwvY3NlLnNjbQpAQCAtMzI0LDEwICszMjQsMTEgQEAKICAgICAgICAgICAgICAgIChhbmQg KDwgbiBlbnYtbGVuKQogICAgICAgICAgICAgICAgICAgICAobWF0Y2ggKHZsaXN0LXJlZiBlbnYg bikKICAgICAgICAgICAgICAgICAgICAgICAoKCMoZXhwKiBuYW1lIHN5bSBkYi1sZW4qKSAuIGgq KQotICAgICAgICAgICAgICAgICAgICAgICAoYW5kICh1bnJvbGwgZGIgbSAoLSBkYi1sZW4gZGIt bGVuKikpCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgKGlmIChhbmQgKD0gaCBoKikgKHRy ZWUtaWw9PyBleHAqIGV4cCkpCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChtYWtl LWxleGljYWwtcmVmICh0cmVlLWlsLXNyYyBleHApIG5hbWUgc3ltKQotICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAobHAgKDErIG4pICgtIGRiLWxlbiBkYi1sZW4qKSkpKSkpKSkpKSkp CisgICAgICAgICAgICAgICAgICAgICAgIChsZXQgKChuaXRlciAoLSAoLSBkYi1sZW4gZGItbGVu KikgbSkpKQorICAgICAgICAgICAgICAgICAgICAgICAgIChhbmQgKHVucm9sbCBkYiBtICgtIGRi LWxlbiBkYi1sZW4qKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChpZiAoYW5kICg9 IGggaCopICh0cmVlLWlsPT8gZXhwKiBleHApKQorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIChtYWtlLWxleGljYWwtcmVmICh0cmVlLWlsLXNyYyBleHApIG5hbWUgc3ltKQorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChscCAoMSsgbikgKC0gZGItbGVuIGRiLWxl biopKSkpKSkpKSkpKSkpCiAKICAgKGRlZmluZSAobG9va3VwLWxleGljYWwgc3ltIGVudikKICAg ICAobGV0ICgoZW52LWxlbiAodmxpc3QtbGVuZ3RoIGVudikpKQo= --20cf3074b3a66b146404ce8b0063-- From unknown Thu Sep 11 13:55:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12883: [2.0.6] CSE bug 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: Thu, 15 Nov 2012 16:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12883 X-GNU-PR-Package: guile X-GNU-PR-Keywords: To: Stefan Israelsson Tampe Cc: 12883@debbugs.gnu.org Received: via spool by 12883-submit@debbugs.gnu.org id=B12883.13529967289126 (code B ref 12883); Thu, 15 Nov 2012 16:26:02 +0000 Received: (at 12883) by debbugs.gnu.org; 15 Nov 2012 16:25:28 +0000 Received: from localhost ([127.0.0.1]:45438 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TZ2Fr-0002N9-C3 for submit@debbugs.gnu.org; Thu, 15 Nov 2012 11:25:27 -0500 Received: from xanadu.aquilenet.fr ([88.191.123.111]:36405) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TZ2Fo-0002N0-6N for 12883@debbugs.gnu.org; Thu, 15 Nov 2012 11:25:25 -0500 Received: from localhost (localhost [127.0.0.1]) by xanadu.aquilenet.fr (Postfix) with ESMTP id 8D2AA6CD0; Thu, 15 Nov 2012 17:24:40 +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 iBt9Sq-d8PsA; Thu, 15 Nov 2012 17:24:40 +0100 (CET) Received: from pluto (unknown [193.50.110.189]) by xanadu.aquilenet.fr (Postfix) with ESMTPSA id 3EBDE6B8E; Thu, 15 Nov 2012 17:24:40 +0100 (CET) From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <871ufwfbny.fsf@gnu.org> <876257bzte.fsf@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 25 Brumaire an 221 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu Date: Thu, 15 Nov 2012 17:24:40 +0100 In-Reply-To: (Stefan Israelsson Tampe's message of "Thu, 15 Nov 2012 17:18:29 +0100") Message-ID: <87zk2iltpz.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 Stefan! Stefan Israelsson Tampe skribis: > --- a/module/language/tree-il/cse.scm > +++ b/module/language/tree-il/cse.scm > @@ -324, 10 +324, 11 @@ > (and (< n env-len) > (match (vlist-ref env n) > ((#(exp* name sym db-len*) . h*) > - (and (unroll db m (- db-len db-len*)) > - (if (and (= h h*) (tree-il=? exp* exp)) > - (make-lexical-ref (tree-il-src exp) name sym) > - (lp (1+ n) (- db-len db-len*)))))))))))) > + (let ((niter (- (- db-len db-len*) m))) > + (and (unroll db m (- db-len db-len*)) > + (if (and (= h h*) (tree-il=? exp* exp)) > + (make-lexical-ref (tree-il-src exp) name sym) > + (lp (1+ n) (- db-len db-len*))))))))))))) > > (define (lookup-lexical sym env) > (let ((env-len (vlist-length env))) [...] 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.4999] 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 Stefan! Stefan Israelsson Tampe skribis: > --- a/module/language/tree-il/cse.scm > +++ b/module/language/tree-il/cse.scm > @@ -324,10 +324,11 @@ > (and (< n env-len) > (match (vlist-ref env n) > ((#(exp* name sym db-len*) . h*) > - (and (unroll db m (- db-len db-len*)) > - (if (and (= h h*) (tree-il=? exp* exp)) > - (make-lexical-ref (tree-il-src exp) name sym) > - (lp (1+ n) (- db-len db-len*)))))))))))) > + (let ((niter (- (- db-len db-len*) m))) > + (and (unroll db m (- db-len db-len*)) > + (if (and (= h h*) (tree-il=? exp* exp)) > + (make-lexical-ref (tree-il-src exp) name sym) > + (lp (1+ n) (- db-len db-len*))))))))))))) > > (define (lookup-lexical sym env) > (let ((env-len (vlist-length env))) [...] 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.4781] Hi Stefan! Stefan Israelsson Tampe skribis: > --- a/module/language/tree-il/cse.scm > +++ b/module/language/tree-il/cse.scm > @@ -324,10 +324,11 @@ > (and (< n env-len) > (match (vlist-ref env n) > ((#(exp* name sym db-len*) . h*) > - (and (unroll db m (- db-len db-len*)) > - (if (and (=3D h h*) (tree-il=3D? exp* exp)) > - (make-lexical-ref (tree-il-src exp) name= sym) > - (lp (1+ n) (- db-len db-len*)))))))))))) > + (let ((niter (- (- db-len db-len*) m))) > + (and (unroll db m (- db-len db-len*)) > + (if (and (=3D h h*) (tree-il=3D? exp* exp)) > + (make-lexical-ref (tree-il-src exp) na= me sym) > + (lp (1+ n) (- db-len db-len*))))))))))= ))) >=20=20 > (define (lookup-lexical sym env) > (let ((env-len (vlist-length env))) Hmm, the only thing it changes is that an unused variable is introduced, no? Am I missing something? Thanks, Ludo=E2=80=99. From unknown Thu Sep 11 13:55:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12883: [2.0.6] CSE bug Resent-From: Stefan Israelsson Tampe Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-guile@gnu.org Resent-Date: Thu, 15 Nov 2012 16:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12883 X-GNU-PR-Package: guile X-GNU-PR-Keywords: To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 12883@debbugs.gnu.org Received: via spool by 12883-submit@debbugs.gnu.org id=B12883.13529969769570 (code B ref 12883); Thu, 15 Nov 2012 16:30:02 +0000 Received: (at 12883) by debbugs.gnu.org; 15 Nov 2012 16:29:36 +0000 Received: from localhost ([127.0.0.1]:45458 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TZ2Js-0002UJ-Fc for submit@debbugs.gnu.org; Thu, 15 Nov 2012 11:29:36 -0500 Received: from mail-qa0-f44.google.com ([209.85.216.44]:50747) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TZ2Jq-0002UC-Dr for 12883@debbugs.gnu.org; Thu, 15 Nov 2012 11:29:35 -0500 Received: by mail-qa0-f44.google.com with SMTP id c4so2461137qae.3 for <12883@debbugs.gnu.org>; Thu, 15 Nov 2012 08:28:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=dSndNejdA1f4BYn5Az8iEYWX3s+3gBd3EquKMgMmNgk=; b=XC0e4yVEeF216LiRxjNha6fc0XBcqkuamdrZxtLB5pJO/vuQruOy/XxKOh8ez2isem 4UpRrbikdpXLfVdOtVmmnjcMyPo9RVnlS1l7cqGorpcxxZK4CtCfLFmpQr9aAAT+vvYo zxRY9lIK8JQnZSEthmG48uH6bRQZB6FM9VciZF+enDAoNEPQaSCcUIZ+DSLjfdlx2hNT 9smPDBt7HZTWN/Td6+fCXTcgl+/pYOkYcI2FnzUq6tiX5ml5MR/PVG6FHbwAsXgSIpY/ xoBZ8VYVID8bwQomqXaQ7MA4IDA6XPHKNWeXil8UCkGqhcXj3ZqVUbxwZ0R0m/69pEh3 KE8w== MIME-Version: 1.0 Received: by 10.224.42.139 with SMTP id s11mr1600170qae.52.1352996930225; Thu, 15 Nov 2012 08:28:50 -0800 (PST) Received: by 10.49.121.104 with HTTP; Thu, 15 Nov 2012 08:28:50 -0800 (PST) In-Reply-To: <87zk2iltpz.fsf@gnu.org> References: <871ufwfbny.fsf@gnu.org> <876257bzte.fsf@gnu.org> <87zk2iltpz.fsf@gnu.org> Date: Thu, 15 Nov 2012 17:28:50 +0100 Message-ID: From: Stefan Israelsson Tampe Content-Type: multipart/mixed; boundary=20cf3074d8626887e804ce8b2532 X-Spam-Score: 0.1 (/) 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.2 (-) --20cf3074d8626887e804ce8b2532 Content-Type: multipart/alternative; boundary=20cf3074d8626887e404ce8b2530 --20cf3074d8626887e404ce8b2530 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable This is better! On Thu, Nov 15, 2012 at 5:24 PM, Ludovic Court=E8s wrote: > Hi Stefan! > > Stefan Israelsson Tampe skribis: > > > --- a/module/language/tree-il/cse.scm > > +++ b/module/language/tree-il/cse.scm > > @@ -324,10 +324,11 @@ > > (and (< n env-len) > > (match (vlist-ref env n) > > ((#(exp* name sym db-len*) . h*) > > - (and (unroll db m (- db-len db-len*)) > > - (if (and (=3D h h*) (tree-il=3D? exp* exp)= ) > > - (make-lexical-ref (tree-il-src exp) > name sym) > > - (lp (1+ n) (- db-len db-len*))))))))))= )) > > + (let ((niter (- (- db-len db-len*) m))) > > + (and (unroll db m (- db-len db-len*)) > > + (if (and (=3D h h*) (tree-il=3D? exp* ex= p)) > > + (make-lexical-ref (tree-il-src exp) > name sym) > > + (lp (1+ n) (- db-len > db-len*))))))))))))) > > > > (define (lookup-lexical sym env) > > (let ((env-len (vlist-length env))) > > Hmm, the only thing it changes is that an unused variable is introduced, > no? Am I missing something? > > Thanks, > Ludo=92. > --20cf3074d8626887e404ce8b2530 Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: quoted-printable This is better!



On Thu, Nov 15, 2012 at 5:24 PM, Ludovic Court=E8s <ludo@gnu.org&= gt; wrote:
Hi Stefan!

Stefan Israelsson Tampe <stef= an.itampe@gmail.com> skribis:

> --- a/module/language/tree-il/cse.scm
> +++ b/module/language/tree-il/cse.scm
> @@ -324,10 +324,11 @@
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (and (< n env-len= )
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(match (vlist-ref env n) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0((#(exp* name sym db-le= n*) . h*)
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (and (unroll db m = (- db-len db-len*))
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(if (and (=3D= h h*) (tree-il=3D? exp* exp))
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(make= -lexical-ref (tree-il-src exp) name sym)
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(lp (= 1+ n) (- db-len db-len*))))))))))))
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (let ((niter (- (- db-le= n db-len*) m)))
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (and (unroll db m (-= db-len db-len*))
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(if (and = (=3D h h*) (tree-il=3D? exp* exp))
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(= make-lexical-ref (tree-il-src exp) name sym)
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(= lp (1+ n) (- db-len db-len*)))))))))))))
>
> =A0 =A0(define (lookup-lexical sym env)
> =A0 =A0 =A0(let ((env-len (vlist-length env)))

Hmm, the only thing it changes is that an unused variable is introduced, no? =A0Am I missing something?

Thanks,
Ludo=92.

--20cf3074d8626887e404ce8b2530-- --20cf3074d8626887e804ce8b2532 Content-Type: application/octet-stream; name="cse.diff" Content-Disposition: attachment; filename="cse.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_h9k3le400 ZGlmZiAtLWdpdCBhL21vZHVsZS9sYW5ndWFnZS90cmVlLWlsL2NzZS5zY20gYi9tb2R1bGUvbGFu Z3VhZ2UvdHJlZS1pbC9jc2Uuc2NtCmluZGV4IDQwZjY0MTkuLmY4ZmQxY2QgMTAwNjQ0Ci0tLSBh L21vZHVsZS9sYW5ndWFnZS90cmVlLWlsL2NzZS5zY20KKysrIGIvbW9kdWxlL2xhbmd1YWdlL3Ry ZWUtaWwvY3NlLnNjbQpAQCAtMzI0LDEwICszMjQsMTEgQEAKICAgICAgICAgICAgICAgIChhbmQg KDwgbiBlbnYtbGVuKQogICAgICAgICAgICAgICAgICAgICAobWF0Y2ggKHZsaXN0LXJlZiBlbnYg bikKICAgICAgICAgICAgICAgICAgICAgICAoKCMoZXhwKiBuYW1lIHN5bSBkYi1sZW4qKSAuIGgq KQotICAgICAgICAgICAgICAgICAgICAgICAoYW5kICh1bnJvbGwgZGIgbSAoLSBkYi1sZW4gZGIt bGVuKikpCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgKGlmIChhbmQgKD0gaCBoKikgKHRy ZWUtaWw9PyBleHAqIGV4cCkpCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChtYWtl LWxleGljYWwtcmVmICh0cmVlLWlsLXNyYyBleHApIG5hbWUgc3ltKQotICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAobHAgKDErIG4pICgtIGRiLWxlbiBkYi1sZW4qKSkpKSkpKSkpKSkp CisgICAgICAgICAgICAgICAgICAgICAgIChsZXQgKChuaXRlciAoLSAoLSBkYi1sZW4gZGItbGVu KikgbSkpKQorICAgICAgICAgICAgICAgICAgICAgICAgIChhbmQgKHVucm9sbCBkYiBtIG5pdGVy KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGlmIChhbmQgKD0gaCBoKikgKHRyZWUt aWw9PyBleHAqIGV4cCkpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKG1ha2Ut bGV4aWNhbC1yZWYgKHRyZWUtaWwtc3JjIGV4cCkgbmFtZSBzeW0pCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgKGxwICgxKyBuKSAoLSBkYi1sZW4gZGItbGVuKikpKSkpKSkpKSkp KSkKIAogICAoZGVmaW5lIChsb29rdXAtbGV4aWNhbCBzeW0gZW52KQogICAgIChsZXQgKChlbnYt bGVuICh2bGlzdC1sZW5ndGggZW52KSkpCg== --20cf3074d8626887e804ce8b2532-- From unknown Thu Sep 11 13:55:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12883: [2.0.6] CSE bug 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: Sun, 18 Nov 2012 23:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12883 X-GNU-PR-Package: guile X-GNU-PR-Keywords: To: Stefan Israelsson Tampe Cc: 12883@debbugs.gnu.org Received: via spool by 12883-submit@debbugs.gnu.org id=B12883.13532800987142 (code B ref 12883); Sun, 18 Nov 2012 23:09:02 +0000 Received: (at 12883) by debbugs.gnu.org; 18 Nov 2012 23:08:18 +0000 Received: from localhost ([127.0.0.1]:53690 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TaDyM-0001r9-6B for submit@debbugs.gnu.org; Sun, 18 Nov 2012 18:08:18 -0500 Received: from mail4-relais-sop.national.inria.fr ([192.134.164.105]:39244) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TaDyJ-0001r0-2W for 12883@debbugs.gnu.org; Sun, 18 Nov 2012 18:08:16 -0500 X-IronPort-AV: E=Sophos;i="4.83,275,1352070000"; d="scan'208";a="162916437" Received: from reverse-83.fdn.fr (HELO pluto) ([80.67.176.83]) by mail4-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES128-SHA; 19 Nov 2012 00:07:12 +0100 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <871ufwfbny.fsf@gnu.org> <876257bzte.fsf@gnu.org> <87zk2iltpz.fsf@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 29 Brumaire an 221 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu Date: Mon, 19 Nov 2012 00:07:12 +0100 In-Reply-To: (Stefan Israelsson Tampe's message of "Thu, 15 Nov 2012 17:28:50 +0100") Message-ID: <87fw46fr33.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: -3.5 (---) 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: -3.5 (---) Hi Stefan, Stefan Israelsson Tampe skribis: > --- a/module/language/tree-il/cse.scm > +++ b/module/language/tree-il/cse.scm > @@ -324,10 +324,11 @@ > (and (< n env-len) > (match (vlist-ref env n) > ((#(exp* name sym db-len*) . h*) > - (and (unroll db m (- db-len db-len*)) > - (if (and (=3D h h*) (tree-il=3D? exp* exp)) > - (make-lexical-ref (tree-il-src exp) name= sym) > - (lp (1+ n) (- db-len db-len*)))))))))))) > + (let ((niter (- (- db-len db-len*) m))) > + (and (unroll db m niter) > + (if (and (=3D h h*) (tree-il=3D? exp* exp)) > + (make-lexical-ref (tree-il-src exp) na= me sym) > + (lp (1+ n) (- db-len db-len*))))))))))= ))) >=20=20 > (define (lookup-lexical sym env) > (let ((env-len (vlist-length env))) I can confirm it solves the problem, but I don=E2=80=99t fully understand w= hat=E2=80=99s going on here. Could you elaborate? :-) Also, it would be great if you could send a =E2=80=98git format-patch=E2=80= =99 kind of patch, with the original test case (and possibly others) added to cse.test, along with the URL of this bug, and a proper ChangeLog-style commit log. TIA, :-) Ludo=E2=80=99. From unknown Thu Sep 11 13:55:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12883: [2.0.6] CSE bug Resent-From: Stefan Israelsson Tampe Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-guile@gnu.org Resent-Date: Mon, 19 Nov 2012 11:35:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12883 X-GNU-PR-Package: guile X-GNU-PR-Keywords: To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 12883@debbugs.gnu.org Received: via spool by 12883-submit@debbugs.gnu.org id=B12883.13533248688090 (code B ref 12883); Mon, 19 Nov 2012 11:35:01 +0000 Received: (at 12883) by debbugs.gnu.org; 19 Nov 2012 11:34:28 +0000 Received: from localhost ([127.0.0.1]:54521 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TaPcR-00026R-Hi for submit@debbugs.gnu.org; Mon, 19 Nov 2012 06:34:28 -0500 Received: from mail-qc0-f172.google.com ([209.85.216.172]:54657) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TaPcN-00026I-UJ for 12883@debbugs.gnu.org; Mon, 19 Nov 2012 06:34:25 -0500 Received: by mail-qc0-f172.google.com with SMTP id b25so3398168qca.3 for <12883@debbugs.gnu.org>; Mon, 19 Nov 2012 03:33:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=HacneiaKhejH8Pe75qOs69OwS1Zaozf1BQM+xtBc28E=; b=to70ha4SKnPSZaKXD84ttzEa8Px6IMzanIXPXEHlsY/zc1OuqYOUxVSVcxGyQnITnw 91Wlyru4011zfw9f6rLuWVeZKlcLeAVaZQx5l8HYISXrYOot+p6+HwsU/B9/DBL/twpK NYiUYWzb4eY9dsXYCXHzaK2u4lsVLrY+OgTuOYC9sPhdHXx42S3/aySJDsTMW3KUjniz HxbfRxhNMH/7ybWpTCebseDBJgs0a58m1ILFoxxpe1lNTdTZkaH5/JHawhra5YViq4aJ chHKWq+LgwTgoHO7ZE4mSEJIuh13P1yFkAtv/WJLhgJECByxswdQW7GgoQw/YQa3ToA3 0S3A== MIME-Version: 1.0 Received: by 10.49.133.195 with SMTP id pe3mr1574568qeb.58.1353324798053; Mon, 19 Nov 2012 03:33:18 -0800 (PST) Received: by 10.49.28.135 with HTTP; Mon, 19 Nov 2012 03:33:17 -0800 (PST) In-Reply-To: <87fw46fr33.fsf@gnu.org> References: <871ufwfbny.fsf@gnu.org> <876257bzte.fsf@gnu.org> <87zk2iltpz.fsf@gnu.org> <87fw46fr33.fsf@gnu.org> Date: Mon, 19 Nov 2012 12:33:17 +0100 Message-ID: From: Stefan Israelsson Tampe Content-Type: multipart/alternative; boundary=047d7bea3518da8ea204ced77b2b X-Spam-Score: 0.1 (/) 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: 0.1 (/) --047d7bea3518da8ea204ced77b2b Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable I will send an updated patch later, but to explain I'm not the author of this so I need you to follow my analyze or we will wait for the author to check this! The intention of unroll is to scan db to check that a commutative property for an item going into the function holds for all elements in db up to h=3D=3Dh* is found. Now at each symbol db-len* is the length of db when created so (- db-len db-len*) is the length of all elements in db created after the symbol name. now db-len* will in the loop lp be decreasing so this length is increasing and the base =3D m is the position in db where we scan to last time, the fix was to make sure we scan up to the db-len* 'index' e.g. niter had to be corrected by the base m. Otherwise we could scan out of the length of db* and the error we saw was introduced. Another fix is for unroll to return #t if the length is out of the db length but this is probably a bandage, not the bug, the bug is most probably fixed by this patch. Is things more clear now? Anyway you can add traces to check how the fuction scans db as in my first mail, that shows how the system worked and it shows the consistency with the first iteration of the loop which is unaffected by the fix /Stefan On Mon, Nov 19, 2012 at 12:07 AM, Ludovic Court=E8s wrote: > Hi Stefan, > > Stefan Israelsson Tampe skribis: > > > --- a/module/language/tree-il/cse.scm > > +++ b/module/language/tree-il/cse.scm > > @@ -324,10 +324,11 @@ > > (and (< n env-len) > > (match (vlist-ref env n) > > ((#(exp* name sym db-len*) . h*) > > - (and (unroll db m (- db-len db-len*)) > > - (if (and (=3D h h*) (tree-il=3D? exp* exp)= ) > > - (make-lexical-ref (tree-il-src exp) > name sym) > > - (lp (1+ n) (- db-len db-len*))))))))))= )) > > + (let ((niter (- (- db-len db-len*) m))) > > + (and (unroll db m niter) > > + (if (and (=3D h h*) (tree-il=3D? exp* ex= p)) > > + (make-lexical-ref (tree-il-src exp) > name sym) > > + (lp (1+ n) (- db-len > db-len*))))))))))))) > > > > (define (lookup-lexical sym env) > > (let ((env-len (vlist-length env))) > > I can confirm it solves the problem, but I don=92t fully understand what= =92s > going on here. Could you elaborate? :-) > > Also, it would be great if you could send a =91git format-patch=92 kind o= f > patch, with the original test case (and possibly others) added to > cse.test, along with the URL of this bug, and a proper ChangeLog-style > commit log. > > TIA, :-) > Ludo=92. > --047d7bea3518da8ea204ced77b2b Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: quoted-printable I will send an updated patch later, but to explain

I'm not the a= uthor of this so I need you to follow my analyze or we will wait for
th= e author to check this!

The intention of unroll is to scan db to che= ck that a commutative property
for an item going into the function holds for all elements in db up to h=3D= =3Dh* is
found. Now at each symbol db-len* is the length of db when crea= ted so
(- db-len db-len*) is the length of all elements in db created af= ter the symbol name.
now db-len* will in the loop lp be decreasing so this length is increasing = and the base =3D m
is the position in db where we scan to last time, the= fix was to make sure we scan up to
the db-len* 'index' e.g. nit= er had to be corrected by the base m. Otherwise we could scan out of
the length of db* and the error we saw was introduced. Another fix is for u= nroll to return #t
if the length is out of the db length but this is pro= bably a bandage, not the bug, the bug is most probably
fixed by this pa= tch.

Is things more clear now?

Anyway you can add traces to check how= the fuction scans db as in my first mail, that shows how the system
wor= ked and it shows the consistency with the first iteration of the loop which= is unaffected by the fix

/Stefan



On Mon, Nov 19, 2012 at 12:07 AM, Ludovic Court=E8s <ludo@gnu.org>= wrote:
Hi Stefan,

Stefan Israelsson Tampe <stef= an.itampe@gmail.com> skribis:

> --- a/module/language/tree-il/cse.scm
> +++ b/module/language/tree-il/cse.scm
> @@ -324,10 +324,11 @@
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (and (< n env-len)
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(match (vlist-ref env n) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0((#(exp* name sym db-le= n*) . h*)
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (and (unroll db m (- db-= len db-len*))
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(if (and (=3D= h h*) (tree-il=3D? exp* exp))
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(make= -lexical-ref (tree-il-src exp) name sym)
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(lp (= 1+ n) (- db-len db-len*))))))))))))
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (let ((niter (- (- db-le= n db-len*) m)))
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (and (unroll d= b m niter)
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0(if (and (=3D h h*) (tree-il=3D? exp* exp))
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(= make-lexical-ref (tree-il-src exp) name sym)
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(= lp (1+ n) (- db-len db-len*)))))))))))))
>
> =A0 =A0(define (lookup-lexical sym env)
> =A0 =A0 =A0(let ((env-len (vlist-length env)))

I can confirm it solves the problem, but I don=92t fully understand w= hat=92s
going on here. =A0Could you elaborate? =A0:-)

Also, it would be great if you could send a =91git format-patch=92 kind of<= br> patch, with the original test case (and possibly others) added to
cse.test, along with the URL of this bug, and a proper ChangeLog-style
commit log.

TIA, =A0:-)
Ludo=92.

--047d7bea3518da8ea204ced77b2b-- From unknown Thu Sep 11 13:55:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12883: [2.0.6] CSE bug 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: Tue, 20 Nov 2012 21:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12883 X-GNU-PR-Package: guile X-GNU-PR-Keywords: To: Stefan Israelsson Tampe Cc: 12883@debbugs.gnu.org Received: via spool by 12883-submit@debbugs.gnu.org id=B12883.135344653618028 (code B ref 12883); Tue, 20 Nov 2012 21:23:02 +0000 Received: (at 12883) by debbugs.gnu.org; 20 Nov 2012 21:22:16 +0000 Received: from localhost ([127.0.0.1]:57458 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TavGp-0004gj-O6 for submit@debbugs.gnu.org; Tue, 20 Nov 2012 16:22:15 -0500 Received: from xanadu.aquilenet.fr ([88.191.123.111]:45803) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TavGo-0004gY-8O for 12883@debbugs.gnu.org; Tue, 20 Nov 2012 16:22:15 -0500 Received: from localhost (localhost [127.0.0.1]) by xanadu.aquilenet.fr (Postfix) with ESMTP id 06641ABAC; Tue, 20 Nov 2012 22:21:01 +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 NCEJwzI-hHJh; Tue, 20 Nov 2012 22:21:00 +0100 (CET) Received: from pluto (reverse-83.fdn.fr [80.67.176.83]) by xanadu.aquilenet.fr (Postfix) with ESMTPSA id 7EDBEABA8; Tue, 20 Nov 2012 22:21:00 +0100 (CET) From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) In-Reply-To: (Stefan Israelsson Tampe's message of "Mon, 19 Nov 2012 12:33:17 +0100") Date: Tue, 20 Nov 2012 21:16:34 +0100 Message-ID: <87fw44ni71.fsf@gnu.org> References: <871ufwfbny.fsf@gnu.org> <876257bzte.fsf@gnu.org> <87zk2iltpz.fsf@gnu.org> <87fw46fr33.fsf@gnu.org> User-Agent: Gnus/5.130005 (Ma Gnus v0.5) Emacs/24.2 (gnu/linux) X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 30 Brumaire an 221 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu 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 Stefan! Thanks for your message! Stefan Israelsson Tampe 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-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 Stefan! Thanks for your message! Stefan Israelsson Tampe 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.4963] Hi Stefan! Thanks for your message! Stefan Israelsson Tampe skribis: > The intention of unroll is to scan db to check that a commutative > property for an item going into the function holds for all elements in > db up to h=3D=3Dh* is found. I think this sentence is ungrammatical, or at least I=E2=80=99m lost. The comments in cse.scm convey the big picture, but I miss the connection between that and the actual code. > Now at each symbol db-len* is the length of db when created so (- > db-len db-len*) is the length of all elements in db created after the > symbol name. now db-len* will in the loop lp be decreasing so this > length is increasing and the base =3D m is the position in db where we > scan to last time, the fix was to make sure we scan up to the db-len* > 'index' e.g. niter had to be corrected by the base m. Otherwise we > could scan out of the length of db* and the error we saw was > introduced. Another fix is for unroll to return #t if the length is > out of the db length but this is probably a bandage, not the bug, the > bug is most probably fixed by this patch. > > Is things more clear now? >From a pure boundary analysis viewpoint, it=E2=80=99s a somewhat clearer. Should I apply the patch, or did you want to prepare another one? I tried further reducing the test case, and synthesizing the new one, but the little understanding I have of this code doesn=E2=80=99t allow me t= o do the latter. Any help would be welcome. Thanks! Ludo=E2=80=99. From unknown Thu Sep 11 13:55:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12883: [2.0.6] CSE bug Resent-From: Stefan Israelsson Tampe Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-guile@gnu.org Resent-Date: Wed, 21 Nov 2012 14:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12883 X-GNU-PR-Package: guile X-GNU-PR-Keywords: To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 12883@debbugs.gnu.org Received: via spool by 12883-submit@debbugs.gnu.org id=B12883.135350842011551 (code B ref 12883); Wed, 21 Nov 2012 14:34:02 +0000 Received: (at 12883) by debbugs.gnu.org; 21 Nov 2012 14:33:40 +0000 Received: from localhost ([127.0.0.1]:58451 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TbBMx-00030F-ML for submit@debbugs.gnu.org; Wed, 21 Nov 2012 09:33:40 -0500 Received: from mail-qc0-f172.google.com ([209.85.216.172]:35610) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TbBMr-000304-Vp for 12883@debbugs.gnu.org; Wed, 21 Nov 2012 09:33:37 -0500 Received: by mail-qc0-f172.google.com with SMTP id b25so5192790qca.3 for <12883@debbugs.gnu.org>; Wed, 21 Nov 2012 06:32:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=gamPH12IJF9jAE6hXx87ct8XgARxVsfr2YAduQ3bXis=; b=iJBU0BBrcwMVhYFUjy7VHKng+fKVadpJsb7pqttZKxgPmht0qO8EVMqeuYNT1/3yxP 07pIIopcTQbWVhWrN3bbHl1M9+TRueMKXqbPHp+sIF6WMh45jGzAHhQW2Xn1qx8XqqsR jbb4ol1+XtqHE++3CmpYqhOOPxUI+5E9dtLc745qmeDRZTlCkm98Gl3PmA1MHcpjkp5p U3J64h1t3+DhkrHwt/sk5KZ8n3X8r5pKyk8m9GxapQB+EAFUX1pJJGhoJidofLs64Zc4 7l9OakwK2WDolInmEg7WwOFkz6IcqWJ5ZcowuxBvVD1ICG6OxvD7BBgAYY0m5dSyI91Z kWZw== MIME-Version: 1.0 Received: by 10.224.42.139 with SMTP id s11mr18084013qae.52.1353508336514; Wed, 21 Nov 2012 06:32:16 -0800 (PST) Received: by 10.49.28.135 with HTTP; Wed, 21 Nov 2012 06:32:16 -0800 (PST) In-Reply-To: <87fw44ni71.fsf@gnu.org> References: <871ufwfbny.fsf@gnu.org> <876257bzte.fsf@gnu.org> <87zk2iltpz.fsf@gnu.org> <87fw46fr33.fsf@gnu.org> <87fw44ni71.fsf@gnu.org> Date: Wed, 21 Nov 2012 15:32:16 +0100 Message-ID: From: Stefan Israelsson Tampe Content-Type: multipart/alternative; boundary=20cf3074d8629936fb04cf02374c X-Spam-Score: 0.1 (/) 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: 0.1 (/) --20cf3074d8629936fb04cf02374c Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable > I think this sentence is ungrammatical, or at least I=92m lost. eh, sorry, but consider the db as h,db-len e1 <- m =3D 0 e2 e3 e4 e5 e6 <- h* e7 then db-len is 7 and db-len* is 2 and db-len - deb-len* =3D 5 which is the number of steps to go from e2 to e6, e.g. we will scan through the list from m =3D 0 ro h* and verify that we do not enter an element that is not commutative for the expression at hand. This is the logic of before, but if m =3D k at e1 and db-len =3D 7 + k, and db-len* is again 2 we must use db-len - fb-len* - k to get the right number of iterations to go from m to h*, so you see as we try consecutive h* in the search we will scan for violations of the commutativity in batches covering the whole path from m=3D0 to the found h* =3D h. Because m was missing in the calculation = of the number of iteration to many iterations was done and generally this could mean that optimizations opportunities was lost or that we hit the end of the list and the error as you noticed was triggered. please apply the patch and enter a suitable docstring for the commit. A suggestion for test code is to design cases where various code fragment that hinders the commutation is placed and one verify that no error will result for missing in the commutativity check. To verify that it optimizes is more difficult to do in a test-case. I could help to try design a few of these testcases, also making sure all test passes after patching the code is also still needed (of cause). On Tue, Nov 20, 2012 at 9:16 PM, Ludovic Court=E8s wrote: > Hi Stefan! > > Thanks for your message! > > Stefan Israelsson Tampe skribis: > > > The intention of unroll is to scan db to check that a commutative > > property for an item going into the function holds for all elements in > > db up to h=3D=3Dh* is found. > > I think this sentence is ungrammatical, or at least I=92m lost. > > The comments in cse.scm convey the big picture, but I miss the > connection between that and the actual code. > > > Now at each symbol db-len* is the length of db when created so (- > > db-len db-len*) is the length of all elements in db created after the > > symbol name. now db-len* will in the loop lp be decreasing so this > > length is increasing and the base =3D m is the position in db where we > > scan to last time, the fix was to make sure we scan up to the db-len* > > 'index' e.g. niter had to be corrected by the base m. Otherwise we > > could scan out of the length of db* and the error we saw was > > introduced. Another fix is for unroll to return #t if the length is > > out of the db length but this is probably a bandage, not the bug, the > > bug is most probably fixed by this patch. > > > > Is things more clear now? > > From a pure boundary analysis viewpoint, it=92s a somewhat clearer. > > Should I apply the patch, or did you want to prepare another one? > > I tried further reducing the test case, and synthesizing the new one, > but the little understanding I have of this code doesn=92t allow me to do > the latter. Any help would be welcome. > > Thanks! > > Ludo=92. > --20cf3074d8629936fb04cf02374c Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: quoted-printable > I think this sentence is ungrammatical, or at least I=92m lost.
eh, sorry, but consider the db as
h,db-len

e1 <- m =3D 0
= e2
e3
e4
e5
e6 <- h*
e7


then db-len is 7 and = db-len* is 2 and db-len - deb-len* =3D 5
which is the number of steps to go from e2 to e6, e.g.
we will scan thro= ugh the list from m =3D 0 ro h* and verify that we do not enter
an eleme= nt that is not commutative for the expression at hand.=A0 This is the logic= of before, but if m =3D k at e1 and db-len =3D 7 + k, and db-len* is again= 2
we must use db-len - fb-len* - k to get the right number of iterations to g= o from m to h*, so you see as we try consecutive h* in the search we will s= can for violations of the commutativity in batches covering the whole path = from m=3D0 to the found h* =3D h. Because m was missing in the calculation = of the number of iteration to many iterations was done and generally this c= ould mean that optimizations opportunities was lost or that we hit the end = of the list and the error as you noticed was triggered.

please apply the patch and enter a suitable docstring for the commit. <= br>
A suggestion for test code is to design cases where various code fra= gment that hinders the commutation is placed and one verify that no error w= ill result for missing in the commutativity check. To verify that it optimi= zes is more difficult to do in a test-case. I could help to try design a fe= w of these testcases, also making sure all test passes after patching the c= ode is also still needed (of cause).


On Tue, Nov 2= 0, 2012 at 9:16 PM, Ludovic Court=E8s <ludo@gnu.org> wrote:
Hi Stefan!

Thanks for your message!

Stefan Israelsson Tampe <stef= an.itampe@gmail.com> skribis:

> The intention of unroll is to scan db to check= that a commutative
> property for an item going into the function holds for all elements in=
> db up to h=3D=3Dh* is found.

I think this sentence is ungrammatical, or at least I=92m lost.

The comments in cse.scm convey the big picture, but I miss the
connection between that and the actual code.

> Now at each symbol db-len* is the length of db when created so (-
> db-len db-len*) is the length of all elements in db created after the<= br> > symbol name. =A0now db-len* will in the loop lp be decreasing so this<= br> > length is increasing and the base =3D m is the position in db where we=
> scan to last time, the fix was to make sure we scan up to the db-len*<= br> > 'index' e.g. niter had to be corrected by the base m. =A0Other= wise we
> could scan out of the length of db* and the error we saw was
> introduced. Another fix is for unroll to return #t if the length is > out of the db length but this is probably a bandage, not the bug, the<= br> > bug is most probably fixed by this patch.
>
> Is things more clear now?

From a pure boundary analysis viewpoint, it=92s a somewhat clearer.
Should I apply the patch, or did you want to prepare another one?

I tried further reducing the test case, and synthesizing the new one,
but the little understanding I have of this code doesn=92t allow me to do the latter. =A0Any help would be welcome.

Thanks!

Ludo=92.

--20cf3074d8629936fb04cf02374c-- From unknown Thu Sep 11 13:55:20 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.428 (Entity 5.428) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Subject: bug#12883: closed (Re: bug#12883: [2.0.6] CSE bug) Message-ID: References: <87zk2aczgf.fsf@gnu.org> <871ufwfbny.fsf@gnu.org> X-Gnu-PR-Message: they-closed 12883 X-Gnu-PR-Package: guile Reply-To: 12883@debbugs.gnu.org Date: Wed, 21 Nov 2012 23:26:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1353540362-32551-1" This is a multi-part message in MIME format... ------------=_1353540362-32551-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #12883: [2.0.6] CSE bug which was filed against the guile package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 12883@debbugs.gnu.org. --=20 12883: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D12883 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1353540362-32551-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 12883-done) by debbugs.gnu.org; 21 Nov 2012 23:25:08 +0000 Received: from localhost ([127.0.0.1]:59823 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TbJfI-0008Rz-Lh for submit@debbugs.gnu.org; Wed, 21 Nov 2012 18:25:08 -0500 Received: from xanadu.aquilenet.fr ([88.191.123.111]:35943) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TbJfF-0008Rp-3a for 12883-done@debbugs.gnu.org; Wed, 21 Nov 2012 18:25:06 -0500 Received: from localhost (localhost [127.0.0.1]) by xanadu.aquilenet.fr (Postfix) with ESMTP id 7B9C5ABF3; Thu, 22 Nov 2012 00:23:45 +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 SJ5lX5qaYtFN; Thu, 22 Nov 2012 00:23:45 +0100 (CET) Received: from pluto (reverse-83.fdn.fr [80.67.176.83]) by xanadu.aquilenet.fr (Postfix) with ESMTPSA id 0DAE6ABF1; Thu, 22 Nov 2012 00:23:44 +0100 (CET) From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Stefan Israelsson Tampe Subject: Re: bug#12883: [2.0.6] CSE bug References: <871ufwfbny.fsf@gnu.org> <876257bzte.fsf@gnu.org> <87zk2iltpz.fsf@gnu.org> <87fw46fr33.fsf@gnu.org> <87fw44ni71.fsf@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 2 Frimaire an 221 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu Date: Thu, 22 Nov 2012 00:23:44 +0100 In-Reply-To: (Stefan Israelsson Tampe's message of "Wed, 21 Nov 2012 15:32:16 +0100") Message-ID: <87zk2aczgf.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: I just committed the fix and test case. Thanks! Ludo’. [...] 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: 12883-done Cc: 12883-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: I just committed the fix and test case. Thanks! Ludo’. [...] 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.4800] I just committed the fix and test case. Thanks! Ludo=E2=80=99. ------------=_1353540362-32551-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 14 Nov 2012 15:27:43 +0000 Received: from localhost ([127.0.0.1]:42231 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TYesQ-0006B0-TN for submit@debbugs.gnu.org; Wed, 14 Nov 2012 10:27:43 -0500 Received: from eggs.gnu.org ([208.118.235.92]:39194) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TYesN-0006An-Jq for submit@debbugs.gnu.org; Wed, 14 Nov 2012 10:27:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TYerk-0007OT-Nk for submit@debbugs.gnu.org; Wed, 14 Nov 2012 10:27:03 -0500 Received: from lists.gnu.org ([208.118.235.17]:39338) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TYerk-0007OP-KN for submit@debbugs.gnu.org; Wed, 14 Nov 2012 10:27:00 -0500 Received: from eggs.gnu.org ([208.118.235.92]:33661) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TYerh-0002RU-Hk for bug-guile@gnu.org; Wed, 14 Nov 2012 10:27:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TYere-0007NC-Fb for bug-guile@gnu.org; Wed, 14 Nov 2012 10:26:57 -0500 Received: from xanadu.aquilenet.fr ([88.191.123.111]:48870) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TYere-0007Mp-67 for bug-guile@gnu.org; Wed, 14 Nov 2012 10:26:54 -0500 Received: from localhost (localhost [127.0.0.1]) by xanadu.aquilenet.fr (Postfix) with ESMTP id 52084A9DA for ; Wed, 14 Nov 2012 16:26:42 +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 jBgs3Vvy-JTo for ; Wed, 14 Nov 2012 16:26:42 +0100 (CET) Received: from pluto (reverse-83.fdn.fr [80.67.176.83]) by xanadu.aquilenet.fr (Postfix) with ESMTPSA id 7E019A9D9 for ; Wed, 14 Nov 2012 16:26:41 +0100 (CET) From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: bug-guile@gnu.org Subject: [2.0.6] CSE bug X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 24 Brumaire an 221 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu Date: Wed, 14 Nov 2012 16:26:41 +0100 Message-ID: <871ufwfbny.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-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -4.4 (----) X-Debbugs-Envelope-To: submit 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: -4.4 (----) Hello, This piece of code triggers a CSE bug: --8<---------------cut here---------------start------------->8--- (use-modules (ice-9 match)) (define (snix-derivation->guix-package derivation) (match derivation (((_ _ _)) #t))) --8<---------------cut here---------------end--------------->8--- Or just: --8<---------------cut here---------------start------------->8--- (define (snix-derivation->guix-package v) (let ((failure (lambda () (error 'match "no matching pattern")))) (if (and (pair? v) (null? (cdr v))) (let ((w foo) (x (cdr w))) (if (and (pair? x) (null? (cdr x))) #t (failure))) (failure)))) --8<---------------cut here---------------end--------------->8--- Details: --8<---------------cut here---------------start------------->8--- scheme@(guile-user) [1]> ,bt In geiser/evaluation.scm: 59:13 26 (call-with-result #) In unknown file: 25 (call-with-output-string #) In ice-9/r4rs.scm: 176:4 24 (with-output-to-port #> #) In geiser/evaluation.scm: 63:19 23 (#) In ice-9/r4rs.scm: 180:4 22 (with-error-to-port #> #) In geiser/evaluation.scm: 64:45 21 (#) 75:21 20 (ev) In system/base/compile.scm: 231:6 19 (compile (define (snix-derivation->guix-package v) (let ((fail= ure (lambda () (error (quote match) "no =E2=80=A6")))) (=E2=80=A6))) # =E2= =80=A6) 177:32 18 (lp (# # # =E2=80=A6) =E2= =80=A6) In language/tree-il/compile-glil.scm: 65:2 17 (compile-glil #guix-package = (lambda ((name . snix-derivation->guix-package)) (la=E2=80=A6> =E2=80=A6) In language/tree-il/optimize.scm: 44:6 16 (optimize! #guix-package (lambda ((=E2=80=A6> =E2=80=A6) In language/tree-il/cse.scm: 537:31 15 (visit #guix-package (lambda ((name=E2=80=A6> =E2=80=A6) 543:33 14 (visit #guix-package (lambda ((name . snix-der=E2=80=A6> =E2=80=A6) 483:32 13 (visit #guix-package (lambda= ((name . snix-derivation->guix-package)) (lambda-ca=E2=80=A6> =E2=80=A6) 537:31 12 (visit #guix-packag= e)) (lambda-case (((v) #f #f #f () (v-66965)) (let (=E2=80=A6> =E2=80=A6) 543:33 11 (visit # =E2=80=A6) 430:34 10 (visit # =E2=80=A6) 496:31 9 (visit # =E2=80=A6) 496:31 8 (visit # =E2=80=A6) 430:34 7 (visit # =E2=80=A6) 553:39 6 (lp (#) =E2=80=A6) 429:33 5 (visit # =E2=80=A6) 370:41 4 (lp (#) =E2=80=A6) 403:15 3 (return # =E2=80=A6) 333:28 2 (find-dominating-lexical # =E2=80=A6) 315:10 1 (unroll # 8 1) In ice-9/vlist.scm: 303:8 0 (vlist-ref # 8) scheme@(guile-user) [1]> ,locals Local variables: $11 =3D vlist =3D # $12 =3D index =3D 8 $13 =3D index =3D 0 $14 =3D base =3D #(#() #f 0 0 0) $15 =3D offset =3D 0 $16 =3D content =3D #() $17 =3D offset =3D 0 scheme@(guile-user) [1]> ,error ice-9/vlist.scm:303:8: In procedure vlist-ref: ice-9/vlist.scm:303:8: Value out of range: 0 --8<---------------cut here---------------end--------------->8--- Ludo=E2=80=99. ------------=_1353540362-32551-1--