From owner-freebsd-smp Thu Dec 4 22:03:25 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id WAA18793 for smp-outgoing; Thu, 4 Dec 1997 22:03:25 -0800 (PST) (envelope-from owner-freebsd-smp) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id WAA18788 for ; Thu, 4 Dec 1997 22:03:15 -0800 (PST) (envelope-from bde@zeta.org.au) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.7/8.6.9) id QAA19906; Fri, 5 Dec 1997 16:58:40 +1100 Date: Fri, 5 Dec 1997 16:58:40 +1100 From: Bruce Evans Message-Id: <199712050558.QAA19906@godzilla.zeta.org.au> To: ivar@romulus.hosteng.org, smp@freebsd.org Subject: Re: FreeBSD 3.0-current SMP kernel gives a pagefault in kernel mode Sender: owner-freebsd-smp@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >After cvsup'ing FreeBSD 3.0-current and doing a make world followed by a >kernel remake the new kernel refuses to boot. Malloc initialization was broken yesterday. This causes a measly 64 compiler wanings for GENERIC and an early panic. (The malloc cookie is too corrupt for the magic number check to be reached (ks_next initially points to a string so it is non-NULL. malloc() somehow avoids crashing an returns NULL. Some early callers actually check for the NULL return, but are remarkably silent about the error. Here, the first caller that doesn't check is in cpu_startup(), and a panic occurs when the NULL pointer is bzeroed.) Bruce diff -c2 malloc.h~ malloc.h *** malloc.h~ Fri Dec 5 03:56:37 1997 --- malloc.h Fri Dec 5 04:37:05 1997 *************** *** 64,68 **** #define MALLOC_DEFINE(type, shortdesc, longdesc) \ ! struct malloc_type type[1] = { { shortdesc, M_MAGIC } }; \ struct __hack --- 64,70 ---- #define MALLOC_DEFINE(type, shortdesc, longdesc) \ ! struct malloc_type type[1] = { \ ! { NULL, 0, 0, 0, 0, 0, 0, M_MAGIC, shortdesc, 0, 0 } \ ! }; \ struct __hack