Commit ade3fa14 authored by Simon Marlow's avatar Simon Marlow

Fix #3320: we forgot to save/restore the GC register variable

parent 0a30f73f
......@@ -1066,6 +1066,11 @@ loop:
void
gcWorkerThread (Capability *cap)
{
gc_thread *saved_gct;
// necessary if we stole a callee-saves register for gct:
saved_gct = gct;
cap->in_gc = rtsTrue;
gct = gc_threads[cap->no];
......@@ -1105,6 +1110,8 @@ gcWorkerThread (Capability *cap)
gct->thread_index);
ACQUIRE_SPIN_LOCK(&gct->mut_spin);
debugTrace(DEBUG_gc, "GC thread %d on my way...", gct->thread_index);
SET_GCT(saved_gct);
}
#endif
......
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