From: Simon Marlow Date: Wed, 30 Aug 2006 09:15:29 +0000 (+0000) Subject: MAYBE_GC: initialise HpAlloc X-Git-Tag: Before_FC_branch_merge~104 X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=ed92004880e4a79457338edfe993f968360fbbfd 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. --- diff --git a/includes/Cmm.h b/includes/Cmm.h index e494b60..3d3283e 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; \ }