GNU bug report logs - #76091
31.0.50; festure/igc: buffer.h:829: Emacs fatal error: assertion failed: BUFFERP (a)

Previous Next

Package: emacs;

Reported by: Gregor Zattler <telegraph <at> gmx.net>

Date: Thu, 6 Feb 2025 12:51:01 UTC

Severity: normal

Found in version 31.0.50

Done: Pip Cet <pipcet <at> protonmail.com>

Bug is archived. No further changes may be made.

Full log


Message #32 received at 76091 <at> debbugs.gnu.org (full text, mbox):

From: Pip Cet <pipcet <at> protonmail.com>
To: Gerd Möllmann <gerd.moellmann <at> gmail.com>
Cc: 76091 <at> debbugs.gnu.org, Gregor Zattler <telegraph <at> gmx.net>,
 Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#76091: 31.0.50;
 festure/igc: buffer.h:829: Emacs fatal error: assertion failed:
 BUFFERP (a)
Date: Fri, 07 Feb 2025 13:55:19 +0000
Gerd Möllmann <gerd.moellmann <at> gmail.com> writes:

> On 7. Feb 2025, at 11:41, Pip Cet <pipcet <at> protonmail.com> wrote:
>
>  I have a patch, but I'd like to discuss whether this is a plausible
>  theory first.  Gerd, if there's something that prevents this problem
>  from happening, and I missed it, could you briefly yell at me here?
>
> Good catch!

Thanks!

> I think he idea I had with the igc_on_... is mistaken,

I've rewritten the root resizing functions to always follow the

1. allocate new zeroed root
2. register new root
3. copy contents from old root
4. if this fails, try again
5. save new root
6. unregister old root
7. free old root

pattern.  It's a bit complicated, but avoids the need for parking the
arena in these cases.  And, yes, it'll waste some memory, but these are
roots, and roots are supposed to be small.  I'd rather do it that way
and turn them into non-roots than figure out how to use realloc() on an
MPS root, TBH.

> one must not free the memory of a root while the MPS is not parked.

I think the surprising thing is that parking the arena will cause GC
activity.  It's best to avoid parking it except when walking the pools,
I think.

Still testing the patch...

Pip





This bug report was last modified 102 days ago.

Previous Next


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