From owner-freebsd-hackers Thu Feb 22 5:19:58 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from cyclone.eis.ru (www.for.spb.ru [195.201.69.16]) by hub.freebsd.org (Postfix) with SMTP id CF10237B401 for ; Thu, 22 Feb 2001 05:19:51 -0800 (PST) (envelope-from diwil@eis.ru) Received: (qmail 53266 invoked from network); 22 Feb 2001 13:25:57 -0000 Received: from unknown (HELO runnet-gw.marketsite.ru) (195.201.69.80) by for.spb.ru with SMTP; 22 Feb 2001 13:25:57 -0000 Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20010222051302.E29126@fw.wintelcom.net> Date: Thu, 22 Feb 2001 16:16:54 +0300 (MSK) Reply-To: diwil@eis.ru From: Dmitry Dicky To: freebsd-hackers@FreeBSD.ORG Subject: Re: warning in free(): Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Also, if you do something like: void *ptr = malloc(size); ... ptr++; free() will complain about it. Make sure you are not modifying ptr after it has been malloc()ed. On 22-Feb-01 Alfred Perlstein wrote: > * Madhavi Suram [010222 05:09] wrote: >> >> Hi >> >> I am running a C program in user space on FreeBSD 3.3 release. I got a >> warning like this: >> >> testing in free(): warning: modified (chunk-) pointer. >> >> testing is the name of the executable I am running. >> >> Could anyone tell me what this warning means? What may be the effect >> of >> this code when I shift it to kernel with due modifications? > > It means you've most likely corrupted your malloc pool, meaning you've > written past/before the edge of an allocation you've done. > > To fix it start being mor careful with pointers and checking array > bounds. > > > -- > -Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org] > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message -- ********************************************************************* ("`-''-/").___..--''"`-._ (\ Dimmy the Wild UA1ACZ `6_ 6 ) `-. ( ).`-.__.`) Enterprise Information Sys (_Y_.)' ._ ) `._ `. ``-..-' Nevsky prospekt, 20 / 44 _..`--'_..-_/ /--'_.' ,' Saint Petersburg, Russia (il),-'' (li),' ((!.-' +7 (812) 3148860, 5585314 ********************************************************************* To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message