Commit ed920048 authored by Simon Marlow's avatar Simon Marlow

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.
parent 6f4b7427
......@@ -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; \
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment