summaryrefslogtreecommitdiff
path: root/rts/StgMiscClosures.cmm
diff options
context:
space:
mode:
authorSergei Trofimovich <siarheit@google.com>2016-03-11 22:31:58 +0000
committerSergei Trofimovich <siarheit@google.com>2016-03-11 23:19:47 +0000
commite46742f5c51938bc7c992ac37fecc6df8cab7647 (patch)
tree2170df7cc8257e8c0d139633c0c25af3c4a4f829 /rts/StgMiscClosures.cmm
parent2f45cf3f48162a5f843005755dafa1c5c1b451a7 (diff)
downloadhaskell-e46742f5c51938bc7c992ac37fecc6df8cab7647.tar.gz
rts: fix threadStackUnderflow type in cmm
stg_stack_underflow_frame had an incorrect call of C function 'threadStackUnderflow': ("ptr" ret_off) = foreign "C" threadStackUnderflow( MyCapability(), CurrentTSO); Which means it's prototype is: void * (*) (W_, void*); While real prototype is: W_ (*) (Capability *cap, StgTSO *tso); The fix is simple. Fix type annotations: (ret_off) = foreign "C" threadStackUnderflow( MyCapability() "ptr", CurrentTSO "ptr"); Noticed when debugged T9045 test failure on m68k target which distincts between pointer and non pointer return types (uses different registers) While at it noticed and fixed return types for 'throwTo' and 'findSpark'. Trac #11395 Signed-off-by: Sergei Trofimovich <siarheit@google.com>
Diffstat (limited to 'rts/StgMiscClosures.cmm')
-rw-r--r--rts/StgMiscClosures.cmm4
1 files changed, 2 insertions, 2 deletions
diff --git a/rts/StgMiscClosures.cmm b/rts/StgMiscClosures.cmm
index 757730e5fa..905f81ec2e 100644
--- a/rts/StgMiscClosures.cmm
+++ b/rts/StgMiscClosures.cmm
@@ -32,8 +32,8 @@ INFO_TABLE_RET (stg_stack_underflow_frame, UNDERFLOW_FRAME,
SAVE_STGREGS
SAVE_THREAD_STATE();
- ("ptr" ret_off) = foreign "C" threadStackUnderflow(MyCapability(),
- CurrentTSO);
+ (ret_off) = foreign "C" threadStackUnderflow(MyCapability() "ptr",
+ CurrentTSO);
LOAD_THREAD_STATE();
RESTORE_STGREGS