Subject: bug#78444: 30.1; Crash in GC (vector_marked_p)

From: martin rudalics <[email-masked]>
Date: Mon, 16 Jun 2025 10:34:40 +0200

> Can you try
[...)
 > and get us a backtrace when it's hit.

... which was a very silly proposal.  Please try

diff --git a/src/window.c b/src/window.c
index 1ac004af5e0..92e215fc9be 100644
--- a/src/window.c
+++ b/src/window.c
@@ -303,6 +303,14 @@ wset_buffer (struct window *w, Lisp_Object val)
      /* Make sure that we do not assign the buffer
         to an internal window.  */
      eassert (MARKERP (w->start) && MARKERP (w->pointm));
+  else
+    {
+      if (MARKERP (w->start))
+	eassert (!XMARKER (w->start)->buffer);
+      if (MARKERP (w->pointm))
+	eassert (!XMARKER (w->pointm)->buffer);
+    }
+
    w->contents = val;
    adjust_window_count (w, 1);
  }

instead.  If it does not work either, I will have to think of something
more elaborate.

Thanks, martin