wingo pushed a commit to branch wip-whippet
in repository guile.

commit 9eb4d960cdffbda6c824d1d4d90dba2df0ff9ae6
Author: Andy Wingo <wi...@pobox.com>
AuthorDate: Mon Jun 30 09:45:15 2025 +0200

    Pin struct unboxed_fields
    
    * libguile/struct.c (set_vtable_access_fields): Pin unboxed_fields, so
    that we can access it from within struct trace function.
---
 libguile/struct.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libguile/struct.c b/libguile/struct.c
index 8d7b00161..a7a719a4f 100644
--- a/libguile/struct.c
+++ b/libguile/struct.c
@@ -144,6 +144,8 @@ set_vtable_access_fields (SCM vtable)
                                    scm_ash (SCM_INUM1,
                                             scm_from_size_t (field)));
 
+  scm_gc_pin_object (SCM_I_CURRENT_THREAD, unboxed_fields);
+
   /* Record computed size of vtable's instances.  */
   SCM_SET_VTABLE_FLAGS (vtable, 0);
   SCM_STRUCT_DATA_SET (vtable, scm_vtable_index_size, nfields);

Reply via email to