diff options
| author | Paul Eggert | 2018-03-20 09:54:20 -0700 |
|---|---|---|
| committer | Paul Eggert | 2018-03-20 09:55:01 -0700 |
| commit | db64a866f6971c5d63565253c0c8d8db15d4a4dc (patch) | |
| tree | 33e4f1cf657137e753548e04fecb7b1a2757e987 /src/alloc.c | |
| parent | 7ce25de888f285502898da13e689e4372fc6a49d (diff) | |
| download | emacs-db64a866f6971c5d63565253c0c8d8db15d4a4dc.tar.gz emacs-db64a866f6971c5d63565253c0c8d8db15d4a4dc.zip | |
Port to 32-bit sparc64
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.
Diffstat (limited to 'src/alloc.c')
| -rw-r--r-- | src/alloc.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/alloc.c b/src/alloc.c index f97b99c0f31..da01173fba2 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -4981,7 +4981,11 @@ mark_memory (void *start, void *end) | |||
| 4981 | for (pp = start; (void *) pp < end; pp += GC_POINTER_ALIGNMENT) | 4981 | for (pp = start; (void *) pp < end; pp += GC_POINTER_ALIGNMENT) |
| 4982 | { | 4982 | { |
| 4983 | mark_maybe_pointer (*(void **) pp); | 4983 | mark_maybe_pointer (*(void **) pp); |
| 4984 | mark_maybe_object (*(Lisp_Object *) pp); | 4984 | |
| 4985 | verify (alignof (Lisp_Object) % GC_POINTER_ALIGNMENT == 0); | ||
| 4986 | if (alignof (Lisp_Object) == GC_POINTER_ALIGNMENT | ||
| 4987 | || (uintptr_t) pp % alignof (Lisp_Object) == 0) | ||
| 4988 | mark_maybe_object (*(Lisp_Object *) pp); | ||
| 4985 | } | 4989 | } |
| 4986 | } | 4990 | } |
| 4987 | 4991 | ||