threadPaused: fix pointer arithmetic
authorSimon Marlow <marlowsd@gmail.com>
Thu, 1 Jul 2010 08:50:46 +0000 (08:50 +0000)
committerSimon Marlow <marlowsd@gmail.com>
Thu, 1 Jul 2010 08:50:46 +0000 (08:50 +0000)
Noticed by Henrique Ferreiro <hferreiro@udc.es>, thanks!

rts/ThreadPaused.c

index 7aee59d..94a5a15 100644 (file)
@@ -252,7 +252,7 @@ threadPaused(Capability *cap, StgTSO *tso)
 
                // And continue with threadPaused; there might be
                // yet more computation to suspend.
 
                // And continue with threadPaused; there might be
                // yet more computation to suspend.
-                frame = (StgClosure *)tso->sp + 2;
+                frame = (StgClosure *)(tso->sp + 2);
                 prev_was_update_frame = rtsFalse;
                 continue;
            }
                 prev_was_update_frame = rtsFalse;
                 continue;
            }