diff options
author | Simon Marlow <marlowsd@gmail.com> | 2008-12-02 12:07:35 +0000 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2008-12-02 12:07:35 +0000 |
commit | 164be7854f6de07bb4bc15f60af727ddb562cde7 (patch) | |
tree | 1a731627a6d78e425098f27082aa428fead2cd25 /rts/Interpreter.c | |
parent | c0378a2774a400e2992bc57a7ec580df3f142b29 (diff) | |
download | haskell-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.c | 2 |
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, |