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

[Bug libc/808] New: Unclear malloc error detection message


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.


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