Fix crashes in lisp_align_free in a build with GC_MCHECK.
authorEli Zaretskii <eliz@gnu.org>
Mon, 3 Mar 2014 16:46:36 +0000 (18:46 +0200)
committerEli Zaretskii <eliz@gnu.org>
Mon, 3 Mar 2014 16:46:36 +0000 (18:46 +0200)
commitbd650c24205a7a06f2786ad2226ed7cc19dbd69e
tree4418f83f07b9be9bee587333c7422100af9f0bed
parent19dae293f9fecea07c91440f0a33076c54d39b49
Fix crashes in lisp_align_free in a build with GC_MCHECK.

 src/gmalloc.c (aligned_alloc): Fix adjustment of size of the
 allocated buffer due to alignment.
 (freehook): If the block to be freed was allocated by
 'aligned_alloc', find its real pointer before calling 'free'.
 (mabort) [emacs]: Call 'emacs_abort', not 'abort', to provide a
 backtrace.

Fixes: debbugs:16901
src/ChangeLog
src/gmalloc.c