diff --git a/src/frame.c b/src/frame.c
index ff99b0353af..42fb8eccb46 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -27,6 +27,7 @@ along with GNU Emacs. If not, see . */
#include
#include "lisp.h"
+#include "igc.h"
#ifdef HAVE_WINDOW_SYSTEM
#include TERM_HEADER
@@ -6257,6 +6258,9 @@ init_frame_once_for_pdumper (void)
{
PDUMPER_RESET_LV (Vframe_list, Qnil);
PDUMPER_RESET_LV (selected_frame, Qnil);
+#ifdef HAVE_MPS
+ igc_root_create_exact_ptr (&last_nonminibuf_frame);
+#endif
}
void
diff --git a/src/igc.c b/src/igc.c
index 794f5b9507b..ff1df006eb7 100644
--- a/src/igc.c
+++ b/src/igc.c
@@ -838,6 +838,19 @@ scan_exact (mps_ss_t ss, void *start, void *end, void *closure)
return MPS_RES_OK;
}
+static mps_res_t
+scan_ptr_exact (mps_ss_t ss, void *start, void *end, void *closure)
+{
+ MPS_SCAN_BEGIN (ss)
+ {
+ for (void **p = start; (void *) p < end; ++p)
+ if (*p)
+ IGC_FIX12_RAW (ss, p);
+ }
+ MPS_SCAN_END (ss);
+ return MPS_RES_OK;
+}
+
/***********************************************************************
Default pad, fwd, ...
***********************************************************************/
@@ -1644,6 +1657,14 @@ igc_root_create_exact (Lisp_Object *start, Lisp_Object *end)
root_create_exact (global_igc, start, end, scan_exact);
}
+void
+igc_root_create_exact_ptr (void *var_addr)
+{
+ void *start = var_addr;
+ void *end = (char *) start + sizeof (void *);
+ root_create_exact (global_igc, start, end, scan_ptr_exact);
+}
+
static void
root_create_specpdl (struct igc_thread_list *t)
{
diff --git a/src/igc.h b/src/igc.h
index 39ce15ee8f1..eae268b49e7 100644
--- a/src/igc.h
+++ b/src/igc.h
@@ -92,6 +92,7 @@ void igc_check_symbol (void *p);
void igc_collect (void);
void igc_root_create_ambig (void *start, void *end);
void igc_root_create_exact (Lisp_Object *start, Lisp_Object *end);
+void igc_root_create_exact_ptr (void *var_addr);
# define eassert_not_mps() eassert (false)
#else