[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[commits] r6562 - in /fsf/trunk/libc: ChangeLog malloc/hooks.c stdio-common/vfprintf.c



Author: eglibc
Date: Wed Jul 16 00:03:57 2008
New Revision: 6562

Log:
Import glibc-mainline for 2008-07-16

Modified:
    fsf/trunk/libc/ChangeLog
    fsf/trunk/libc/malloc/hooks.c
    fsf/trunk/libc/stdio-common/vfprintf.c

Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Wed Jul 16 00:03:57 2008
@@ -1,3 +1,10 @@
+2008-07-15  Ulrich Drepper  <drepper@xxxxxxxxxx>
+
+	* stdio-common/vfprintf.c (_IO_helper_overflow): In case _IO_sputn
+	doesn't manage to write anything, fail.
+
+	* malloc/hooks.c (__malloc_check_init): Remove printf.
+
 2008-07-14  Samuel Thibault  <samuel.thibault@xxxxxxxxxxxx>
 
 	* sysdeps/mach/hurd/bits/fcntl.h: Include <sys/types.h>.

Modified: fsf/trunk/libc/malloc/hooks.c
==============================================================================
--- fsf/trunk/libc/malloc/hooks.c (original)
+++ fsf/trunk/libc/malloc/hooks.c Wed Jul 16 00:03:57 2008
@@ -1,5 +1,5 @@
 /* Malloc implementation for multiple threads without lock contention.
-   Copyright (C) 2001-2006, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2001-2006, 2007, 2008 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Wolfram Gloger <wg@xxxxxxxxx>, 2001.
 
@@ -96,8 +96,6 @@
   __free_hook = free_check;
   __realloc_hook = realloc_check;
   __memalign_hook = memalign_check;
-  if(check_action & 1)
-    malloc_printerr (5, "malloc: using debugging hooks", NULL);
 }
 
 /* A simple, standard set of debugging hooks.  Overhead is `only' one

Modified: fsf/trunk/libc/stdio-common/vfprintf.c
==============================================================================
--- fsf/trunk/libc/stdio-common/vfprintf.c (original)
+++ fsf/trunk/libc/stdio-common/vfprintf.c Wed Jul 16 00:03:57 2008
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2002, 2003, 2004, 2005, 2006, 2007
+/* Copyright (C) 1991-2002, 2003, 2004, 2005, 2006, 2007, 2008
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -2080,6 +2080,11 @@
     {
       _IO_size_t written = _IO_sputn (target, s->_wide_data->_IO_write_base,
 				      used);
+      if (written == 0 || written == WEOF)
+	return WEOF;
+      __wmemmove (s->_wide_data->_IO_write_base,
+		  s->_wide_data->_IO_write_base + written,
+		  used - written);
       s->_wide_data->_IO_write_ptr -= written;
     }
 #else
@@ -2087,6 +2092,10 @@
   if (used)
     {
       _IO_size_t written = _IO_sputn (target, s->_IO_write_base, used);
+      if (written == 0 || written == EOF)
+	return EOF;
+      memmove (s->_IO_write_base, s->_IO_write_base + written,
+	       used - written);
       s->_IO_write_ptr -= written;
     }
 #endif