From owner-freebsd-hackers Mon May 3 23:46:33 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from rover.village.org (rover.village.org [204.144.255.49]) by hub.freebsd.org (Postfix) with ESMTP id 6EC0314D8E for ; Mon, 3 May 1999 23:46:29 -0700 (PDT) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.9.3/8.9.3) with ESMTP id AAA08567; Tue, 4 May 1999 00:45:47 -0600 (MDT) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.9.3/8.8.3) with ESMTP id AAA55414; Tue, 4 May 1999 00:47:05 -0600 (MDT) Message-Id: <199905040647.AAA55414@harmony.village.org> To: Greg Lehey Subject: Re: No deadc0de (was: What does this error message mean?) Cc: hackers@FreeBSD.ORG In-reply-to: Your message of "Tue, 04 May 1999 15:50:12 +0930." <19990504155011.T10134@freebie.lemis.com> References: <19990504155011.T10134@freebie.lemis.com> <199905040455.WAA54862@harmony.village.org> Date: Tue, 04 May 1999 00:47:05 -0600 From: Warner Losh Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <19990504155011.T10134@freebie.lemis.com> Greg Lehey writes: : This suggests you're using INVARIANTS, right? Yes. Otherwise I might have tried to commit this code by now :-) The INVARIANTS stuff has found a few other errors in my new code, so I'm very happy about them. : > My guess is that one of two things is happening. Either I'm writing : > to memory after I've free'd it, or I'm freeing something twice. Is : > it possible to tell from this message which one I'm doing? : : It suggests to me that it's at least the first. The message comes : from malloc() in kern/kern_malloc.c, and it's expecting to find what : it put in there in free() (0xdeadc0de). Of course, that doesn't mean : you're not free()ing twice, but free() checks for that with : INVARIANTS, so I'd guess you're not doing that. OK. That is a good hint. I think I'll look more closely at what I'm doing... Too bad I it would be so "hard" to implement purify like functionality in the kernel. Hmmm, on second thought how hard is it to unmap pages from the kernel. I'm not worried about the performance hit, I just want to get the panic where I touch the free'd memory rather than later when I reboot. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message