summaryrefslogtreecommitdiff
path: root/rts/Interpreter.c
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2008-12-02 12:07:35 +0000
committerSimon Marlow <marlowsd@gmail.com>2008-12-02 12:07:35 +0000
commit164be7854f6de07bb4bc15f60af727ddb562cde7 (patch)
tree1a731627a6d78e425098f27082aa428fead2cd25 /rts/Interpreter.c
parentc0378a2774a400e2992bc57a7ec580df3f142b29 (diff)
downloadhaskell-164be7854f6de07bb4bc15f60af727ddb562cde7.tar.gz
Fix more problems caused by padding in the Capability structure
Fixes crashes on Windows and Sparc
Diffstat (limited to 'rts/Interpreter.c')
-rw-r--r--rts/Interpreter.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/rts/Interpreter.c b/rts/Interpreter.c
index 4324f7f44a..1b2d7303ed 100644
--- a/rts/Interpreter.c
+++ b/rts/Interpreter.c
@@ -1422,7 +1422,7 @@ run_BCO:
ffi_call(cif, fn, ret, argptrs);
// And restart the thread again, popping the RET_DYN frame.
- cap = (Capability *)((void *)((unsigned char*)resumeThread(tok) - sizeof(StgFunTable)));
+ cap = (Capability *)((void *)((unsigned char*)resumeThread(tok) - FIELD_OFFSET(Capability,r)));
LOAD_STACK_POINTERS;
// Re-load the pointer to the BCO from the RET_DYN frame,