This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/5743] New: realloc() problem
- From: "tsuyoshi at wni dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 7 Feb 2008 10:06:48 -0000
- Subject: [Bug libc/5743] New: realloc() problem
- Reply-to: sourceware-bugzilla at sourceware dot org
The realloc() doesn't copy previous allocated last 4 byte in multi thread
environment, and this very rarely occurs.
--- malloc.c.orig Thu Feb 07 17:46:01 2008
+++ malloc.c Thu Feb 07 17:47:23 2008
@@ -3717,7 +3717,7 @@
newp = public_mALLOc(bytes);
if (newp != NULL)
{
- MALLOC_COPY (newp, oldmem, oldsize - 2 * SIZE_SZ);
+ MALLOC_COPY (newp, oldmem, oldsize - SIZE_SZ);
#if THREAD_STATS
if(!mutex_trylock(&ar_ptr->mutex))
++(ar_ptr->stat_lock_direct);
--
Summary: realloc() problem
Product: glibc
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: libc
AssignedTo: drepper at redhat dot com
ReportedBy: tsuyoshi at wni dot com
CC: glibc-bugs at sources dot redhat dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=5743
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.