[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commits] r8571 - in /fsf/trunk/libc: ./ malloc/ sysdeps/unix/sysv/linux/bits/ sysdeps/unix/sysv/linux/net/ sysdeps/unix/sysv/linux/sp...
- To: commits@xxxxxxxxxx
- Subject: [commits] r8571 - in /fsf/trunk/libc: ./ malloc/ sysdeps/unix/sysv/linux/bits/ sysdeps/unix/sysv/linux/net/ sysdeps/unix/sysv/linux/sp...
- From: eglibc@xxxxxxxxxx
- Date: Fri, 19 Jun 2009 07:09:48 -0000
Author: eglibc
Date: Fri Jun 19 00:09:46 2009
New Revision: 8571
Log:
Import glibc-mainline for 2009-06-19
Modified:
fsf/trunk/libc/ChangeLog
fsf/trunk/libc/malloc/malloc.c
fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/socket.h
fsf/trunk/libc/sysdeps/unix/sysv/linux/net/if_arp.h
fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/socket.h
Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Fri Jun 19 00:09:46 2009
@@ -1,3 +1,17 @@
+2009-06-18 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * malloc/malloc.c (_int_malloc): Add some consistency checks.
+ (_int_free): Likewise.
+
+ * sysdeps/unix/sysv/linux/bits/socket.h: Define PF_IEEE802154 and
+ AF_IEEE802154.
+ * sysdeps/unix/sysv/linux/sparc/bits/socket.h: Likewise.
+ * sysdeps/unix/sysv/linux/net/if_arp.h: Define ARPHRD_IEEE802154
+ and ARPHRD_IEEE802154_PHY.
+
+ * sysdeps/unix/sysv/linux/sparc/bits/socket.h: Add missing definitions
+ relative to generic Linux version.
+
2009-06-17 H.J. Lu <hongjiu.lu@xxxxxxxxx>
* elf/Makefile ($(objpfx)ifuncmain1pie): Use $(+link-pie).
@@ -72,7 +86,7 @@
Patch by Arnaud Ebalard <arno@xxxxxxxxxxxx>.
[BZ #10207]
- * nss/getent.c: Add support for print gshadow data.
+ * nss/getent.c: Add support for printing gshadow data.
[BZ #10203]
* nis/nss_nis/nis-pwd.c (internal_nis_endpwent): Free all buffers,
Modified: fsf/trunk/libc/malloc/malloc.c
==============================================================================
--- fsf/trunk/libc/malloc/malloc.c (original)
+++ fsf/trunk/libc/malloc/malloc.c Fri Jun 19 00:09:46 2009
@@ -4241,6 +4241,8 @@
mchunkptr fwd; /* misc temp for linking */
mchunkptr bck; /* misc temp for linking */
+ const char *errstr = NULL;
+
/*
Convert request size to internal form by adding SIZE_SZ bytes
overhead plus possibly more to obtain necessary alignment and/or
@@ -4276,8 +4278,11 @@
#endif
if (victim != 0) {
if (__builtin_expect (fastbin_index (chunksize (victim)) != idx, 0))
- malloc_printerr (check_action, "malloc(): memory corruption (fast)",
- chunk2mem (victim));
+ {
+ errstr = "malloc(): memory corruption (fast)";
+ errout:
+ malloc_printerr (check_action, errstr, chunk2mem (victim));
+ }
#ifndef ATOMIC_FASTBINS
*fb = victim->fd;
#endif
@@ -4306,6 +4311,11 @@
malloc_consolidate(av);
else {
bck = victim->bk;
+ if (__builtin_expect (bck->fd != victim, 0))
+ {
+ errstr = "malloc(): smallbin double linked list corrupted";
+ goto errout;
+ }
set_inuse_bit_at_offset(victim, nb);
bin->bk = bck;
bck->fd = bin;
@@ -4515,6 +4525,11 @@
have to perform a complete insert here. */
bck = unsorted_chunks(av);
fwd = bck->fd;
+ if (__builtin_expect (fwd->bk != bck, 0))
+ {
+ errstr = "malloc(): corrupted unsorted chunks";
+ goto errout;
+ }
remainder->bk = bck;
remainder->fd = fwd;
bck->fd = remainder;
@@ -4610,6 +4625,11 @@
have to perform a complete insert here. */
bck = unsorted_chunks(av);
fwd = bck->fd;
+ if (__builtin_expect (fwd->bk != bck, 0))
+ {
+ errstr = "malloc(): corrupted unsorted chunks 2";
+ goto errout;
+ }
remainder->bk = bck;
remainder->fd = fwd;
bck->fd = remainder;
@@ -4901,6 +4921,11 @@
bck = unsorted_chunks(av);
fwd = bck->fd;
+ if (__builtin_expect (fwd->bk != bck, 0))
+ {
+ errstr = "free(): corrupted unsorted chunks";
+ goto errout;
+ }
p->fd = fwd;
p->bk = bck;
if (!in_smallbin_range(size))
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/socket.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/socket.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/socket.h Fri Jun 19 00:09:46 2009
@@ -1,5 +1,5 @@
/* System-specific socket constants and types. Linux version.
- Copyright (C) 1991, 1992, 1994-2001, 2004, 2006, 2007, 2008
+ Copyright (C) 1991, 1992, 1994-2001, 2004, 2006, 2007, 2008, 2009
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -108,7 +108,8 @@
#define PF_RXRPC 33 /* RxRPC sockets. */
#define PF_ISDN 34 /* mISDN sockets. */
#define PF_PHONET 35 /* Phonet sockets. */
-#define PF_MAX 36 /* For now.. */
+#define PF_IEEE802154 36 /* IEEE 802.15.4 sockets. */
+#define PF_MAX 37 /* For now.. */
/* Address families. */
#define AF_UNSPEC PF_UNSPEC
@@ -148,6 +149,7 @@
#define AF_RXRPC PF_RXRPC
#define AF_ISDN PF_ISDN
#define AF_PHONET PF_PHONET
+#define AF_IEEE802154 PF_IEEE802154
#define AF_MAX PF_MAX
/* Socket level values. Others are defined in the appropriate headers.
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/net/if_arp.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/net/if_arp.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/net/if_arp.h Fri Jun 19 00:09:46 2009
@@ -1,5 +1,5 @@
/* Definitions for Address Resolution Protocol.
- Copyright (C) 1997,1999,2001,2006 Free Software Foundation, Inc.
+ Copyright (C) 1997,1999,2001,2006,2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 1997.
@@ -128,6 +128,8 @@
#define ARPHRD_IEEE80211 801 /* IEEE 802.11. */
#define ARPHRD_IEEE80211_PRISM 802 /* IEEE 802.11 + Prism2 header. */
#define ARPHRD_IEEE80211_RADIOTAP 803 /* IEEE 802.11 + radiotap header. */
+#define ARPHRD_IEEE802154 804 /* IEEE 802.15.4 header. */
+#define ARPHRD_IEEE802154_PHY 805 /* IEEE 802.15.4 PHY header. */
#define ARPHRD_VOID 0xFFFF /* Void type, nothing is known. */
#define ARPHRD_NONE 0xFFFE /* Zero header length. */
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/socket.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/socket.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/socket.h Fri Jun 19 00:09:46 2009
@@ -1,5 +1,5 @@
/* System-specific socket constants and types. Linux/SPARC version.
- Copyright (C) 1991, 1992, 1994-2001, 2004, 2006, 2007, 2008
+ Copyright (C) 1991, 1992, 1994-2001, 2004, 2006, 2007, 2008, 2009
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -94,15 +94,21 @@
#define PF_ASH 18 /* Ash. */
#define PF_ECONET 19 /* Acorn Econet. */
#define PF_ATMSVC 20 /* ATM SVCs. */
+#define PF_RDS 21 /* RDS sockets. */
#define PF_SNA 22 /* Linux SNA Project */
#define PF_IRDA 23 /* IRDA sockets. */
#define PF_PPPOX 24 /* PPPoX sockets. */
#define PF_WANPIPE 25 /* Wanpipe API sockets. */
+#define PF_LLC 26 /* Linux LLC. */
+#define PF_CAN 29 /* Controller Area Network. */
+#define PF_TIPC 30 /* TIPC sockets. */
#define PF_BLUETOOTH 31 /* Bluetooth sockets. */
#define PF_IUCV 32 /* IUCV sockets. */
#define PF_RXRPC 33 /* RxRPC sockets. */
#define PF_ISDN 34 /* mISDN sockets. */
-#define PF_MAX 35 /* For now.. */
+#define PF_PHONET 35 /* Phonet sockets. */
+#define PF_IEEE802154 36 /* IEEE 802.15.4 sockets. */
+#define PF_MAX 37 /* For now.. */
/* Address families. */
#define AF_UNSPEC PF_UNSPEC
@@ -129,14 +135,20 @@
#define AF_ASH PF_ASH
#define AF_ECONET PF_ECONET
#define AF_ATMSVC PF_ATMSVC
+#define AF_RDS PF_RDS
#define AF_SNA PF_SNA
#define AF_IRDA PF_IRDA
#define AF_PPPOX PF_PPPOX
#define AF_WANPIPE PF_WANPIPE
+#define AF_LLC PF_LLC
+#define AF_CAN PF_CAN
+#define AF_TIPC PF_TIPC
#define AF_BLUETOOTH PF_BLUETOOTH
#define AF_IUCV PF_IUCV
#define AF_RXRPC PF_RXRPC
#define AF_ISDN PF_ISDN
+#define AF_PHONET PF_PHONET
+#define AF_IEEE802154 PF_IEEE802154
#define AF_MAX PF_MAX
/* Socket level values. Others are defined in the appropriate headers.