This is the mail archive of the glibc-bugs@sourceware.org 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]
Other format: [Raw text]

[Bug libc/12005] New: malloc(-1ul) segfaults when using mcheck


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.


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