From 958e98fa07d9c18e099985988bd6ac9bf7cb8c70 Mon Sep 17 00:00:00 2001 From: simonmar <unknown> Date: Thu, 30 Mar 2000 15:35:13 +0000 Subject: [PATCH] [project @ 2000-03-30 15:35:13 by simonmar] Add an ASSERT to catch a known bug: when allocating an AP_UPD in raiseAsync, if the object is larger than a block in size then all sorts of things can go wrong. --- ghc/rts/Schedule.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ghc/rts/Schedule.c b/ghc/rts/Schedule.c index 869b2ab08a21..4ff4ef3550d8 100644 --- a/ghc/rts/Schedule.c +++ b/ghc/rts/Schedule.c @@ -1,5 +1,5 @@ /* --------------------------------------------------------------------------- - * $Id: Schedule.c,v 1.57 2000/03/20 09:42:50 andy Exp $ + * $Id: Schedule.c,v 1.58 2000/03/30 15:35:13 simonmar Exp $ * * (c) The GHC Team, 1998-2000 * @@ -2229,6 +2229,11 @@ raiseAsync(StgTSO *tso, StgClosure *exception) */ ap = (StgAP_UPD *)allocate(AP_sizeW(words)); + /* ToDo: allocating an AP_UPD more than a block in size doesn't + * work, and will cause the GC to break later on. + */ + ASSERT(AP_sizeW(words) <= BLOCK_SIZE_W); + ASSERT(words >= 0); ap->n_args = words; -- GitLab