emacs-devel
[Top][All Lists]
Advanced

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

Re: [Emacs-diffs] master 0a5b6e2: Fix aborts in GC under GC_CHECK_MARKED


From: Daniel Colascione
Subject: Re: [Emacs-diffs] master 0a5b6e2: Fix aborts in GC under GC_CHECK_MARKED_OBJECTS
Date: Wed, 21 Dec 2016 20:22:40 -0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

On Wed, Dec 21 2016, Eli Zaretskii wrote:
> branch: master
> commit 0a5b6e28f91ff46231a768737170e39172297257
> Author: Eli Zaretskii <address@hidden>
> Commit: Eli Zaretskii <address@hidden>
>
>     Fix aborts in GC under GC_CHECK_MARKED_OBJECTS
>     
>     * src/alloc.c (mark_object) [GC_CHECK_MARKED_OBJECTS]: Don't abort
>     for thread objects.  They are marked via the all_threads list, and
>     therefore don't need to be inserted into the red-black tree, so
>     mem_find will never find them.  Reported by Daniel Colascione
>     <address@hidden> in
>     http://lists.gnu.org/archive/html/emacs-devel/2016-12/msg00817.html.
> ---
>  src/alloc.c |    6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/src/alloc.c b/src/alloc.c
> index f2b7682..e979f36 100644
> --- a/src/alloc.c
> +++ b/src/alloc.c
> @@ -6406,7 +6406,7 @@ mark_object (Lisp_Object arg)
>  
>  #ifdef GC_CHECK_MARKED_OBJECTS
>       m = mem_find (po);
> -     if (m == MEM_NIL && !SUBRP (obj))
> +     if (m == MEM_NIL && !SUBRP (obj) && !THREADP (obj))

This code is incorrect.  The only special case is po == &primary_thread.
As I mentioned in another message, all _other_ thread objects live in
dynamic storage and need the usual treatment of thread objects.
The reason we have SUBRP in the clause above is that *all* subr objects
live in static, not dynamic, storage.



reply via email to

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