From ed92004880e4a79457338edfe993f968360fbbfd Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Wed, 30 Aug 2006 09:15:29 +0000 Subject: [PATCH] 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. --- includes/Cmm.h | 1 + 1 file changed, 1 insertion(+) 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; \ } -- 1.7.10.4