emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs-26 d09c488: Port to 32-bit sparc64


From: Paul Eggert
Subject: [Emacs-diffs] emacs-26 d09c488: Port to 32-bit sparc64
Date: Tue, 20 Mar 2018 17:39:17 -0400 (EDT)

branch: emacs-26
commit d09c488cb5f4cdf8d47b1e69f5fc7ac0750d7cbe
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>

    Port to 32-bit sparc64
    
    Backport from master.
    Problem reported by Ulrich Mueller; fix suggested by Eli Zaretskii
    and Andreas Schwab (Bug#30855).
    * src/alloc.c (mark_memory): Call mark_maybe_object only on
    pointers that are properly aligned for Lisp_Object.
---
 src/alloc.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/alloc.c b/src/alloc.c
index 9d0e2d3..c3f7920 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -4983,7 +4983,11 @@ 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);
+
+      verify (alignof (Lisp_Object) % GC_POINTER_ALIGNMENT == 0);
+      if (alignof (Lisp_Object) == GC_POINTER_ALIGNMENT
+         || (uintptr_t) pp % alignof (Lisp_Object) == 0)
+       mark_maybe_object (*(Lisp_Object *) pp);
     }
 }
 



reply via email to

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