From 1fd3ead73cf4b5bf6afc2c94b1434846ada6177f Mon Sep 17 00:00:00 2001 From: simonmar Date: Mon, 28 Apr 2003 09:55:20 +0000 Subject: [PATCH] [project @ 2003-04-28 09:55:20 by simonmar] Following the recent change to the layout of the StgRetDyn frame, we now need to bump RESERVED_STACK_WORDS because this governs the amount of room which is guaranteed to be available on the stack in the event of a stack check failure. This accounts for at least one cause of recent crashes in the HEAD. --- ghc/includes/Constants.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/ghc/includes/Constants.h b/ghc/includes/Constants.h index a47800a..8974052 100644 --- a/ghc/includes/Constants.h +++ b/ghc/includes/Constants.h @@ -1,5 +1,5 @@ /* ---------------------------------------------------------------------------- - * $Id: Constants.h,v 1.24 2003/03/25 16:19:55 sof Exp $ + * $Id: Constants.h,v 1.25 2003/04/28 09:55:20 simonmar Exp $ * * (c) The GHC Team, 1998-2002 * @@ -130,10 +130,16 @@ This must be large enough to accomodate the largest stack frame pushed in one of the heap check fragments in HeapStackCheck.hc - (ie. currently the generic heap checks - 19 words). + (ie. currently the generic heap checks - 3 words for StgRetDyn, + 18 words for the saved registers, see StgMacros.h). + + In the event of an unboxed tuple or let-no-escape stack/heap check + failure, there will be other words on the stack which are covered + by the RET_DYN frame. These will have been accounted for by stack + checks however, so we don't need to allow for them here. -------------------------------------------------------------------------- */ -#define RESERVED_STACK_WORDS 19 +#define RESERVED_STACK_WORDS 21 /* ----------------------------------------------------------------------------- Storage manager constants -- 1.7.10.4