From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#30626: 26.0.91; Crash when traversing a `stream-of-directory-files' Date: Wed, 28 Feb 2018 18:00:00 +0200 Message-ID: <83h8q1yuin.fsf@gnu.org> References: <87inaiss6l.fsf@web.de> <6FCF6ACA-4F29-4B6B-BE9D-D7130C6E9495@gnu.org> <87fu5moe4c.fsf@web.de> <877eqyocro.fsf@web.de> <83zi3uz4nb.fsf@gnu.org> <87lgfd52by.fsf@gmail.com> <87bmg91ity.fsf@web.de> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1519833557 12476 195.159.176.226 (28 Feb 2018 15:59:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 28 Feb 2018 15:59:17 +0000 (UTC) Cc: npostavs@gmail.com, 30626@debbugs.gnu.org To: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Feb 28 16:59:13 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1er48N-0002o9-Fl for geb-bug-gnu-emacs@m.gmane.org; Wed, 28 Feb 2018 16:59:11 +0100 Original-Received: from localhost ([::1]:45319 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1er4AQ-0002Px-2b for geb-bug-gnu-emacs@m.gmane.org; Wed, 28 Feb 2018 11:01:18 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33951) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1er4AF-0002PD-AR for bug-gnu-emacs@gnu.org; Wed, 28 Feb 2018 11:01:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1er4AA-0007YL-HO for bug-gnu-emacs@gnu.org; Wed, 28 Feb 2018 11:01:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:58022) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1er4AA-0007Xb-E0 for bug-gnu-emacs@gnu.org; Wed, 28 Feb 2018 11:01:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1er4A9-0001gl-Sh for bug-gnu-emacs@gnu.org; Wed, 28 Feb 2018 11:01:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 28 Feb 2018 16:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 30626 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 30626-submit@debbugs.gnu.org id=B30626.15198336066379 (code B ref 30626); Wed, 28 Feb 2018 16:01:01 +0000 Original-Received: (at 30626) by debbugs.gnu.org; 28 Feb 2018 16:00:06 +0000 Original-Received: from localhost ([127.0.0.1]:37686 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1er49G-0001eb-8T for submit@debbugs.gnu.org; Wed, 28 Feb 2018 11:00:06 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:42348) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1er49C-0001d2-Rw for 30626@debbugs.gnu.org; Wed, 28 Feb 2018 11:00:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1er492-0006dq-OJ for 30626@debbugs.gnu.org; Wed, 28 Feb 2018 10:59:57 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:59666) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1er492-0006dh-LR; Wed, 28 Feb 2018 10:59:52 -0500 Original-Received: from [176.228.60.248] (port=3444 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1er491-0007wm-Vu; Wed, 28 Feb 2018 10:59:52 -0500 In-reply-to: <87bmg91ity.fsf@web.de> (message from Michael Heerdegen on Wed, 28 Feb 2018 11:58:49 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:143740 Archived-At: > From: Michael Heerdegen > Cc: Eli Zaretskii , 30626@debbugs.gnu.org > Date: Wed, 28 Feb 2018 11:58:49 +0100 > > > (FIRST-VALUE . FUNCTION-TO-PRODUCE-REST-OF-LIST) > > Yes, that's exactly how it's implemented. When requesting more elements > from the stream, that becomes > > (FIRST-VALUE . > (SECOND-VALUE . FUNCTION-TO-PRODUCE-MORE-REST-OF-LIST)) > > When we loop over the string, the cons whose car is the FIRST-VALUE, > let's call it cons1, is immediately thrown away, and we continue with > > (SECOND-VALUE . FUNCTION-TO-PRODUCE-MORE-REST-OF-LIST) > > etc. How do you see that the car is immediately thrown away? > AFAIU the problem is that the cons1 still exists in memory until garbage > collection kicks in. When that happens, the cons1 points to a largely > recursive cons structure, though this structure is never referenced from > Lisp in this form. What is "cons1" in this context?