From owner-freebsd-hackers Thu Feb 22 5:15:52 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from critter.freebsd.dk (fxp0.halvsten.ip.cybercity.dk [212.242.40.114]) by hub.freebsd.org (Postfix) with ESMTP id C91E137B491 for ; Thu, 22 Feb 2001 05:15:49 -0800 (PST) (envelope-from phk@critter.freebsd.dk) Received: from critter (localhost [127.0.0.1]) by critter.freebsd.dk (8.11.1/8.11.1) with ESMTP id f1MDFj502868; Thu, 22 Feb 2001 14:15:45 +0100 (CET) (envelope-from phk@critter.freebsd.dk) To: Madhavi Suram Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: warning in free(): In-Reply-To: Your message of "Thu, 22 Feb 2001 18:38:32 +0530." Date: Thu, 22 Feb 2001 14:15:45 +0100 Message-ID: <2866.982847745@critter> From: Poul-Henning Kamp Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message , Madhavi S uram writes: > >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 that you do something like this: ... p = malloc(n); /* N <=2048 */ p += m; free(p); -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message