From unknown Wed Jun 18 23:09:04 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#21899 <21899@debbugs.gnu.org> To: bug#21899 <21899@debbugs.gnu.org> Subject: Status: let/ec continuations not distinct under compiler Reply-To: bug#21899 <21899@debbugs.gnu.org> Date: Thu, 19 Jun 2025 06:09:04 +0000 retitle 21899 let/ec continuations not distinct under compiler reassign 21899 guile submitter 21899 Zefram severity 21899 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 13 02:58:09 2015 Received: (at submit) by debbugs.gnu.org; 13 Nov 2015 07:58:09 +0000 Received: from localhost ([127.0.0.1]:36534 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zx9F0-0008Ig-CS for submit@debbugs.gnu.org; Fri, 13 Nov 2015 02:58:08 -0500 Received: from eggs.gnu.org ([208.118.235.92]:45581) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zx9Ex-0008IW-8K for submit@debbugs.gnu.org; Fri, 13 Nov 2015 02:57:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zx9Ev-00079H-RG for submit@debbugs.gnu.org; Fri, 13 Nov 2015 02:57:46 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:43383) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zx9Ev-00079D-O6 for submit@debbugs.gnu.org; Fri, 13 Nov 2015 02:57:45 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55582) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zx9Eu-0005BX-Tp for bug-guile@gnu.org; Fri, 13 Nov 2015 02:57:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zx9Eu-00077y-0L for bug-guile@gnu.org; Fri, 13 Nov 2015 02:57:44 -0500 Received: from river6.fysh.org ([2001:41d0:d:20da::2]:58795 helo=river.fysh.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zx9Et-00077o-Qw for bug-guile@gnu.org; Fri, 13 Nov 2015 02:57:43 -0500 Received: from zefram by river.fysh.org with local (Exim 4.80 #2 (Debian)) id 1Zx9Em-0004Il-7M; Fri, 13 Nov 2015 07:57:36 +0000 Date: Fri, 13 Nov 2015 07:57:36 +0000 From: Zefram To: bug-guile@gnu.org Subject: let/ec continuations not distinct under compiler Message-ID: <20151113075736.GJ13455@fysh.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) With guile 2.0.11: scheme@(guile-user)> (use-modules (ice-9 control)) scheme@(guile-user)> (list 'a (let/ec ae (list 'b (let/ec be (be 2))))) $1 = (a (b 2)) scheme@(guile-user)> (list 'a (let/ec ae (list 'b (let/ec be (ae 2))))) $2 = (a (b 2)) scheme@(guile-user)> (list 'a (let/ec ae (list 'b (ae 2)))) $3 = (a 2) The middle of these three cases is wrong: it attempts to invoke the outer escape continuation, but only goes as far as the target of the inner one, which it isn't using. It therefore produces the same result as the first case, which invokes the inner escape continuation. It ought to behave like the third case, which shows that the outer escape continuation can be successfully invoked when the unused inner continuation is not present. The problem only affects let/ec, *not* call/ec: scheme@(guile-user)> (list 'a (call/ec (lambda (ae) (list 'b (call/ec (lambda (be) (be 2))))))) $4 = (a (b 2)) scheme@(guile-user)> (list 'a (call/ec (lambda (ae) (list 'b (call/ec (lambda (be) (ae 2))))))) $5 = (a 2) scheme@(guile-user)> (list 'a (call/ec (lambda (ae) (list 'b (ae 2))))) $6 = (a 2) It also only happens when compiling, not when interpreting: scheme@(guile-user)> ,o interp #t scheme@(guile-user)> (list 'a (let/ec ae (list 'b (let/ec be (be 2))))) $7 = (a (b 2)) scheme@(guile-user)> (list 'a (let/ec ae (list 'b (let/ec be (ae 2))))) $8 = (a 2) scheme@(guile-user)> (list 'a (let/ec ae (list 'b (ae 2)))) $9 = (a 2) -zefram From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 24 12:29:41 2016 Received: (at 21899) by debbugs.gnu.org; 24 Jun 2016 16:29:41 +0000 Received: from localhost ([127.0.0.1]:54554 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bGTzB-0007j5-H5 for submit@debbugs.gnu.org; Fri, 24 Jun 2016 12:29:41 -0400 Received: from pb-sasl1.pobox.com ([64.147.108.66]:57613 helo=sasl.smtp.pobox.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bGTz9-0007iy-Va for 21899@debbugs.gnu.org; Fri, 24 Jun 2016 12:29:40 -0400 Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id A90FA1F976; Fri, 24 Jun 2016 12:29:37 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=qDzf2gCSpW/B53OO87tdpoBN12Y=; b=f5K0AB wBPEdj8wbrCdH+wNiYys83undDGdLU+vJLWHtL73x+BuH041UBsLjm5pnb/qry2j 1vVMSMgTUoXxJL7AMAIXRuZI4h1xAtfjj150C7CIyDpmc3dVBn19Cgts0g5I9v5Q cfO9lUR5RSRtw2/FQqXF38nhTrkstTk+HMPh0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=OSCXWWhs2z68Ru47WtldRYSyHX/ZD4kC u/PZulq4iVOwEcmUhbkDncF+/MnYML9aj0h9aNabGvj/PhazfB8y3KlySQuCmeNr JSPxR+MXLN4H/s0YHluqfU0Z4/xz71FEGoVVyFBbtB9pSDFmhOtQ9hawz7K3vfmd Lw/FveslNaI= Received: from pb-sasl1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id 9171F1F975; Fri, 24 Jun 2016 12:29:37 -0400 (EDT) Received: from clucks (unknown [88.160.190.192]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pb-sasl1.pobox.com (Postfix) with ESMTPSA id AECF61F974; Fri, 24 Jun 2016 12:29:36 -0400 (EDT) From: Andy Wingo To: Zefram Subject: Re: bug#21899: let/ec continuations not distinct under compiler References: <20151113075736.GJ13455@fysh.org> Date: Fri, 24 Jun 2016 18:29:26 +0200 In-Reply-To: <20151113075736.GJ13455@fysh.org> (zefram@fysh.org's message of "Fri, 13 Nov 2015 07:57:36 +0000") Message-ID: <87ziqaczyx.fsf@pobox.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: D7746A36-3A28-11E6-8F74-C1836462E9F6-02397024!pb-sasl1.pobox.com X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: 21899 Cc: 21899@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.4 (-) On Fri 13 Nov 2015 08:57, Zefram writes: > With guile 2.0.11: > > scheme@(guile-user)> (use-modules (ice-9 control)) > scheme@(guile-user)> (list 'a (let/ec ae (list 'b (let/ec be (be 2))))) > $1 = (a (b 2)) > scheme@(guile-user)> (list 'a (let/ec ae (list 'b (let/ec be (ae 2))))) > $2 = (a (b 2)) > scheme@(guile-user)> (list 'a (let/ec ae (list 'b (ae 2)))) > $3 = (a 2) > > The middle of these three cases is wrong: it attempts to invoke the outer > escape continuation, but only goes as far as the target of the inner one, > which it isn't using. It therefore produces the same result as the first > case, which invokes the inner escape continuation. It ought to behave > like the third case, which shows that the outer escape continuation can > be successfully invoked when the unused inner continuation is not present. This is a compiler bug in 2.0: scheme@(guile-user)> ,optimize (list 'a (let/ec ae (list 'b (let/ec be (ae 2))))) $2 = (list 'a (let ((tag (list 'let/ec))) (call-with-prompt tag (lambda () (list 'b (let ((tag-1 tag)) ;; <<<< here is the bug (call-with-prompt tag-1 (lambda () (abort-to-prompt tag 2)) (lambda (_ . results) (@apply values results)))))) (lambda (_ . results) (@apply values results))))) In master: scheme@(guile-user)> ,optimize (list 'a (let/ec ae (list 'b (let/ec be (ae 2))))) $1 = (list 'a (let ((tag (list 'let/ec))) (call-with-prompt tag (lambda () (list 'b (let ((tag-1 (list 'let/ec))) (call-with-prompt tag-1 (lambda () (apply abort tag 2 '())) (lambda (_ . results) (apply values results)))))) (lambda (_ . results) (apply values results))))) Weird stuff! Andy From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 24 12:48:44 2016 Received: (at 21899) by debbugs.gnu.org; 24 Jun 2016 16:48:44 +0000 Received: from localhost ([127.0.0.1]:54576 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bGUHc-0001NZ-5n for submit@debbugs.gnu.org; Fri, 24 Jun 2016 12:48:44 -0400 Received: from pb-sasl1.pobox.com ([64.147.108.66]:59253 helo=sasl.smtp.pobox.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bGUHa-0001NQ-7A for 21899@debbugs.gnu.org; Fri, 24 Jun 2016 12:48:42 -0400 Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id E14C11FB63; Fri, 24 Jun 2016 12:48:41 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=YnGE3N5yFDkj4YTfrpDFnuzkn/A=; b=ehZP5a Yi/A6+48DSwMxNd07B8F92ZLFGf5qpsU8Kkp22OE1z6h9Zb+8M1/Hl7lDW6F3wBD wJgVrZajY4SkY8J7kSjhKlBsT0xxThy/n/fKGaokLk0qi/OIEP+Q9QukQV3vzuZR y0FDFHu66omSJVZp/bW+n0JNx4SjW09sM3heU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=wYCDkd9U6gLVJyE4cV5W2ZdVxTt6udm3 W6YWOBIbulGfhd0GBRsUNVoJmYC6qJyU1k9nCX1tC37cJCtHVj+8ZCxVZDyrn5CJ +cyXIdNhTFW2iRtAftKWjgVaXasyM8sz/dDBG2qO1yWweZYTlaxIxWtzZl9Alf+H JHTtbpI2q24= Received: from pb-sasl1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id DAD6C1FB61; Fri, 24 Jun 2016 12:48:41 -0400 (EDT) Received: from clucks (unknown [88.160.190.192]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pb-sasl1.pobox.com (Postfix) with ESMTPSA id F065D1FB60; Fri, 24 Jun 2016 12:48:40 -0400 (EDT) From: Andy Wingo To: Zefram Subject: Re: bug#21899: let/ec continuations not distinct under compiler References: <20151113075736.GJ13455@fysh.org> <87ziqaczyx.fsf@pobox.com> Date: Fri, 24 Jun 2016 18:48:26 +0200 In-Reply-To: <87ziqaczyx.fsf@pobox.com> (Andy Wingo's message of "Fri, 24 Jun 2016 18:29:26 +0200") Message-ID: <87vb0ycz39.fsf@pobox.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: 818A261C-3A2B-11E6-9811-C1836462E9F6-02397024!pb-sasl1.pobox.com X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: 21899 Cc: 21899@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.4 (-) On Fri 24 Jun 2016 18:29, Andy Wingo writes: > On Fri 13 Nov 2015 08:57, Zefram writes: > >> With guile 2.0.11: >> >> scheme@(guile-user)> (use-modules (ice-9 control)) >> scheme@(guile-user)> (list 'a (let/ec ae (list 'b (let/ec be (be 2))))) >> $1 = (a (b 2)) >> scheme@(guile-user)> (list 'a (let/ec ae (list 'b (let/ec be (ae 2))))) >> $2 = (a (b 2)) >> scheme@(guile-user)> (list 'a (let/ec ae (list 'b (ae 2)))) >> $3 = (a 2) >> >> The middle of these three cases is wrong: it attempts to invoke the outer >> escape continuation, but only goes as far as the target of the inner one, >> which it isn't using. It therefore produces the same result as the first >> case, which invokes the inner escape continuation. It ought to behave >> like the third case, which shows that the outer escape continuation can >> be successfully invoked when the unused inner continuation is not present. > > This is a compiler bug in 2.0: > > scheme@(guile-user)> ,optimize (list 'a (let/ec ae (list 'b (let/ec be (ae 2))))) > $2 = (list 'a > (let ((tag (list 'let/ec))) > (call-with-prompt > tag > (lambda () > (list 'b > (let ((tag-1 tag)) ;; <<<< here is the bug > (call-with-prompt > tag-1 > (lambda () (abort-to-prompt tag 2)) > (lambda (_ . results) (@apply values results)))))) > (lambda (_ . results) (@apply values results))))) Narrowed down: ,opt (let* ((x (list 'a)) (y (list 'a))) (list x y)) ;; -> (let* ((x (list 'a)) (y x)) (list x y)) It's a bug in 2.0's CSE pass somehow. Andy From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 24 13:00:45 2016 Received: (at 21899) by debbugs.gnu.org; 24 Jun 2016 17:00:45 +0000 Received: from localhost ([127.0.0.1]:54581 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bGUTF-0001f0-B2 for submit@debbugs.gnu.org; Fri, 24 Jun 2016 13:00:45 -0400 Received: from river.fysh.org ([87.98.248.19]:47584 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bGUTD-0001er-Hr for 21899@debbugs.gnu.org; Fri, 24 Jun 2016 13:00:43 -0400 Received: from zefram by river.fysh.org with local (Exim 4.84_2 #1 (Debian)) id 1bGUT8-0008PL-FV; Fri, 24 Jun 2016 18:00:38 +0100 Date: Fri, 24 Jun 2016 18:00:38 +0100 From: Zefram To: Andy Wingo , 21899@debbugs.gnu.org Subject: Re: bug#21899: let/ec continuations not distinct under compiler Message-ID: <20160624170038.GG1170@fysh.org> References: <20151113075736.GJ13455@fysh.org> <87ziqaczyx.fsf@pobox.com> <87vb0ycz39.fsf@pobox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87vb0ycz39.fsf@pobox.com> X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: 21899 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.4 (-) Andy Wingo wrote: > ,opt (let* ((x (list 'a)) > (y (list 'a))) > (list x y)) > ;; -> > (let* ((x (list 'a)) (y x)) (list x y)) Wow, that's a scary level of wrongitude. It's specific to let* (or equivalent nested let forms), but really easy to trigger within that: scheme@(guile-user)> (let ((x (list 'a)) (y (list 'a))) (eq? x y)) $1 = #f scheme@(guile-user)> (let* ((x (list 'a)) (y (list 'a))) (eq? x y)) $2 = #t scheme@(guile-user)> (let ((x (list 'a))) (let ((y (list 'a))) (eq? x y))) $3 = #t -zefram From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 24 13:11:40 2016 Received: (at 21899) by debbugs.gnu.org; 24 Jun 2016 17:11:40 +0000 Received: from localhost ([127.0.0.1]:54585 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bGUdo-0001uQ-Cm for submit@debbugs.gnu.org; Fri, 24 Jun 2016 13:11:40 -0400 Received: from river.fysh.org ([87.98.248.19]:43779 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bGUdm-0001uG-Ot for 21899@debbugs.gnu.org; Fri, 24 Jun 2016 13:11:39 -0400 Received: from zefram by river.fysh.org with local (Exim 4.84_2 #1 (Debian)) id 1bGUdk-0000QZ-IC; Fri, 24 Jun 2016 18:11:36 +0100 Date: Fri, 24 Jun 2016 18:11:36 +0100 From: Zefram To: Andy Wingo , 21899@debbugs.gnu.org Subject: Re: bug#21899: let/ec continuations not distinct under compiler Message-ID: <20160624171136.GA1402@fysh.org> References: <20151113075736.GJ13455@fysh.org> <87ziqaczyx.fsf@pobox.com> <87vb0ycz39.fsf@pobox.com> <20160624170038.GG1170@fysh.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160624170038.GG1170@fysh.org> X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: 21899 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.4 (-) One more variant: scheme@(guile-user)> (let ((x (list 'a))) (eq? x (list 'a))) $1 = #t scheme@(guile-user)> ,opt (let ((x (list 'a))) (eq? x (list 'a))) $2 = (let ((x (list 'a))) (eq? x x)) -zefram From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 24 13:13:13 2016 Received: (at 21899-done) by debbugs.gnu.org; 24 Jun 2016 17:13:13 +0000 Received: from localhost ([127.0.0.1]:54589 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bGUfI-0001wu-Nm for submit@debbugs.gnu.org; Fri, 24 Jun 2016 13:13:12 -0400 Received: from pb-sasl1.pobox.com ([64.147.108.66]:60575 helo=sasl.smtp.pobox.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bGUfG-0001wl-6O for 21899-done@debbugs.gnu.org; Fri, 24 Jun 2016 13:13:10 -0400 Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id CCF6B1FD93; Fri, 24 Jun 2016 13:13:09 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=J2Fi4oHbmFtENSfEGmlDiqZX/zQ=; b=rBaVJV P4KLQPK0F6uGUReTSFuMWLAb9RkzPBHb7+a3vtdx97yRQDtPpg5xR2U4GRv2mOpq GDESmgVDD7dk6iq8SM0h33kCZF8N1qlq/TGLwmJ+rlmDtPN7P8n9fFvq5YaHV+ri b7JrKVdlTWIJXLNI6+RQNtLtXenA0andQK48Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=KFjPLrgKo5X6X55jzfPgURRAiAo9eNrh 9qMphUHb4m2gAhwhd9EDvcvIsLqkzM8LvaAaiaGq3Lxzx8WcclDppuTzNgxkeuMG H66JVvmNzaZgGET4iq9wBHou5q9GZqWNwox1uULzuiMHe0XxRkBbSFibEqo7YVQ5 C0G3iVtNmLo= Received: from pb-sasl1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id B45821FD92; Fri, 24 Jun 2016 13:13:09 -0400 (EDT) Received: from clucks (unknown [88.160.190.192]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pb-sasl1.pobox.com (Postfix) with ESMTPSA id ECACC1FD91; Fri, 24 Jun 2016 13:13:08 -0400 (EDT) From: Andy Wingo To: Zefram Subject: Re: bug#21899: let/ec continuations not distinct under compiler References: <20151113075736.GJ13455@fysh.org> <87ziqaczyx.fsf@pobox.com> <87vb0ycz39.fsf@pobox.com> <20160624170038.GG1170@fysh.org> Date: Fri, 24 Jun 2016 19:13:01 +0200 In-Reply-To: <20160624170038.GG1170@fysh.org> (zefram@fysh.org's message of "Fri, 24 Jun 2016 18:00:38 +0100") Message-ID: <87r3bmcxya.fsf@pobox.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Pobox-Relay-ID: EC6EB83C-3A2E-11E6-9B6E-C1836462E9F6-02397024!pb-sasl1.pobox.com X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: 21899-done Cc: 21899-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.4 (-) --=-=-= Content-Type: text/plain On Fri 24 Jun 2016 19:00, Zefram writes: > Andy Wingo wrote: >> ,opt (let* ((x (list 'a)) >> (y (list 'a))) >> (list x y)) >> ;; -> >> (let* ((x (list 'a)) (y x)) (list x y)) > > Wow, that's a scary level of wrongitude. Indeed :/ Fixed in git with this patch: --=-=-= Content-Type: text/plain Content-Disposition: inline; filename=0001-Fix-bug-that-exposed-list-invocations-to-CSE.patch >From ea352d9e54793783a8272863748ea6d31b3f7295 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Fri, 24 Jun 2016 19:03:36 +0200 Subject: [PATCH] Fix bug that exposed `list' invocations to CSE * module/language/tree-il/effects.scm (make-effects-analyzer): Fix analysis for list, cons, make-prompt-tage, and vector; &allocation is a `cause' effect. Fixes #21899. * test-suite/tests/cse.test ("cse"): Add test case. --- module/language/tree-il/effects.scm | 8 ++++---- test-suite/tests/cse.test | 9 +++++++++ 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/module/language/tree-il/effects.scm b/module/language/tree-il/effects.scm index 1fe4aeb..6db4d47 100644 --- a/module/language/tree-il/effects.scm +++ b/module/language/tree-il/effects.scm @@ -278,16 +278,16 @@ of an expression." ;; Primitives that allocate memory. (($ _ ($ _ 'cons) (x y)) (logior (compute-effects x) (compute-effects y) - &allocation)) + (cause &allocation))) (($ _ ($ _ (or 'list 'vector)) args) - (logior (accumulate-effects args) &allocation)) + (logior (accumulate-effects args) (cause &allocation))) (($ _ ($ _ 'make-prompt-tag) ()) - &allocation) + (cause &allocation)) (($ _ ($ _ 'make-prompt-tag) (arg)) - (logior (compute-effects arg) &allocation)) + (logior (compute-effects arg) (cause &allocation))) ;; Primitives that are normally effect-free, but which might ;; cause type checks, allocate memory, or access mutable diff --git a/test-suite/tests/cse.test b/test-suite/tests/cse.test index e0219e8..ca7dbc2 100644 --- a/test-suite/tests/cse.test +++ b/test-suite/tests/cse.test @@ -294,6 +294,15 @@ (apply (primitive cons) (const 1) (const 2) (const 3)) (const 4))) + ;; The (list 'a) does not propagate. + (pass-if-cse + (let* ((x (list 'a)) + (y (list 'a))) + (list x y)) + (let (x) (_) ((apply (primitive list) (const a))) + (let (y) (_) ((apply (primitive list) (const a))) + (apply (primitive list) (lexical x _) (lexical y _))))) + (pass-if "http://bugs.gnu.org/12883" ;; In 2.0.6, compiling this code would trigger an out-of-bounds ;; vlist access in CSE's traversal of its "database". -- 2.8.3 --=-=-=-- From unknown Wed Jun 18 23:09:04 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, 23 Jul 2016 11: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