From owner-freebsd-current Sun Nov 10 19:58: 9 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 855BD37B401 for ; Sun, 10 Nov 2002 19:58:08 -0800 (PST) Received: from harmony.village.org (rover.bsdimp.com [204.144.255.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id DE21E43E4A for ; Sun, 10 Nov 2002 19:58:07 -0800 (PST) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.3/8.12.3) with ESMTP id gAB3w6pk048022; Sun, 10 Nov 2002 20:58:07 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Sun, 10 Nov 2002 20:57:44 -0700 (MST) Message-Id: <20021110.205744.31819780.imp@bsdimp.com> To: aurelien.nephtali@wanadoo.fr Cc: current@FreeBSD.ORG Subject: Re: Value 0xd0d0d0d0 ? From: "M. Warner Losh" In-Reply-To: <20021109124930.GA1429@nebula.wanadoo.fr> References: <20021109124930.GA1429@nebula.wanadoo.fr> X-Mailer: Mew version 2.1 on Emacs 21.2 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message: <20021109124930.GA1429@nebula.wanadoo.fr> Aurelien Nephtali writes: : I would like to know where/when the value 0xd0d0d0d0 is assigned to a pointer ? : Sometimes I have some pointers which have a correct value before and suddenly : they got this odd 0xd0d0d0d0 value :/ That's a feature of FreeBSD's malloc. On free, the old memory is overwritten with 0xd0 to preclude access after free (which is undefined and a source of many bugs). This is a bug in your program almost certainly. man malloc will show you how to turn this off. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message