diff options
author | GHC GitLab CI <ghc-ci@gitlab-haskell.org> | 2020-11-25 23:03:58 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-11-29 15:33:54 -0500 |
commit | e992ea84248e2ac9f9d439cd9b25745e8c41e32d (patch) | |
tree | 478d276ef3f3f3e3bbcd3d03c971dc02f171d527 /includes | |
parent | 1bc104b029b4f043cac42253ee2387f4d574abca (diff) | |
download | haskell-e992ea84248e2ac9f9d439cd9b25745e8c41e32d.tar.gz |
ThreadPaused: Don't zero slop until free vars are pushed
When threadPaused blackholes a thunk it calls `OVERWRITING_CLOSURE` to
zero the slop for the benefit of the sanity checker. Previously this was
done *before* pushing the thunk's free variables to the update
remembered set. Consequently we would pull zero'd pointers to the update
remembered set.
Diffstat (limited to 'includes')
-rw-r--r-- | includes/rts/storage/ClosureMacros.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/includes/rts/storage/ClosureMacros.h b/includes/rts/storage/ClosureMacros.h index 5674322bd2..b841ef8be0 100644 --- a/includes/rts/storage/ClosureMacros.h +++ b/includes/rts/storage/ClosureMacros.h @@ -520,11 +520,15 @@ INLINE_HEADER StgWord8 *mutArrPtrsCard (StgMutArrPtrs *a, W_ n) #if defined(PROFILING) || defined(DEBUG) #define OVERWRITING_CLOSURE(c) \ overwritingClosure(c) +#define OVERWRITING_CLOSURE_SIZE(c, size) \ + overwritingClosureSize(c, size) #define OVERWRITING_CLOSURE_MUTABLE(c, off) \ overwritingMutableClosureOfs(c, off) #else #define OVERWRITING_CLOSURE(c) \ do { (void) sizeof(c); } while(0) +#define OVERWRITING_CLOSURE_SIZE(c, size) \ + do { (void) sizeof(c); (void) sizeof(size); } while(0) #define OVERWRITING_CLOSURE_MUTABLE(c, off) \ do { (void) sizeof(c); (void) sizeof(off); } while(0) #endif |