diff options
author | Ben Gamari <bgamari.foss@gmail.com> | 2017-02-07 23:00:10 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-02-08 10:26:00 -0500 |
commit | 34e3523354916b0fb8a0dc93041d25812f7e6181 (patch) | |
tree | 5a33a3183828a23b130e889eff23b90eae30ba5e /includes/rts/Constants.h | |
parent | 5279b08ba3f01e4b7e28d12b2751413d789d9fbe (diff) | |
download | haskell-34e3523354916b0fb8a0dc93041d25812f7e6181.tar.gz |
Fix stop_thread unwinding information
This corrects the unwind information for `stg_stop_thread`, which
allows us to unwind back to the C stack after reaching the end of the
STG stack.
Test Plan: Validate
Reviewers: simonmar, austin, erikd
Reviewed By: simonmar
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2746
Diffstat (limited to 'includes/rts/Constants.h')
-rw-r--r-- | includes/rts/Constants.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/includes/rts/Constants.h b/includes/rts/Constants.h index bd602e77a1..62fa833173 100644 --- a/includes/rts/Constants.h +++ b/includes/rts/Constants.h @@ -112,6 +112,20 @@ #define RESERVED_C_STACK_BYTES (2048 * SIZEOF_LONG) /* ----------------------------------------------------------------------------- + How large is the stack frame saved by StgRun? + world. Used in StgCRun.c. + -------------------------------------------------------------------------- */ +#if defined(x86_64_HOST_ARCH) +# if defined(mingw32_HOST_OS) +/* 8 larger than necessary to make the alignment right*/ +# define STG_RUN_STACK_FRAME_SIZE 80 +# else +# define STG_RUN_STACK_FRAME_SIZE 48 +# endif +#endif + + +/* ----------------------------------------------------------------------------- How much Haskell stack space to reserve for the saving of registers etc. in the case of a stack/heap overflow. |