Commit 3c58884e authored by Simon Marlow's avatar Simon Marlow

recordMutable: test for gen>0 before calling recordMutableCap

For some reason the C-- version of recordMutable wasn't verifying that
the object was in an old generation before attempting to add it to the
mutable list, and this broke maessen_hashtab.  This version of
recordMutable is only used in unsafeThaw#.
parent c9aa9bb5
......@@ -571,9 +571,13 @@
W_[free] = p; \
bdescr_free(__bd) = free + WDS(1);
#define recordMutable(p, regs) \
W_ __p; \
__p = p; \
recordMutableCap(__p, TO_W_(bdescr_gen_no(Bdescr(__p))), regs)
#define recordMutable(p, regs) \
W_ __p; \
W_ __bd; \
W_ __gen; \
__p = p; \
__bd = Bdescr(__p); \
__gen = TO_W_(bdescr_gen_no(__bd)); \
if (__gen > 0) { recordMutableCap(__p, __gen, regs); }
#endif /* CMM_H */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment