From 1be10360a614b6134ae5c609a148ea20a6e586e1 Mon Sep 17 00:00:00 2001 From: simonmar Date: Wed, 12 Oct 2005 12:58:38 +0000 Subject: [PATCH 1/1] [project @ 2005-10-12 12:58:38 by simonmar] DEBUG_FILL_SLOP: don't do anything on SMP, zeroing slop words isn't safe --- ghc/includes/Updates.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ghc/includes/Updates.h b/ghc/includes/Updates.h index 0d0bf2f..2685850 100644 --- a/ghc/includes/Updates.h +++ b/ghc/includes/Updates.h @@ -185,8 +185,13 @@ extern void awakenBlockedQueue(StgBlockingQueueElement *q, StgClosure *node); * 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 */ -- 1.7.10.4