From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.bugs Subject: bug#17485: (srfi srfi-1) reduce-right does not scale, version 2.0.9 Date: Tue, 21 Jun 2016 16:42:43 +0200 Message-ID: <87poray55o.fsf@pobox.com> References: <87y4y6t0or.fsf@fencepost.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1466520207 9112 80.91.229.3 (21 Jun 2016 14:43:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 21 Jun 2016 14:43:27 +0000 (UTC) Cc: 17485@debbugs.gnu.org To: David Kastrup Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Tue Jun 21 16:43:17 2016 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bFMtV-0000pZ-7E for guile-bugs@m.gmane.org; Tue, 21 Jun 2016 16:43:13 +0200 Original-Received: from localhost ([::1]:52358 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFMtU-0005kN-EN for guile-bugs@m.gmane.org; Tue, 21 Jun 2016 10:43:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41688) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFMtO-0005g5-Lc for bug-guile@gnu.org; Tue, 21 Jun 2016 10:43:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bFMtK-0005UX-U8 for bug-guile@gnu.org; Tue, 21 Jun 2016 10:43:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:37535) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFMtK-0005UT-QX for bug-guile@gnu.org; Tue, 21 Jun 2016 10:43:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bFMtK-0005fw-Gv for bug-guile@gnu.org; Tue, 21 Jun 2016 10:43:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andy Wingo Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Tue, 21 Jun 2016 14:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17485 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Original-Received: via spool by 17485-submit@debbugs.gnu.org id=B17485.146652017421801 (code B ref 17485); Tue, 21 Jun 2016 14:43:02 +0000 Original-Received: (at 17485) by debbugs.gnu.org; 21 Jun 2016 14:42:54 +0000 Original-Received: from localhost ([127.0.0.1]:49872 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bFMtB-0005fY-Sw for submit@debbugs.gnu.org; Tue, 21 Jun 2016 10:42:54 -0400 Original-Received: from pb-sasl1.pobox.com ([64.147.108.66]:61302 helo=sasl.smtp.pobox.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bFMt9-0005fP-Qj for 17485@debbugs.gnu.org; Tue, 21 Jun 2016 10:42:52 -0400 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id 5CEEC236F3; Tue, 21 Jun 2016 10:42:51 -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=mRk4O1uUtABDziyIFaP+cL5Duzw=; b=UPRriS XOrOv9/XGMHS4euuDpPV0LWVbSTgLSx8TwprOynJ02Iv34CaEF279flA0IivTh+a D/iHL+isFdSiHoTxBT6x3Fh7OgE881S0uuALJZAmi+m0SPXJF0TkfcnigKIHSdQn RdvmpPzG8zM6h/bbsztYFeNp/LOSBbYZzr9JQ= 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=BIJDywHecrVXgwha6Did5NbZ96HSqGWH i5wo8/GkGBshsPlVL0ngO4H5j7vUjdJ5AGQKbFrARgSbhPRBxQF3tc3B6kLL1fX6 TUpgAJgaATPfEBpwpmByQR/YVfB0EkT6Rv6RuZ9DJSAW4UJETLzOzALfC3wIjOJM 8QC5Ws55DcQ= Original-Received: from pb-sasl1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id 54175236F2; Tue, 21 Jun 2016 10:42:51 -0400 (EDT) Original-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 9BA38236ED; Tue, 21 Jun 2016 10:42:50 -0400 (EDT) In-Reply-To: <87y4y6t0or.fsf@fencepost.gnu.org> (David Kastrup's message of "Tue, 13 May 2014 12:47:32 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) X-Pobox-Relay-ID: 6DD8584C-37BE-11E6-B0A9-C1836462E9F6-02397024!pb-sasl1.pobox.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: "bug-guile" Xref: news.gmane.org gmane.lisp.guile.bugs:8099 Archived-At: Hi, On Tue 13 May 2014 12:47, David Kastrup writes: > The following code results in an error: > > (use-modules (srfi srfi-1)) > (reduce-right + 0 (make-list 10000 1)) > > Backtrace: > In srfi/srfi-1.scm: > 379: 19 [recur (1 1 1 1 1 1 1 1 1 ...) (1 1 1 1 1 1 1 1 1 ...)] > 379: 18 [recur (1 1 1 1 1 1 1 1 1 ...) (1 1 1 1 1 1 1 1 1 ...)] > 379: 17 [recur (1 1 1 1 1 1 1 1 1 ...) (1 1 1 1 1 1 1 1 1 ...)] > 379: 16 [recur (1 1 1 1 1 1 1 1 1 ...) (1 1 1 1 1 1 1 1 1 ...)] > 379: 15 [recur (1 1 1 1 1 1 1 1 1 ...) (1 1 1 1 1 1 1 1 1 ...)] > 379: 14 [recur (1 1 1 1 1 1 1 1 1 ...) (1 1 1 1 1 1 1 1 1 ...)] > 379: 13 [recur (1 1 1 1 1 1 1 1 1 ...) (1 1 1 1 1 1 1 1 1 ...)] > 379: 12 [recur (1 1 1 1 1 1 1 1 1 ...) (1 1 1 1 1 1 1 1 1 ...)] > 379: 11 [recur (1 1 1 1 1 1 1 1 1 ...) (1 1 1 1 1 1 1 1 1 ...)] > 379: 10 [recur (1 1 1 1 1 1 1 1 1 ...) (1 1 1 1 1 1 1 1 1 ...)] > 379: 9 [recur (1 1 1 1 1 1 1 1 1 ...) (1 1 1 1 1 1 1 1 1 ...)] > 379: 8 [recur (1 1 1 1 1 1 1 1 1 ...) (1 1 1 1 1 1 1 1 1 ...)] > 379: 7 [recur (1 1 1 1 1 1 1 1 1 ...) (1 1 1 1 1 1 1 1 1 ...)] > 379: 6 [recur (1 1 1 1 1 1 1 1 1 ...) (1 1 1 1 1 1 1 1 1 ...)] > 379: 5 [recur (1 1 1 1 1 1 1 1 1 ...) (1 1 1 1 1 1 1 1 1 ...)] > 379: 4 [recur (1 1 1 1 1 1 1 1 1 ...) (1 1 1 1 1 1 1 1 1 ...)] > 379: 3 [recur (1 1 1 1 1 1 1 1 1 ...) (1 1 1 1 1 1 1 1 1 ...)] > 379: 2 [recur (1 1 1 1 1 1 1 1 1 ...) (1 1 1 1 1 1 1 1 1 ...)] > 379: 1 [recur (1 1 1 1 1 1 1 1 1 ...) (1 1 1 1 1 1 1 1 1 ...)] > 379: 0 [recur (1 1 1 1 1 1 1 1 1 ...) (1 1 1 1 1 1 1 1 1 ...)] > > srfi/srfi-1.scm:379:31: In procedure recur: > srfi/srfi-1.scm:379:31: Throw to key `vm-error' with args `(vm-run "VM: Stack overflow" ())'. On the 2.2 series this problem does not occur because there is no stack limit. Mark if you would like to fix this on 2.0 in a different way, go ahead. Otherwise we can close. I think on 2.0 that this might be an OK workaround: (define (reduce-right f ridentity lst) (reduce f ridentity (reverse lst))) Thoughts? Andy