From 670f2ffae718046c0fb37313965a51c040ed096f Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 29 Mar 2018 23:00:23 -0700 Subject: [PATCH] Fix CHECK_ALLOCATED_AND_LIVE abort during GC * src/editfns.c (save_restriction_restore): Wait for the GC to free the temporary markers (Bug#30931). --- src/editfns.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/editfns.c b/src/editfns.c index 7e35fe87972..727f2d0080c 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -3899,9 +3899,10 @@ save_restriction_restore (Lisp_Object data) buf->clip_changed = 1; /* Remember that the narrowing changed. */ } - /* These aren't needed anymore, so don't wait for GC. */ - free_marker (XCAR (data)); - free_marker (XCDR (data)); + /* This isn’t needed anymore, so don’t wait for GC. + Do not call free_marker on XCAR (data) or XCDR (data), + though, since record_marker_adjustments may have put + them on the buffer’s undo list (Bug#30931). */ free_cons (XCONS (data)); } else