bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#46908: 28.0.50; Dozens of spurious markers in buffer-undo-list


From: Michael Heerdegen
Subject: bug#46908: 28.0.50; Dozens of spurious markers in buffer-undo-list
Date: Sat, 06 Mar 2021 01:51:00 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

martin rudalics <rudalics@gmx.at> writes:

> > I tried it now.  The only thing I can say is that with Emacs 27 it
> > usually returns 0 or 1 here while with master it returns 10.  So maybe
> > you should try (after verifying what I found out) to trace the recent
> > changes in master.
>
> The "it" above is `count-markers-in-buffer-undo-list'.  And with "trace"
> I really meant "bisect".  But make sure to check first what I said about
> the Emacs 27 behavior - YMMV.

I cannot confirm that, no.  I can reproduce the issue in a newly built
Emacs 27 as well as in the 27 that comes with Debian.  "It" again being
`count-markers-in-buffer-undo-list'.

My question is what amount of that is pathological.  A lot of code
creates markers "on the fly", a lot, e.g. jit-lock or yank (push-mark)
or display-buffer.  When undo is performed before gc is run, they end in
buffer-undo-list.

Does making a marker point to nil with `set-marker' then make it
suitable for garbage collection?  I guess not.

My observation: if I set undo-buffer-list to nil after reproducing the
issue, `count-markers-in-buffer-undo-list' reports "0" afterwards.  So I
wonder whether what we see is maybe normal business and an unfortunate
side effect of undo recording marker positions and gc running not often
enough to prevent these accidents?

I can continue testing with emacs-26 if you want.

Regards,

Michael.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]