Subject: bug#30931: abort() due to CHECK_ALLOCATED_AND_LIVE failure during GC

From: Noam Postavsky <[email-masked]>
Date: Fri, 30 Mar 2018 08:56:04 -0400

Paul Eggert <[email-masked]> writes:

> This patch puts more pressure on the GC. Although it might be nice to
> relieve the pressure, I'm not sure it's worth the trouble.

> -      /* 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));

Shouldn't we at least do set-marker?

    Fset_marker (XCAR (data), Qnil, Qnil)
    Fset_marker (XCDR (data), Qnil, Qnil)