Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/17/84; site opus.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!bellcore!decvax!genrad!panda!talcott!harvard!seismo!hao!nbires!opus!mccallum From: mccallum@opus.UUCP (Doug McCallum) Newsgroups: net.unix-wizards Subject: Re: 'munhash' panic Message-ID: <1219@opus.UUCP> Date: Tue, 28-May-85 09:56:04 EDT Article-I.D.: opus.1219 Posted: Tue May 28 09:56:04 1985 Date-Received: Fri, 31-May-85 03:13:17 EDT References: <697@udenva.UUCP> Organization: NBI,Inc, Boulder CO Lines: 30 This bug and fix have been reported several times before. Here is the fix: > From: RWS%mit-xx@sri-unix.UUCP > Newsgroups: net.unix-wizards > Subject: sundry 4.2 bugs > Message-ID: <13280@sri-arpa.UUCP> > Date: Wed, 2-Nov-83 17:15:00 EST > Article-I.D.: sri-arpa.13280 > Posted: Wed Nov 2 17:15:00 1983 > Date-Received: Fri, 4-Nov-83 09:05:00 EST > Lines: 64 > Status: RO > > Despite claims to the contrary, the block number sign extension problem still > exists. Berkeley put in a fix that should have worked, but a C compiler bug > apparently keeps it from working. In /sys/sys/vm_mem.c in memall() the code > swapdev : mount[c->c_mdev].m_dev, (daddr_t)(u_long)c->c_blkno > should be changed to > swapdev : mount[c->c_mdev].m_dev, c->c_blkno > and in /sys/vax/vm_machdep.c in chgprot() the code > munhash(mount[c->c_mdev].m_dev, (daddr_t)(u_long)c->c_blkno); > should be changed to > munhash(mount[c->c_mdev].m_dev, c->c_blkno); > because the C compiler apparently incorrectly folds the (daddr_t) and (u_long) > together and sign extends anyway. Simply taking out the (daddr_t)(u_long) > works, although lint will probably complain about it. > > ---