summaryrefslogtreecommitdiff
path: root/includes/Cmm.h
diff options
context:
space:
mode:
authorSimon Marlow <simonmar@microsoft.com>2006-08-30 09:15:29 +0000
committerSimon Marlow <simonmar@microsoft.com>2006-08-30 09:15:29 +0000
commited92004880e4a79457338edfe993f968360fbbfd (patch)
tree6a89db65436f9c81ebb54d48de9eb435c14bfdf9 /includes/Cmm.h
parent6f4b74278025a9b8061df721ab4769ae2ea8f2ff (diff)
downloadhaskell-ed92004880e4a79457338edfe993f968360fbbfd.tar.gz
MAYBE_GC: initialise HpAlloc
HpAlloc was not being set when returning to the scheduler via MAYBE_GC(), which at the least was just wrong (the scheduler might allocate a large block more than once), and at worst could lead to crashes if HpAlloc contains garbage. Fixes at least one threaded2 test on Windows.
Diffstat (limited to 'includes/Cmm.h')
-rw-r--r--includes/Cmm.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/includes/Cmm.h b/includes/Cmm.h
index e494b60102..3d3283e811 100644
--- a/includes/Cmm.h
+++ b/includes/Cmm.h
@@ -328,6 +328,7 @@
if (bdescr_link(CurrentNursery) == NULL || CInt[alloc_blocks] >= CInt[alloc_blocks_lim]) { \
R9 = liveness; \
R10 = reentry; \
+ HpAlloc = 0; \
jump stg_gc_gen_hp; \
}