all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Nicolas Bértolo" <nicolasbertolo@gmail.com>
To: Pip Cet <pipcet@gmail.com>
Cc: Paul Eggert <eggert@cs.ucla.edu>,
	41755@debbugs.gnu.org, Andrea Corallo <akrl@sdf.org>
Subject: bug#41755: feature/native-comp (master?): temacs crash in GC during mark phase
Date: Mon, 8 Jun 2020 15:51:14 -0300	[thread overview]
Message-ID: <CAFnS-OnpWnyWWWqDCVET_LG1HkxsqBHZXmsSRWDbWRYUjQ3haw@mail.gmail.com> (raw)
In-Reply-To: <CAOqdjBdU-pBWyewqC_eLAFckSffLOtuoFDp8CCa7MdUmEPzSzA@mail.gmail.com>

> 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.





  reply	other threads:[~2020-06-08 18:51 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-07 19:16 bug#41755: feature/native-comp (master?): temacs crash in GC during mark phase Andrea Corallo
2020-06-07 19:41 ` Pip Cet
2020-06-07 19:57   ` Nicolas Bértolo
2020-06-07 20:18     ` Pip Cet
2020-06-07 23:09       ` Nicolas Bértolo
2020-06-08  3:39         ` Nicolas Bértolo
2020-06-08  6:29           ` Eli Zaretskii
2020-06-08 18:24             ` Nicolas Bértolo
2020-06-08  6:41           ` Pip Cet
2020-06-08 18:51             ` Nicolas Bértolo [this message]
2020-06-08 19:05               ` Pip Cet
2020-06-09 14:20                 ` Nicolas Bértolo
2020-06-10 12:53                   ` Andrea Corallo
2020-06-27 14:39                     ` Andrea Corallo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAFnS-OnpWnyWWWqDCVET_LG1HkxsqBHZXmsSRWDbWRYUjQ3haw@mail.gmail.com \
    --to=nicolasbertolo@gmail.com \
    --cc=41755@debbugs.gnu.org \
    --cc=akrl@sdf.org \
    --cc=eggert@cs.ucla.edu \
    --cc=pipcet@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.