mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
* malloc/malloc.c (public_rEALLOc): When new arena is used, copy
really all bytes. Patch by Denys Vlasenko <dvlasenk@redhat.com>.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2008-11-02 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* malloc/malloc.c (public_rEALLOc): When new arena is used, copy
|
||||||
|
really all bytes. Patch by Denys Vlasenko <dvlasenk@redhat.com>.
|
||||||
|
|
||||||
2008-11-01 Ulrich Drepper <drepper@redhat.com>
|
2008-11-01 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
[BZ #6966]
|
[BZ #6966]
|
||||||
|
@ -3717,7 +3717,7 @@ public_rEALLOc(Void_t* oldmem, size_t bytes)
|
|||||||
newp = public_mALLOc(bytes);
|
newp = public_mALLOc(bytes);
|
||||||
if (newp != NULL)
|
if (newp != NULL)
|
||||||
{
|
{
|
||||||
MALLOC_COPY (newp, oldmem, oldsize - 2 * SIZE_SZ);
|
MALLOC_COPY (newp, oldmem, oldsize - SIZE_SZ);
|
||||||
#if THREAD_STATS
|
#if THREAD_STATS
|
||||||
if(!mutex_trylock(&ar_ptr->mutex))
|
if(!mutex_trylock(&ar_ptr->mutex))
|
||||||
++(ar_ptr->stat_lock_direct);
|
++(ar_ptr->stat_lock_direct);
|
||||||
|
@ -995,7 +995,11 @@ mkfile_output (struct commandline *cmd)
|
|||||||
abort ();
|
abort ();
|
||||||
temp = rindex (cmd->infile, '.');
|
temp = rindex (cmd->infile, '.');
|
||||||
cp = stpcpy (mkfilename, "Makefile.");
|
cp = stpcpy (mkfilename, "Makefile.");
|
||||||
strncpy (cp, cmd->infile, (temp - cmd->infile));
|
if (temp != NULL)
|
||||||
|
*((char *) stpncpy (cp, cmd->infile, temp - cmd->infile)) = '\0';
|
||||||
|
else
|
||||||
|
stpcpy (cp, cmd->infile);
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
mkfilename = (char *) cmd->outfile;
|
mkfilename = (char *) cmd->outfile;
|
||||||
|
Reference in New Issue
Block a user