Commit 958e98fa authored by simonmar's avatar simonmar
Browse files

[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.
parent f101ebc1
/* ---------------------------------------------------------------------------
* $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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment