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

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
......@@ -573,7 +573,11 @@
#define recordMutable(p, regs) \
W_ __p; \
W_ __bd; \
W_ __gen; \
__p = p; \
recordMutableCap(__p, TO_W_(bdescr_gen_no(Bdescr(__p))), regs)
__bd = Bdescr(__p); \
__gen = TO_W_(bdescr_gen_no(__bd)); \
if (__gen > 0) { recordMutableCap(__p, __gen, regs); }
#endif /* CMM_H */
Supports Markdown
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