diff options
author | Sergei Trofimovich <siarheit@google.com> | 2016-03-11 22:31:58 +0000 |
---|---|---|
committer | Sergei Trofimovich <siarheit@google.com> | 2016-03-11 23:19:47 +0000 |
commit | e46742f5c51938bc7c992ac37fecc6df8cab7647 (patch) | |
tree | 2170df7cc8257e8c0d139633c0c25af3c4a4f829 /rts/Exception.cmm | |
parent | 2f45cf3f48162a5f843005755dafa1c5c1b451a7 (diff) | |
download | haskell-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/Exception.cmm')
-rw-r--r-- | rts/Exception.cmm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rts/Exception.cmm b/rts/Exception.cmm index a89bd19eb3..2a07eaa6f3 100644 --- a/rts/Exception.cmm +++ b/rts/Exception.cmm @@ -307,7 +307,7 @@ stg_killThreadzh (P_ target, P_ exception) } else { W_ msg; - (msg) = ccall throwTo(MyCapability() "ptr", + ("ptr" msg) = ccall throwTo(MyCapability() "ptr", CurrentTSO "ptr", target "ptr", exception "ptr"); |