Avoid an infloop when we run out of memory
commit36b953947ee2ee0411139bd4ad7dcffdcc403036
authorEli Zaretskii <eliz@gnu.org>
Mon, 11 Jan 2016 16:05:40 +0000 (11 18:05 +0200)
committerEli Zaretskii <eliz@gnu.org>
Mon, 11 Jan 2016 16:05:40 +0000 (11 18:05 +0200)
treee2bbd90e8712a1d9f7f011805ca35a5c92cb447b
parent200675299e24139ccce444a7ca5d59a2aed2891c
Avoid an infloop when we run out of memory

* src/alloc.c (garbage_collect_1): Don't bother saving and
restoring the echo-area message if we are GC'ing after running out
of memory.  This avoids an infloop due to repeated attempts to
allocate memory for the cons cell needed to save the message,
which signals the memory-full error, which attempts to save the
echo-area message, which signals memory-full again, etc.
src/alloc.c