This is the mail archive of the
glibc-bugs@sources.redhat.com
mailing list for the glibc project.
[Bug libc/808] New: Unclear malloc error detection message
- From: "hjl at lucon dot org" <sourceware-bugzilla at sources dot redhat dot com>
- To: glibc-bugs at sources dot redhat dot com
- Date: 29 Mar 2005 19:04:27 -0000
- Subject: [Bug libc/808] New: Unclear malloc error detection message
- Reply-to: sourceware-bugzilla at sources dot redhat dot com
There are
oldp = mem2chunk(oldmem);
oldsize = chunksize(oldp);
/* Simple tests for old block integrity. */
if (__builtin_expect ((uintptr_t) oldp & MALLOC_ALIGN_MASK, 0))
{
errstr = "realloc(): invalid pointer";
errout:
malloc_printerr (check_action, errstr, oldmem);
return NULL;
}
if (__builtin_expect (oldp->size <= 2 * SIZE_SZ, 0)
|| __builtin_expect (oldsize >= av->system_mem, 0))
{
errstr = "realloc(): invalid size";
goto errout;
}
in malloc/malloc.c. "invalid size" is not very clear that which size
is invalid, new or old.
--
Summary: Unclear malloc error detection message
Product: glibc
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: libc
AssignedTo: gotom at debian dot or dot jp
ReportedBy: hjl at lucon dot org
CC: glibc-bugs at sources dot redhat dot com
http://sources.redhat.com/bugzilla/show_bug.cgi?id=808
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.