Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 May 1999 15:50:12 +0930
From:      Greg Lehey <grog@lemis.com>
To:        Warner Losh <imp@harmony.village.org>
Cc:        hackers@FreeBSD.ORG
Subject:   No deadc0de (was: What does this error message mean?)
Message-ID:  <19990504155011.T10134@freebie.lemis.com>
In-Reply-To: <199905040455.WAA54862@harmony.village.org>; from Warner Losh on Mon, May 03, 1999 at 10:55:33PM -0600
References:  <199905040455.WAA54862@harmony.village.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Monday,  3 May 1999 at 22:55:33 -0600, Warner Losh wrote:
>
> In debugging some experimental code in the kernel, I started seeing
> the following message, followed a little while later by a panic.
>
> Data modified on freelist: word 2 of object 0xc059e260 size 20 previous type devbuf (0x80 != 0xdeadc0de)

This suggests you're using INVARIANTS, right?

> 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.

Greg
--
See complete headers for address, home page and phone numbers
finger grog@lemis.com for PGP public key


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




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