Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Dec 1997 16:58:40 +1100
From:      Bruce Evans <bde@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
Message-ID:  <199712050558.QAA19906@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>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
  



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199712050558.QAA19906>