GNU bug report logs -
#30626
26.0.91; Crash when traversing a `stream-of-directory-files'
Previous Next
Reported by: Michael Heerdegen <michael_heerdegen <at> web.de>
Date: Tue, 27 Feb 2018 09:23:01 UTC
Severity: normal
Tags: fixed, patch
Found in version 26.0.91
Done: Noam Postavsky <npostavs <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #65 received at 30626 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
> I don't think it's thrown away from the POV of GC. But you can easily
> see what is going on if you trace the GC on the C level. You should
> be able to see which object causes recursion in mark_object. I didn't
> look long enough, but what I did see looks very much like the entire
> unwound stream.
I have an idea what could be going on. In the stream-range example,
this is how the stream is build:
#+begin_src emacs-lisp
(list stream--identifier
(let
(forced val)
(lambda
(&optional check)
(if
check
forced
(unless
forced
(setf
val
(progn
(cons
start
(stream-range (+ start step) end step))))
(setf forced t))
val))))
#+end_src
The inner `stream-range' call results in a closure, and I guess that
this closure includes a reference to the outside VAL, which is the
stream from one step back (though there isn't a lexical reference to the
variable...does that make sense?)
So there could be a chain of references via closure variables back to
the first cons.
Michael.
This bug report was last modified 6 years and 44 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.