summaryrefslogtreecommitdiff
path: root/rts/Updates.h
diff options
context:
space:
mode:
authorSimon Marlow <simonmar@microsoft.com>2006-06-27 12:39:51 +0000
committerSimon Marlow <simonmar@microsoft.com>2006-06-27 12:39:51 +0000
commit081e9e53205935280f1800f113760a8a72498a6f (patch)
treeb60fcc6fe8b050494c65b95fdfa3603df8927636 /rts/Updates.h
parent68e468f00761339cb268e3f8e8e3124d1aaccadc (diff)
downloadhaskell-081e9e53205935280f1800f113760a8a72498a6f.tar.gz
fix up slop-overwriting for THUNK_SELECTORS in DEBUG mode
Diffstat (limited to 'rts/Updates.h')
-rw-r--r--rts/Updates.h24
1 files changed, 14 insertions, 10 deletions
diff --git a/rts/Updates.h b/rts/Updates.h
index 5872157c81..f20b088432 100644
--- a/rts/Updates.h
+++ b/rts/Updates.h
@@ -198,17 +198,20 @@ extern void awakenBlockedQueue(StgBlockingQueueElement *q, StgClosure *node);
W_ sz; \
W_ i; \
inf = %GET_STD_INFO(p); \
- if (%INFO_TYPE(inf) != HALF_W_(THUNK_SELECTOR) \
- && %INFO_TYPE(inf) != HALF_W_(BLACKHOLE) \
+ if (%INFO_TYPE(inf) != HALF_W_(BLACKHOLE) \
&& %INFO_TYPE(inf) != HALF_W_(CAF_BLACKHOLE)) { \
- if (%INFO_TYPE(inf) == HALF_W_(AP_STACK)) { \
- sz = StgAP_STACK_size(p) + BYTES_TO_WDS(SIZEOF_StgAP_STACK_NoThunkHdr); \
- } else { \
- if (%INFO_TYPE(inf) == HALF_W_(AP)) { \
- sz = TO_W_(StgAP_n_args(p)) + BYTES_TO_WDS(SIZEOF_StgAP_NoThunkHdr); \
+ if (%INFO_TYPE(inf) == HALF_W_(THUNK_SELECTOR)) { \
+ sz = BYTES_TO_WDS(SIZEOF_StgSelector_NoThunkHdr); \
+ } else { \
+ if (%INFO_TYPE(inf) == HALF_W_(AP_STACK)) { \
+ sz = StgAP_STACK_size(p) + BYTES_TO_WDS(SIZEOF_StgAP_STACK_NoThunkHdr); \
} else { \
- sz = TO_W_(%INFO_PTRS(inf)) + TO_W_(%INFO_NPTRS(inf)); \
- } \
+ if (%INFO_TYPE(inf) == HALF_W_(AP)) { \
+ sz = TO_W_(StgAP_n_args(p)) + BYTES_TO_WDS(SIZEOF_StgAP_NoThunkHdr); \
+ } else { \
+ sz = TO_W_(%INFO_PTRS(inf)) + TO_W_(%INFO_NPTRS(inf)); \
+ } \
+ } \
} \
i = 0; \
for: \
@@ -231,7 +234,8 @@ FILL_SLOP(StgClosure *p)
case BLACKHOLE:
case CAF_BLACKHOLE:
case THUNK_SELECTOR:
- return;
+ sz = sizeofW(StgSelector) - sizeofW(StgThunkHeader);
+ break;
case AP:
sz = ((StgAP *)p)->n_args + sizeofW(StgAP) - sizeofW(StgThunkHeader);
break;