From: Eli Zaretskii Date: Sun, 2 Dec 2018 18:04:05 +0000 (+0200) Subject: Revert "Revert "Fix infloop in GC mark_kboards"" X-Git-Tag: emacs-26.1.91~61 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=745c9c0;p=emacs.git Revert "Revert "Fix infloop in GC mark_kboards"" This reverts commit c418c85617babbe7b63730fefb71e2c87a0141af. This reinstates the original fix, as it had nothing to do with the behavior reported in bug#33571, which seems to be the expected behavior. --- diff --git a/src/keyboard.c b/src/keyboard.c index 0d56ea3f7ac..dccc6b7f128 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -12011,7 +12011,12 @@ mark_kboards (void) for (event = kbd_fetch_ptr; event != kbd_store_ptr; event++) { if (event == kbd_buffer + KBD_BUFFER_SIZE) - event = kbd_buffer; + { + event = kbd_buffer; + if (event == kbd_store_ptr) + break; + } + /* These two special event types has no Lisp_Objects to mark. */ if (event->kind != SELECTION_REQUEST_EVENT && event->kind != SELECTION_CLEAR_EVENT)