Fix alignment-related core dump during GC.
commit7c5ee88ecb336a2deac1c1b98753f08ef0a2bd1c
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 7 Oct 2011 07:23:44 +0000 (7 00:23 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 7 Oct 2011 07:23:44 +0000 (7 00:23 -0700)
tree10a208e0778b6ca9d376b8c879ff23b28deb1d30
parent21ce8245145810da59c854a172900894f22c175c
Fix alignment-related core dump during GC.

* configure.in (GC_LISP_OBJECT_ALIGNMENT): Remove.
This is now done by src/alloc.c.
* src/alloc.c (GC_LISP_OBJECT_ALIGNMENT): Use offsetof, not __alignof__
or sizeof.  __alignof__ gives the wrong answer on Fedora x86-64
with GCC 4.6.1 when configured with CC='gcc -m32' --with-wide-int;
this makes Emacs dump core during garbage collection on rare
occasions.  sizeof is obviously inferior to offsetof here, so
stick with offsetof.
(GC_POINTER_ALIGNMENT): New macro.
(mark_memory): Omit 3rd (offset) arg; caller changed.
Don't assume EMACS_INT alignment is the same as pointer alignment.
ChangeLog
configure.in
src/ChangeLog
src/alloc.c