unofficial mirror of 
 help / color / mirror / Atom feed
* bug#59540: Calling length on a very long improper list is disastrous.
@ 2022-11-24 10:52 Jeremy Phelps
  0 siblings, 0 replies; only message in thread
From: Jeremy Phelps @ 2022-11-24 10:52 UTC (permalink / raw)
  To: 59540

[-- Attachment #1: Type: text/plain, Size: 795 bytes --]

I lost my Emacs session today because I accidentally called the length
function on an extremely long improper list.

But Guile prints the entire thing when it reports the error that happens
when the length function gets to the improper part of the list. It tried to
print a few million elements just to tell me which list wasn't a proper

To reproduce the error should be easy:


   (let loop ((result 'x)

              (n 50000000))

     (if (= n 0)


         (loop (cons n result) (- n 1)))))

Emacs is more sensitive to the problem because it doesn't throw away any of
the output. It's also really bad over SSH. The above test is enough to dump
output to a local terminal for a minute or two, or to uninterruptibly tie
up an SSH session for several minutes.

[-- Attachment #2: Type: text/html, Size: 1687 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-11-24 10:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-24 10:52 bug#59540: Calling length on a very long improper list is disastrous Jeremy Phelps

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).