From 420661af07448857f0a17e15dc27bceeb6aff541 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 20 Jan 2021 09:52:07 -0500 Subject: Don't let `maybe_quit` prevent resetting `consing_until_gc` (bug#43389) * src/alloc.c (garbage_collect): Postpone `unblock_input` a bit. * src/window.c (window_parameter): Avoid `maybe_quit`. --- src/alloc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/alloc.c') diff --git a/src/alloc.c b/src/alloc.c index c0a55e61b97..b86ed4ed262 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -6101,11 +6101,13 @@ garbage_collect (void) gc_in_progress = 0; - unblock_input (); - consing_until_gc = gc_threshold = consing_threshold (gc_cons_threshold, Vgc_cons_percentage, 0); + /* Unblock *after* re-setting `consing_until_gc` in case `unblock_input` + signals an error (see bug#43389). */ + unblock_input (); + if (garbage_collection_messages && NILP (Vmemory_full)) { if (message_p || minibuf_level > 0) -- cgit v1.2.3