From owner-freebsd-hackers Thu Mar 20 07:27:13 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id HAA18845 for hackers-outgoing; Thu, 20 Mar 1997 07:27:13 -0800 (PST) Received: from etinc.com (et-gw-fr1.etinc.com [204.141.244.98]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id HAA18840 for ; Thu, 20 Mar 1997 07:27:10 -0800 (PST) Received: from ntws (ntws.etinc.com [204.141.95.142]) by etinc.com (8.8.3/8.6.9) with SMTP id KAA16805; Thu, 20 Mar 1997 10:31:05 -0500 (EST) Message-Id: <3.0.32.19970320102606.00b2adb0@etinc.com> X-Sender: dennis@etinc.com X-Mailer: Windows Eudora Pro Version 3.0 (32) Date: Thu, 20 Mar 1997 10:26:09 -0500 To: dg@root.com From: dennis Subject: Re: insight on malloc crash... Cc: hackers@FreeBSD.ORG Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk At 05:52 PM 3/19/97 -0800, David Greenman wrote: >>Can anyone give some insight on why the following code might >>panic v2.2 (while it has been working happily since 1.x) >> >>p=malloc(size,M_DEVBUF,M_WAITOK); >>if (p) >> bzero(p,size) >> >> >>bzero is panicing....did something change? this stuff isnt very >>well document :/ > > The only thing that comes to mind off-hand is that "size" might be >bogus (either 0 or way too large). Is the panic on the first byte zeroed, >or is it some amount into the malloced area? FYI: The answer, if anyone is interested, is that in 2.2 the userland prototype (in string.h) is not compatible with the kernel version in sys/systm.h, even though the 'c' call is the same. Dennis