diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2019-06-19 23:21:39 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2019-06-19 23:27:48 -0700 |
commit | 9cf992835c8a0f2e6c4ace07b67fea2acb762cc5 (patch) | |
tree | 1e85935de4e6e0881de015954a76e6beb11deb0d | |
parent | 6da59c10cb9cd59bdc04432f3f2a25df0991fac3 (diff) | |
download | txr-9cf992835c8a0f2e6c4ace07b67fea2acb762cc5.tar.gz txr-9cf992835c8a0f2e6c4ace07b67fea2acb762cc5.tar.bz2 txr-9cf992835c8a0f2e6c4ace07b67fea2acb762cc5.zip |
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.
-rw-r--r-- | arith.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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; |