From: simonmar Date: Wed, 4 Aug 1999 15:25:33 +0000 (+0000) Subject: [project @ 1999-08-04 15:25:33 by simonmar] X-Git-Tag: Approximately_9120_patches~5910 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=0963fd2d6911dc358f677dc2dc777e028c8128a2;p=ghc-hetmet.git [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. --- 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 {