summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-10-07 20:36:21 -0700
committerKaz Kylheku <kaz@kylheku.com>2016-10-07 20:36:21 -0700
commitb79eddb5ef66c17688572d20e44a60e49930b511 (patch)
tree9f46e0eb81d232c91cd9e6ab6c16b10711dc7672
parent60dc066432b343d059eadd4b19a4ca9f795f0389 (diff)
downloadtxr-b79eddb5ef66c17688572d20e44a60e49930b511.tar.gz
txr-b79eddb5ef66c17688572d20e44a60e49930b511.tar.bz2
txr-b79eddb5ef66c17688572d20e44a60e49930b511.zip
bug: heap backpointer assignment in static-slot-ensure.
* struct.c (static_slot_ens_rec): Neglected use of set macro to store newval in freshly allocated slot, which means we corrupt garbage collection if this causes an old generation objet to point to a new generation object.
-rw-r--r--struct.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/struct.c b/struct.c
index 29ee89d6..066b6f44 100644
--- a/struct.c
+++ b/struct.c
@@ -987,10 +987,10 @@ static val static_slot_ens_rec(val stype, val sym, val newval,
stsl = &st->stslot[st->nstslots];
if (inh_stsl == 0) {
- stsl->store = newval;
stsl->home_type = stype;
stsl->home_offs = st->nstslots;
stsl->home = &stsl->store;
+ set(stslot_loc(stsl), newval);
if (!opt_compat || opt_compat > 151)
inh_stsl = stsl;
} else {