From 6d6424aee6a4296de9551d2d2a517564754e51d8 Mon Sep 17 00:00:00 2001 From: panne Date: Mon, 24 Apr 2000 22:05:08 +0000 Subject: [PATCH] [project @ 2000-04-24 22:05:08 by panne] Use get_itbl instead of direct access to info field in removeIndirections. This "worked" only because the probability of hitting an indirection-like closure by chance is 5:65531 on 32bit platforms. :-) But HOpenGL once again managed to expose this bug... --- ghc/rts/Stable.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ghc/rts/Stable.c b/ghc/rts/Stable.c index d0d64dd..bf5e6aa 100644 --- a/ghc/rts/Stable.c +++ b/ghc/rts/Stable.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Stable.c,v 1.10 2000/02/29 19:59:38 sof Exp $ + * $Id: Stable.c,v 1.11 2000/04/24 22:05:08 panne Exp $ * * (c) The GHC Team, 1998-1999 * @@ -163,11 +163,11 @@ removeIndirections(StgClosure* p) { StgClosure* q = p; - while (q->header.info->type == IND || - q->header.info->type == IND_STATIC || - q->header.info->type == IND_OLDGEN || - q->header.info->type == IND_PERM || - q->header.info->type == IND_OLDGEN_PERM ) { + while (get_itbl(q)->type == IND || + get_itbl(q)->type == IND_STATIC || + get_itbl(q)->type == IND_OLDGEN || + get_itbl(q)->type == IND_PERM || + get_itbl(q)->type == IND_OLDGEN_PERM ) { q = ((StgInd *)q)->indirectee; } return q; -- 1.7.10.4