Subject: bug#57957: closed (Re: bug#57957: bug#69872: 29.2; Async native compilation of seq.el test uses up resources and hangs)

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 01 Apr 2024 20:48:02 +0000

Your bug report

#69872: 29.0.50; Native compilation hangs on cyclic lists

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
69872: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=69872
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#57957: bug#69872: 29.2; Async native compilation of seq.el test uses up resources and hangs
From: Andrea Corallo <[email-masked]>
To: Andrea Corallo <[email-masked]>
Cc: Lars Tveito <[email-masked]>, hokomo <[email-masked]>, [email-masked], Gerd Möllmann <[email-masked]>, [email-masked], Stefan Monnier <[email-masked]>, Lars Ingebrigtsen <[email-masked]>
Date: Mon, 01 Apr 2024 16:46:47 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

Andrea Corallo <[email-masked]> writes:

> Andrea Corallo <[email-masked]> writes:
>
>> Stefan Monnier <[email-masked]> writes:
>>
>>>> The question is of course also how much effort circular lists deserve in
>>>> the compiler.  From my point of view, not too much because they aren't
>>>> very useful, in code at least.  And dealing with them costs runtime.
>>>
>>> Circular data structures are perfectly normal in source code under
>>> a `quote` but the code itself should never be cyclic (so I think it
>>> would be OK to signal an error (and/or to inf-loop) when asked to
>>> compile a chunk of code that has a cycle).  So we *should* handle
>>> circular data structures correctly.
>>
>> I agree, Saturday I should have some time to look into this.
>
> A little time after... I finally managed to get to it, sorry for the
> delay.
>
> I've pushed into master c5de73a95a6, it fixes my reprodurer here and
> adds a test for this.
>
> If anyone could confirm this is fixed i'll be (extremely) happy to close
> this :)
>
> Thanks
>
>   Andrea

Right I'm closing this as I believe it's fixed, happy to re-open if it's
not the case.

Thanks!

  Andrea

Subject: 29.0.50; Native compilation hangs on cyclic lists
From: Lars Tveito <[email-masked]>
To: "[email-masked]" <[email-masked]>
Date: Tue, 20 Sep 2022 07:55:48 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

Evaluating the two following forms results in Emacs hanging:

(defun test-cycle ()
  '#1=(a . #1#))

(native-compile 'test-cycle)

The bug has been reproduced on a system running Debian as well.

- Lars

In GNU Emacs 29.0.50 (build 1, aarch64-apple-darwin21.6.0, NS
appkit-2113.60 Version 12.6 (Build 21G115))
Windowing system distributor 'Apple', version 10.3.2113
System Description:  macOS 12.6

Configured using:
'configure
--prefix=/nix/store/wf6wjsvvs3q7k0vf3xlfzi3ik8v3601n-emacs-29.0.50
--disable-build-details --with-modules --with-ns
--disable-ns-self-contained --with-native-compilation'

Configured features:
ACL GLIB GMP GNUTLS JPEG JSON LIBXML2 MODULES NATIVE_COMP NOTIFY KQUEUE
NS PDUMPER PNG RSVG SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS ZLIB

Important settings:
  value of $EMACSLOADPATH: /nix/store/87hrwgmnic6hhjl6p7ch30ik90dpw324-emacs-packages-deps/share/emacs/site-lisp:
  value of $EMACSNATIVELOADPATH: /nix/store/87hrwgmnic6hhjl6p7ch30ik90dpw324-emacs-packages-deps/share/emacs/native-lisp::
  value of $LC_CTYPE: UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
/nix/store/87hrwgmnic6hhjl6p7ch30ik90dpw324-emacs-packages-deps/share/emacs/site-lisp/elpa/let-alist-1.0.6/let-alist hides /nix/store/wf6wjsvvs3q7k0vf3xlfzi3ik8v3601n-emacs-29.0.50/share/emacs/29.0.50/lisp/emacs-lisp/let-alist
/nix/store/87hrwgmnic6hhjl6p7ch30ik90dpw324-emacs-packages-deps/share/emacs/site-lisp/elpa/nadvice-0.3/nadvice hides /nix/store/wf6wjsvvs3q7k0vf3xlfzi3ik8v3601n-emacs-29.0.50/share/emacs/29.0.50/lisp/emacs-lisp/nadvice

Features:
(shadow sort mail-extr emacsbug message mailcap yank-media puny dired
dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068
epg-config gnus-util text-property-search time-date mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs
comp comp-cstr warnings icons subr-x rx cl-seq cl-macs gv cl-extra
help-mode bytecomp byte-compile cconv cl-lib sendmail rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils rmc iso-transl tooltip eldoc
paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode
mwheel term/ns-win ns-win ucs-normalize mule-util term/common-win
tool-bar dnd fontset image regexp-opt fringe tabulated-list replace
newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar
rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock
font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq
simple cl-generic indonesian philippine cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese composite emoji-zwj charscript charprop case-table
epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button
loaddefs faces cus-face macroexp files window text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads kqueue cocoa ns multi-tty
make-network-process native-compile emacs)

Memory information:
((conses 16 78425 6959)
(symbols 48 7029 0)
(strings 32 19124 2018)
(string-bytes 1 599871)
(vectors 16 16700)
(vector-slots 8 325741 9902)
(floats 8 27 31)
(intervals 56 320 0)
(buffers 1000 12))