From 375de32bfbc582d398300d7d370df59095b49140 Mon Sep 17 00:00:00 2001 From: Leonardo de Moura Date: Wed, 1 Dec 2021 06:44:41 -0800 Subject: [PATCH] fix: `fix_mpz` --- src/runtime/compact.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/runtime/compact.cpp b/src/runtime/compact.cpp index 344a034c10..0a4ff61895 100644 --- a/src/runtime/compact.cpp +++ b/src/runtime/compact.cpp @@ -435,6 +435,7 @@ void compacted_region::fix_mpz(object * o) { m._mp_d = reinterpret_cast(static_cast(m_begin) + reinterpret_cast(m._mp_d) - reinterpret_cast(m_base_addr)); move(sizeof(mpz_object) + sizeof(mp_limb_t) * mpz_size(to_mpz(o)->m_value.m_val)); #else + to_mpz(o)->m_value.m_digits = reinterpret_cast(reinterpret_cast(o) + sizeof(mpz_object)); move(sizeof(mpz_object) + sizeof(mpn_digit) * to_mpz(o)->m_value.m_size); #endif }