From 0963fd2d6911dc358f677dc2dc777e028c8128a2 Mon Sep 17 00:00:00 2001 From: simonmar Date: Wed, 4 Aug 1999 15:25:33 +0000 Subject: [PATCH] [project @ 1999-08-04 15:25:33 by simonmar] revert part of rev. 1.4 - don't use index 0 in the stable name table due to conflict with the hash-table lookup function. --- ghc/rts/Stable.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ghc/rts/Stable.c b/ghc/rts/Stable.c index a429920..e640b27 100644 --- a/ghc/rts/Stable.c +++ b/ghc/rts/Stable.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Stable.c,v 1.6 1999/08/04 10:04:31 simonmar Exp $ + * $Id: Stable.c,v 1.7 1999/08/04 15:25:33 simonmar Exp $ * * (c) The GHC Team, 1998-1999 * @@ -231,7 +231,11 @@ enlargeStablePtrTable(void) stable_ptr_table = stgMallocWords(SPT_size * sizeof(snEntry), "initStablePtrTable"); - initFreeList(stable_ptr_table,INIT_SPT_SIZE,NULL); + /* we don't use index 0 in the stable name table, because that + * would conflict with the hash table lookup operations which + * return NULL if an entry isn't found in the hash table. + */ + initFreeList(stable_ptr_table+1,INIT_SPT_SIZE-1,NULL); addrToStableHash = allocHashTable(); } else { -- 1.7.10.4