From owner-freebsd-alpha Mon May 28 18:58:17 2001 Delivered-To: freebsd-alpha@freebsd.org Received: from relay.nuxi.com (nuxi.cs.ucdavis.edu [169.237.7.38]) by hub.freebsd.org (Postfix) with ESMTP id E1B5637B424 for ; Mon, 28 May 2001 18:58:14 -0700 (PDT) (envelope-from obrien@nuxi.ucdavis.edu) Received: from dragon.nuxi.com (root@[206.40.252.115]) by relay.nuxi.com (8.11.2/8.11.2) with ESMTP id f4T1wEl49016 for ; Mon, 28 May 2001 18:58:14 -0700 (PDT) (envelope-from obrien@NUXI.com) Received: (from obrien@localhost) by dragon.nuxi.com (8.11.3/8.11.1) id f4T1wES22340 for freebsd-alpha@freebsd.org; Mon, 28 May 2001 18:58:14 -0700 (PDT) (envelope-from obrien) Date: Mon, 28 May 2001 18:58:14 -0700 From: "David O'Brien" To: freebsd-alpha@freebsd.org Subject: Re: Latest on ' HEADS UP: loader broken' Message-ID: <20010528185813.B22192@dragon.nuxi.com> Reply-To: freebsd-alpha@freebsd.org References: <3B12F29B.A172B51F@newsguy.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3B12F29B.A172B51F@newsguy.com>; from dcs@newsguy.com on Mon, May 28, 2001 at 09:51:39PM -0300 X-Operating-System: FreeBSD 5.0-CURRENT Organization: The NUXI BSD group X-Pgp-Rsa-Fingerprint: B7 4D 3E E9 11 39 5F A3 90 76 5D 69 58 D9 98 7A X-Pgp-Rsa-Keyid: 1024/34F9F9D5 Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Mon, May 28, 2001 at 09:51:39PM -0300, Daniel C. Sobral wrote: > Nope. David just tested 0/0 for me. These are the default values, and it > disables the feature. It crashed. So nothing gets allocated at all, > because the thing crashes when _assigning_ these values. Here is the patch that DCS made that allowed me to boot with rev 1.20 of loader.4th. If you get a chance to test it before he commits it, report back here. The problem was an alignment issue. Index: dict.c =================================================================== RCS file: /home/ncvs/src/sys/boot/ficl/dict.c,v retrieving revision 1.11 diff -u -p -r1.11 dict.c --- dict.c 2001/04/29 02:36:33 1.11 +++ dict.c 2001/05/29 01:04:15 @@ -66,8 +66,8 @@ #include "ficl.h" /* Dictionary on-demand resizing control variables */ -unsigned int dictThreshold; -unsigned int dictIncrease; +CELL dictThreshold; +CELL dictIncrease; static char *dictCopyName(FICL_DICT *pDict, STRINGINFO si); @@ -774,11 +774,12 @@ void hashReset(FICL_HASH *pHash) void dictCheckThreshold(FICL_DICT* dp) { - if( dictCellsAvail(dp) < dictThreshold ) { - dp->dict = ficlMalloc( dictIncrease * sizeof (CELL) ); + if( dictCellsAvail(dp) < dictThreshold.u ) { + dp->dict = ficlMalloc( dictIncrease.u * sizeof (CELL) ); assert(dp->dict); dp->here = dp->dict; - dp->size = dictIncrease; + dp->size = dictIncrease.u; + dictAlign(dp); } } Index: ficl.h =================================================================== RCS file: /home/ncvs/src/sys/boot/ficl/ficl.h,v retrieving revision 1.18 diff -u -p -r1.18 ficl.h --- ficl.h 2001/04/29 02:36:33 1.18 +++ ficl.h 2001/05/29 01:04:17 @@ -1011,8 +1011,8 @@ WORDKIND ficlWordClassify(FICL_WORD *p /* ** Dictionary on-demand resizing */ -extern unsigned int dictThreshold; -extern unsigned int dictIncrease; +extern CELL dictThreshold; +extern CELL dictIncrease; /* ** Various FreeBSD goodies To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message