GNU bug report logs - #41755
feature/native-comp (master?): temacs crash in GC during mark phase

Previous Next

Package: emacs;

Reported by: Andrea Corallo <akrl <at> sdf.org>

Date: Sun, 7 Jun 2020 19:26:02 UTC

Severity: normal

Done: Andrea Corallo <akrl <at> sdf.org>

Bug is archived. No further changes may be made.

Full log


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

From: Nicolas Bértolo <nicolasbertolo <at> gmail.com>
To: Pip Cet <pipcet <at> gmail.com>
Cc: Paul Eggert <eggert <at> cs.ucla.edu>, 41755 <at> debbugs.gnu.org,
 Andrea Corallo <akrl <at> sdf.org>
Subject: Re: bug#41755: feature/native-comp (master?): temacs crash in GC
 during mark phase
Date: Mon, 8 Jun 2020 15:51:14 -0300
> I'm wondering what we could do to make such bugs easier to find...

We could add a canary to stack based strings and conses. Then while
marking if we
come across a stack based string or cons we check that the canary is intact. If
it is not, then we can be sure that the memory has been written over.

Something like this:

struct Stack_String
{
  struct Lisp_String string;
  uint64_t canary = 0x12341234;
};

> Would GC_CHECK_MARKED_OBJECTS have caught this?

As far as I can see, during a GC we can't know if a stack-based string
is still alive.




This bug report was last modified 4 years and 326 days ago.

Previous Next


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