From 2bd8ee79d933cfaba5faea3a4c7653c5e1701cf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerd=20M=C3=B6llmann?= Date: Thu, 23 May 2024 08:56:28 +0200 Subject: [PATCH] Don't make a root for non-existent ephemeral relocs --- src/igc.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/igc.c b/src/igc.c index a74c0f5000a..a5c71555300 100644 --- a/src/igc.c +++ b/src/igc.c @@ -2197,8 +2197,9 @@ igc_root_create_comp_unit (struct Lisp_Native_Comp_Unit *u) r->data_relocs = root_create_exact_n (u->data_relocs, u->n_data_relocs); r->data_imp_relocs = root_create_exact_n (u->data_imp_relocs, u->n_data_imp_relocs); - r->data_eph_relocs - = root_create_exact_n (u->data_eph_relocs, u->n_data_eph_relocs); + if (u->n_data_eph_relocs) + r->data_eph_relocs + = root_create_exact_n (u->data_eph_relocs, u->n_data_eph_relocs); r->comp_unit = root_create_exact_n (u->comp_unit, 1); igc_assert (u->igc_info == NULL); u->igc_info = r; @@ -2211,7 +2212,8 @@ igc_root_destroy_comp_unit (struct Lisp_Native_Comp_Unit *u) struct igc_cu_roots *r = u->igc_info; destroy_root (&r->data_relocs); destroy_root (&r->data_imp_relocs); - destroy_root (&r->data_eph_relocs); + if (r->data_eph_relocs) + destroy_root (&r->data_eph_relocs); destroy_root (&r->comp_unit); xfree (r); u->igc_info = NULL;