This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[Uwe Moeller <umr@interlogic.de>] libc/2215: mcheck(): free() reports "invalid pointer" while pointer looks ok



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



>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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]