GNU bug report logs - #79200
31.0.50; Duplicated elements for '#<marker at' in buffer-undo-list

Previous Next

Package: emacs;

Reported by: Óscar Fuentes <oscarfv <at> eclipso.eu>

Date: Fri, 8 Aug 2025 16:45:03 UTC

Severity: normal

Found in version 31.0.50

Full log


View this message in rfc822 format

From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
To: Helmut Eller <eller.helmut <at> gmail.com>
Cc: pipcet <at> protonmail.com, Óscar Fuentes <oscarfv <at> eclipso.eu>, monnier <at> iro.umontreal.ca, Alan Mackenzie <acm <at> muc.de>, 79200 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: bug#79200: 31.0.50; Duplicated elements for '#<marker at' in buffer-undo-list
Date: Tue, 12 Aug 2025 17:47:31 +0200
[Message part 1 (text/plain, inline)]
Gerd Möllmann <gerd.moellmann <at> gmail.com> writes:

> Helmut Eller <eller.helmut <at> gmail.com> writes:
>
>> On Tue, Aug 12 2025, Gerd Möllmann wrote:
>>
>>> +static ptrdiff_t
>>> +next_marker_id (void)
>>> +{
>>> +  static ptrdiff_t next = 0;
>>> +  return next++;
>>> +}
>> [...]
>>>    DUMP_FIELD_COPY (out, marker, insertion_type);
>>> +  DUMP_FIELD_COPY (out, marker, id);
>>> +  out->id *= -1;
>>
>> I wonder if we shouldn't simply dump and restore the next id counter
>> (with pdumper_remember_scalar).
>
> Yeah, I think that's better.
>
> The above isn't correct anyway if we dump an Emacs that has a dump
> loaded. In that case the marker to be dumped could have a negative id
> already, and so on.

Like so, I think:

[0001-Don-t-use-negative-marker-ids.patch (text/x-patch, attachment)]

This bug report was last modified today.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.