From 9cf992835c8a0f2e6c4ace07b67fea2acb762cc5 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Wed, 19 Jun 2019 23:21:39 -0700 Subject: ash: gc problem. On 32 bit x86 Solaris 10, with gcc 4.9.0, this issue caused a miscompilation of the pset macro, due to ash abruptly returning zero, causing the op-code field of an instruction to be NOOP rather than GCALL. I'm committing this fix just for reference; I will immediately replace it with a refactoring of the function. * arith.c (ash): Add a gc_hint to prevent the a bignum from being reclaimed if the b = make_bignum() triggers gc. This happens in the case when the previous case computes a = make_bignum() and falls through. --- arith.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arith.c b/arith.c index fdb294b7..f374ddf4 100644 --- a/arith.c +++ b/arith.c @@ -3235,6 +3235,7 @@ val ash(val a, val bits) b = make_bignum(); if ((mpe = mp_shift(mp(a), mp(b), bn)) != MP_OKAY) break; + gc_hint(a); return normalize(b); default: goto bad3; -- cgit v1.2.3