From 34e3523354916b0fb8a0dc93041d25812f7e6181 Mon Sep 17 00:00:00 2001 From: Ben Gamari Date: Tue, 7 Feb 2017 23:00:10 -0500 Subject: 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 --- includes/rts/Constants.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'includes') 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 @@ -111,6 +111,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. -- cgit v1.2.1