]> git.eshelyaron.com Git - emacs.git/commit
Fix aborts due to GC losing pseudovectors
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 26 May 2020 03:26:14 +0000 (20:26 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 26 May 2020 03:29:50 +0000 (20:29 -0700)
commit0dc529175dc027c1567fb9b7cd529d29236aad44
tree12e250b10b6a14d25c3c6dacc8ee82bd9e8fc4e2
parent8b940dac32c2a37f93b8670751a0e5f72ec86cea
Fix aborts due to GC losing pseudovectors

Problem reported by Eli Zaretskii (Bug#41321).
* src/alloc.c (MALLOC_ALIGNMENT_BOUND): New constant.
(LISP_ALIGNMENT): Lower it to avoid crashes on MinGW and similarly
buggy platforms where malloc returns pointers not aligned to
alignof (max_align_t).  But keep it higher on platforms where this
is known to work, as it helps GC performance.
(MALLOC_IS_LISP_ALIGNED): Define in terms of the other two.
* src/alloc.c (stacktop_sentry):
* src/thread.c (run_thread):
Don’t overalign or oversize stack sentries; they need to be
aligned only for pointers and Lisp_Object, not for arbitrary
pseudovector contents.
* src/lisp.h (union emacs_align_type): New type, used for
LISP_ALIGNMENT.
src/alloc.c
src/lisp.h
src/thread.c