* to point to itself, and the closure being updated should not
* already have been updated (the mutable list will get messed up
* otherwise).
+ *
+ * NB. We do *not* do this in SMP mode, because when we have the
+ * possibility of multiple threads entering the same closure, zeroing
+ * the slop in one of the threads would have a disastrous effect on
+ * the other (seen in the wild!).
*/
-#if !defined(DEBUG)
+#if !defined(DEBUG) || defined(SMP)
#define DEBUG_FILL_SLOP(p) /* nothing */
\
/* ASSERT( p1 != p2 && !closure_IND(p1) ); \
*/ LDV_RECORD_DEAD_FILL_SLOP_DYNAMIC(p1); \
- bd = Bdescr(p1); \
+/* foreign "C" cas(p1 "ptr", 0, stg_WHITEHOLE_info); \
+ */ bd = Bdescr(p1); \
if (bdescr_gen_no(bd) == 0 :: CInt) { \
StgInd_indirectee(p1) = p2; \
SET_INFO(p1, ind_info); \
{ \
bdescr *bd; \
\
+ /* cas(p1, 0, &stg_WHITEHOLE_info); */ \
ASSERT( (P_)p1 != (P_)p2 && !closure_IND(p1) ); \
LDV_RECORD_DEAD_FILL_SLOP_DYNAMIC(p1); \
bd = Bdescr((P_)p1); \