This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
[Uwe Moeller <umr@interlogic.de>] libc/2215: mcheck(): free() reports "invalid pointer" while pointer looks ok
- To: libc-alpha at sources dot redhat dot com
- Subject: [Uwe Moeller <umr@interlogic.de>] libc/2215: mcheck(): free() reports "invalid pointer" while pointer looks ok
- From: Andreas Jaeger <aj at suse dot de>
- Date: 26 Apr 2001 09:16:12 +0200
- Cc: Uwe Moeller <umr at interlogic dot de>
We received the appended bug report. Wolfram, can you take a look, please?
Is mcheck together with MALLOC_CHECK_=1 forbidden? Or where is the
problem?
Andreas
- To: libc-gnats at gnu dot org, gnats-admin at gnu dot org
- Subject: libc/2215: mcheck(): free() reports "invalid pointer" while pointer looks ok
- From: Uwe Moeller <umr at interlogic dot de>
- Date: Wed, 25 Apr 2001 10:15:02 -0400
- Reply-To: Uwe Moeller <umr at interlogic dot de>
- Xref: gee.suse.de mail.gnats-libc-bugs:5939
>Number: 2215
>Category: libc
>Synopsis: when mcheck() is used, free() reports an errornous error
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: libc-gnats
>State: open
>Quarter:
>Keywords:
>Class: sw-bug
>Submitter-Id: unknown
>Arrival-Date: Wed Apr 25 10:15:01 -0400 2001
>Cases:
>Originator: Uwe Moeller
>Release: libc-2.1.3
>Organization:
interlogic GmbH
>Environment:
Linux
Host type: i386-suse-linux-gnu
System: Linux antigone 2.2.16 #1 Sat Jul 29 20:09:52 GMT 2000 i686
unknown
Architecture: i686
Addons: crypt linuxthreads noversion nss-v1
Build CC: gcc
Compiler version: 2.95.2 19991024 (release)
Kernel headers: 2.2.16
Symbol versioning: yes
Build static: yes
Build shared: yes
Build pic-default: no
Build profile: yes
Build omitfp: no
Build bounded: no
Build static-nss: no
Stdio: libio
>Description:
using mcheck() leads to error message
free(): invalid pointer 0x........!
although nothing happens to the pointer between malloc() and free()
>How-To-Repeat:
Here's the C program in question:
#include <mcheck.h>
#include <stdlib.h>
int main(int argc, char * argv[])
{
char * p;
mcheck(0);
p = (char *) malloc (4);
free (p);
return 0;
}
Environment: MALLOC_CHECK_=1
--------------D7C0AB933F0031F223D145B1
Content-Type: text/x-vcard; charset=us-ascii;
name="umr.vcf"
Content-Description: Karte für Uwe Moeller
Content-Disposition: attachment;
filename="umr.vcf"
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by smtp01ffm.de.uu.net id QAA19352
begin:vcard=20
n:M=F6ller;Uwe
tel;fax:+49 5205 9117-19
tel;work:+49 5205 9117-15
x-mozilla-html:TRUE
version:2.1
email;internet:Uwe.Moeller@interlogic.de
adr;quoted-printable:;;Paderborner Str. 189=3D0D=3D0A ;33739 Bielefeld;De=
utschland;;Nordrhein-Westfalen
x-mozilla-cpt:;29216
fn:Uwe M=F6ller
end:vcard
--------------D7C0AB933F0031F223D145B1--
>Fix:
Unknown
>Unformatted:
Dies ist eine mehrteilige Nachricht im MIME-Format.
--------------D7C0AB933F0031F223D145B1
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.inka.de
http://www.suse.de/~aj