Subject: Re: bug#77240: 30.1; Native-comp causing large memory leak

From: martin rudalics <[email-masked]>
Date: Wed, 2 Apr 2025 10:15:37 +0200

> Trying
 >
 >    (progn
 >      (setq display-buffer-alist
 >            '(((category . warning)
 >               ((lambda (&rest _) (warn "Compilation error"))))))
 >      (warn "Compilation error"))
 >
 > soon stops with
 >
 >    "Lisp nesting exceeds ‘max-lisp-eval-depth’: 1622"

That's the idea - each time you display the *Warnings* buffer you add a
new line to it and ask to display it again.  So we have to make sure
that displaying a buffer does not do that.  I'm sure you could write a
similar scenario for the *Messages* buffer too.  But first we would have
to know what precisely triggers that "write again and again" for the OP.

martin