bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#30855: 25.3; temacs fails with bus error during garbage collection


From: Eli Zaretskii
Subject: bug#30855: 25.3; temacs fails with bus error during garbage collection
Date: Tue, 20 Mar 2018 16:47:29 +0200

> Date: Tue, 20 Mar 2018 15:00:28 +0100
> Cc: 30855@debbugs.gnu.org,
>     gentoo-bug@opensource.sf-tec.de
> From: Ulrich Mueller <ulm@gentoo.org>
> 
>   for (pp = start; (void *) pp < end; pp += GC_POINTER_ALIGNMENT)
>     {
>       mark_maybe_pointer (*(void **) pp);
>       mark_maybe_object (*(Lisp_Object *) pp);
>     }
> 
> The loop is in steps of 4 but tries to access objects of size 8.

So you are saying that we should be doing the below instead?

diff --git a/src/alloc.c b/src/alloc.c
index 9d0e2d3..18546ca 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -4983,7 +4983,8 @@ mark_memory (void *start, void *end)
   for (pp = start; (void *) pp < end; pp += GC_POINTER_ALIGNMENT)
     {
       mark_maybe_pointer (*(void **) pp);
-      mark_maybe_object (*(Lisp_Object *) pp);
+      if ((intptr_t) pp % GCALIGNMENT == 0)
+       mark_maybe_object (*(Lisp_Object *) pp);
     }
 }
 





reply via email to

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