From 58ea72ee7e3b8c6e8f88e54c92c9dd71b9548b5b Mon Sep 17 00:00:00 2001 From: Helmut Eller Date: Tue, 11 Jun 2024 21:06:25 +0200 Subject: [PATCH 1/3] WIP some fixes for pure space and obarrays * src/igc.c (mirror_string): Don't change references to rodata. (mirror_obarray): Mirror the buckets array. (mirror_vector): Fix typo. --- src/igc.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/igc.c b/src/igc.c index b101c61b3c2..ce389f1d2d5 100644 --- a/src/igc.c +++ b/src/igc.c @@ -3976,12 +3976,14 @@ mirror_string (struct igc_mirror *m, struct Lisp_String *s) /* FIXME: IGC_OBJ_STRING_DATA is currently not used in the dump, which means string data has no igc_header in the dump. We could leave the string data alone. Not sure what's best. */ - igc_assert (pdumper_object_p (s->u.s.data)); - ptrdiff_t nbytes = STRING_BYTES (s); - unsigned char *data = alloc_string_data (nbytes, false); - memcpy (data, s->u.s.data, nbytes + 1); - s->u.s.data = data; - + if (s->u.s.size_byte != -2) + { + igc_assert (pdumper_object_p (s->u.s.data)); + ptrdiff_t nbytes = STRING_BYTES (s); + unsigned char *data = alloc_string_data (nbytes, false); + memcpy (data, s->u.s.data, nbytes + 1); + s->u.s.data = data; + } IGC_MIRROR_RAW (m, &s->u.s.intervals); } @@ -4103,8 +4105,7 @@ #define IGC_MIRROR_VECTORLIKE(m, v) \ static void mirror_obarray (struct igc_mirror *m, struct Lisp_Obarray *o) { - if (o->buckets) - IGC_MIRROR_NOBJS (m, o->buckets, obarray_size (o)); + IGC_MIRROR_RAW (m, &o->buckets); } #endif @@ -4304,7 +4305,7 @@ mirror_vector (struct igc_mirror *m, void *client) { #ifndef IN_MY_FORK case PVEC_OBARRAY: - mirror_obarray (c, client); + mirror_obarray (m, client); break; #endif -- 2.39.2