• Paul Eggert's avatar
    Fix aborts due to GC losing pseudovectors · 0dc52917
    Paul Eggert authored
    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