This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/12005] New: malloc(-1ul) segfaults when using mcheck
- From: "sources dot redhat dot com at contacts dot eelis dot net" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 11 Sep 2010 16:02:36 -0000
- Subject: [Bug libc/12005] New: malloc(-1ul) segfaults when using mcheck
- Reply-to: sourceware-bugzilla at sourceware dot org
The malloc call in the following testcase segfaults both on my x86-64 machine
with glibc 2.11.2 and on a x86-32 machine with glibc 2.9:
#include <stdlib.h>
#include <mcheck.h>
int main () {
mcheck(0);
malloc(-1ul);
return 0;
}
Obviously, malloc should return 0 instead of segfaulting. :)
--
Summary: malloc(-1ul) segfaults when using mcheck
Product: glibc
Version: 2.11
Status: NEW
Severity: normal
Priority: P2
Component: libc
AssignedTo: drepper at redhat dot com
ReportedBy: sources dot redhat dot com at contacts dot eelis dot net
CC: glibc-bugs at sources dot redhat dot com
GCC host triplet: x86_64-suse-linux
http://sourceware.org/bugzilla/show_bug.cgi?id=12005
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.