[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commits] r9191 - in /trunk: libc/ libc/malloc/ libc/nptl/ libc/nptl/sysdeps/pthread/ libc/sysdeps/generic/ ports/ ports/sysdeps/hppa/...
- To: commits@xxxxxxxxxx
- Subject: [commits] r9191 - in /trunk: libc/ libc/malloc/ libc/nptl/ libc/nptl/sysdeps/pthread/ libc/sysdeps/generic/ ports/ ports/sysdeps/hppa/...
- From: joseph@xxxxxxxxxx
- Date: Wed, 04 Nov 2009 16:03:03 -0000
Author: joseph
Date: Wed Nov 4 08:03:03 2009
New Revision: 9191
Log:
Merge changes between r9169 and r9190 from /fsf/trunk.
Added:
trunk/libc/sysdeps/generic/libgcc_s.h
- copied unchanged from r9190, fsf/trunk/libc/sysdeps/generic/libgcc_s.h
trunk/ports/sysdeps/hppa/libgcc_s.h
trunk/ports/sysdeps/m68k/libgcc_s.h
Removed:
trunk/ports/sysdeps/m68k/shlib-versions
Modified:
trunk/libc/ChangeLog
trunk/libc/malloc/hooks.c
trunk/libc/nptl/ChangeLog
trunk/libc/nptl/sysdeps/pthread/unwind-forcedunwind.c
trunk/libc/nptl/sysdeps/pthread/unwind-resume.c
trunk/libc/shlib-versions
trunk/libc/sysdeps/generic/framestate.c
trunk/ports/ChangeLog.m68k
trunk/ports/sysdeps/hppa/shlib-versions
trunk/ports/sysdeps/unix/sysv/linux/m68k/fchownat.c
Modified: trunk/libc/ChangeLog
==============================================================================
--- trunk/libc/ChangeLog (original)
+++ trunk/libc/ChangeLog Wed Nov 4 08:03:03 2009
@@ -1,3 +1,14 @@
+2009-11-03 Andreas Schwab <schwab@xxxxxxxxxxxxxx>
+
+ [BZ #4457]
+ * sysdeps/generic/libgcc_s.h: New file.
+ * sysdeps/generic/framestate.c: Include it and use LIBGCC_S_SO.
+
+2009-11-01 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * malloc/hooks.c (free_check): Restore locking and call _int_free
+ appropriately.
+
2009-10-30 Ulrich Drepper <drepper@xxxxxxxxxx>
* version.h (VERSION): Bump for 2.11 release.
Modified: trunk/libc/malloc/hooks.c
==============================================================================
--- trunk/libc/malloc/hooks.c (original)
+++ trunk/libc/malloc/hooks.c Wed Nov 4 08:03:03 2009
@@ -162,8 +162,8 @@
((char*)p + sz)>=(mp_.sbrk_base+main_arena.system_mem) )) ||
sz<MINSIZE || sz&MALLOC_ALIGN_MASK || !inuse(p) ||
( !prev_inuse(p) && (p->prev_size&MALLOC_ALIGN_MASK ||
- (contig && (char*)prev_chunk(p)<mp_.sbrk_base) ||
- next_chunk(prev_chunk(p))!=p) ))
+ (contig && (char*)prev_chunk(p)<mp_.sbrk_base) ||
+ next_chunk(prev_chunk(p))!=p) ))
return NULL;
magic = MAGICBYTE(p);
for(sz += SIZE_SZ-1; (c = ((unsigned char*)p)[sz]) != magic; sz -= c) {
@@ -177,9 +177,9 @@
first. */
offset = (unsigned long)mem & page_mask;
if((offset!=MALLOC_ALIGNMENT && offset!=0 && offset!=0x10 &&
- offset!=0x20 && offset!=0x40 && offset!=0x80 && offset!=0x100 &&
- offset!=0x200 && offset!=0x400 && offset!=0x800 && offset!=0x1000 &&
- offset<0x2000) ||
+ offset!=0x20 && offset!=0x40 && offset!=0x80 && offset!=0x100 &&
+ offset!=0x200 && offset!=0x400 && offset!=0x800 && offset!=0x1000 &&
+ offset<0x2000) ||
!chunk_is_mmapped(p) || (p->size & PREV_INUSE) ||
( (((unsigned long)p - p->prev_size) & page_mask) != 0 ) ||
( (sz = chunksize(p)), ((p->prev_size + sz) & page_mask) != 0 ) )
@@ -276,13 +276,17 @@
mchunkptr p;
if(!mem) return;
+ (void)mutex_lock(&main_arena.mutex);
p = mem2chunk_check(mem, NULL);
if(!p) {
+ (void)mutex_unlock(&main_arena.mutex);
+
malloc_printerr(check_action, "free(): invalid pointer", mem);
return;
}
#if HAVE_MMAP
if (chunk_is_mmapped(p)) {
+ (void)mutex_unlock(&main_arena.mutex);
munmap_chunk(p);
return;
}
@@ -291,12 +295,11 @@
memset(mem, 0, chunksize(p) - (SIZE_SZ+1));
#endif
#ifdef ATOMIC_FASTBINS
- _int_free(&main_arena, p, 0);
-#else
- (void)mutex_lock(&main_arena.mutex);
+ _int_free(&main_arena, p, 1);
+#else
_int_free(&main_arena, p);
+#endif
(void)mutex_unlock(&main_arena.mutex);
-#endif
}
static Void_t*
@@ -345,13 +348,13 @@
if(oldsize - SIZE_SZ >= nb)
newmem = oldmem; /* do nothing */
else {
- /* Must alloc, copy, free. */
- if (top_check() >= 0)
+ /* Must alloc, copy, free. */
+ if (top_check() >= 0)
newmem = _int_malloc(&main_arena, bytes+1);
- if (newmem) {
- MALLOC_COPY(BOUNDED_N(newmem, bytes+1), oldmem, oldsize - 2*SIZE_SZ);
- munmap_chunk(oldp);
- }
+ if (newmem) {
+ MALLOC_COPY(BOUNDED_N(newmem, bytes+1), oldmem, oldsize - 2*SIZE_SZ);
+ munmap_chunk(oldp);
+ }
}
}
} else {
@@ -367,7 +370,7 @@
nb = chunksize(newp);
if(oldp<newp || oldp>=chunk_at_offset(newp, nb)) {
memset((char*)oldmem + 2*sizeof(mbinptr), 0,
- oldsize - (2*sizeof(mbinptr)+2*SIZE_SZ+1));
+ oldsize - (2*sizeof(mbinptr)+2*SIZE_SZ+1));
} else if(nb > oldsize+SIZE_SZ) {
memset((char*)BOUNDED_N(chunk2mem(newp), bytes) + oldsize,
0, nb - (oldsize+SIZE_SZ));
@@ -626,7 +629,7 @@
mark_bin(&main_arena, i);
} else {
/* Oops, index computation from chunksize must have changed.
- Link the whole list into unsorted_chunks. */
+ Link the whole list into unsorted_chunks. */
first(b) = last(b) = b;
b = unsorted_chunks(&main_arena);
ms->av[2*i+2]->bk = b;
@@ -667,7 +670,7 @@
/* Check whether it is safe to enable malloc checking, or whether
it is necessary to disable it. */
if (ms->using_malloc_checking && !using_malloc_checking &&
- !disallow_malloc_check)
+ !disallow_malloc_check)
__malloc_check_init ();
else if (!ms->using_malloc_checking && using_malloc_checking) {
__malloc_hook = NULL;
Modified: trunk/libc/nptl/ChangeLog
==============================================================================
--- trunk/libc/nptl/ChangeLog (original)
+++ trunk/libc/nptl/ChangeLog Wed Nov 4 08:03:03 2009
@@ -1,3 +1,10 @@
+2009-11-03 Andreas Schwab <schwab@xxxxxxxxxxxxxx>
+
+ [BZ #4457]
+ * sysdeps/pthread/unwind-resume.c: Include <libgcc_s.h> and use
+ LIBGCC_S_SO.
+ * sysdeps/pthread/unwind-forcedunwind.c: Likewise.
+
2009-10-30 Ulrich Drepper <drepper@xxxxxxxxxx>
* tst-sem11.c (main): Rewrite to avoid aliasing problems.
Modified: trunk/libc/nptl/sysdeps/pthread/unwind-forcedunwind.c
==============================================================================
--- trunk/libc/nptl/sysdeps/pthread/unwind-forcedunwind.c (original)
+++ trunk/libc/nptl/sysdeps/pthread/unwind-forcedunwind.c Wed Nov 4 08:03:03 2009
@@ -22,7 +22,7 @@
#include <unwind.h>
#include <pthreadP.h>
#include <sysdep.h>
-#include <gnu/lib-names.h>
+#include <libgcc_s.h>
static void *libgcc_s_handle;
static void (*libgcc_s_resume) (struct _Unwind_Exception *exc);
Modified: trunk/libc/nptl/sysdeps/pthread/unwind-resume.c
==============================================================================
--- trunk/libc/nptl/sysdeps/pthread/unwind-resume.c (original)
+++ trunk/libc/nptl/sysdeps/pthread/unwind-resume.c Wed Nov 4 08:03:03 2009
@@ -20,7 +20,7 @@
#include <dlfcn.h>
#include <stdio.h>
#include <unwind.h>
-#include <gnu/lib-names.h>
+#include <libgcc_s.h>
static void (*libgcc_s_resume) (struct _Unwind_Exception *exc);
static _Unwind_Reason_Code (*libgcc_s_personality)
Modified: trunk/libc/shlib-versions
==============================================================================
--- trunk/libc/shlib-versions (original)
+++ trunk/libc/shlib-versions Wed Nov 4 08:03:03 2009
@@ -134,8 +134,3 @@
# The asynchronous name lookup library.
.*-.*-.* libanl=1
-
-# The GCC support library.
-# We don't really provide this one as the part of GLIBC,
-# but we declare it here to produce LIBGCC_S_SO macro in gnu/lib-names.h.
-.*-.*-.* libgcc_s=1
Modified: trunk/libc/sysdeps/generic/framestate.c
==============================================================================
--- trunk/libc/sysdeps/generic/framestate.c (original)
+++ trunk/libc/sysdeps/generic/framestate.c Wed Nov 4 08:03:03 2009
@@ -20,11 +20,11 @@
#include <dlfcn.h>
#include <stdlib.h>
-#include <gnu/lib-names.h>
#define STATIC static
#define __frame_state_for fallback_frame_state_for
#include <unwind-dw2.c>
#undef __frame_state_for
+#include <libgcc_s.h>
typedef struct frame_state * (*framesf)(void *pc, struct frame_state *);
struct frame_state *__frame_state_for (void *pc,
Modified: trunk/ports/ChangeLog.m68k
==============================================================================
--- trunk/ports/ChangeLog.m68k (original)
+++ trunk/ports/ChangeLog.m68k Wed Nov 4 08:03:03 2009
@@ -1,3 +1,9 @@
+2009-10-30 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ [BZ #10609]
+ * sysdeps/unix/sysv/linux/m68k/fchownat.c (fchownat): Fix handling
+ of empty parameters for file names.
+
2009-09-06 Andreas Schwab <schwab@xxxxxxxxxxxxxx>
* sysdeps/unix/sysv/linux/m68k/____longjmp_chk.c: New file.
Added: trunk/ports/sysdeps/hppa/libgcc_s.h
==============================================================================
--- trunk/ports/sysdeps/hppa/libgcc_s.h (added)
+++ trunk/ports/sysdeps/hppa/libgcc_s.h Wed Nov 4 08:03:03 2009
@@ -1,0 +1,2 @@
+/* Name of libgcc_s library provided by gcc. */
+#define LIBGCC_S_SO "libgcc_s.so.4"
Modified: trunk/ports/sysdeps/hppa/shlib-versions
==============================================================================
--- trunk/ports/sysdeps/hppa/shlib-versions (original)
+++ trunk/ports/sysdeps/hppa/shlib-versions Wed Nov 4 08:03:03 2009
@@ -5,5 +5,3 @@
hppa.*-.*-.* ld=ld.so.1 GLIBC_2.2
hppa-.*-.* libBrokenLocale=1 GLIBC_2.2
-
-hppa-.*-.* libgcc_s=4
Added: trunk/ports/sysdeps/m68k/libgcc_s.h
==============================================================================
--- trunk/ports/sysdeps/m68k/libgcc_s.h (added)
+++ trunk/ports/sysdeps/m68k/libgcc_s.h Wed Nov 4 08:03:03 2009
@@ -1,0 +1,2 @@
+/* Name of libgcc_s library provided by gcc. */
+#define LIBGCC_S_SO "libgcc_s.so.2"
Modified: trunk/ports/sysdeps/unix/sysv/linux/m68k/fchownat.c
==============================================================================
--- trunk/ports/sysdeps/unix/sysv/linux/m68k/fchownat.c (original)
+++ trunk/ports/sysdeps/unix/sysv/linux/m68k/fchownat.c Wed Nov 4 08:03:03 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -51,6 +51,12 @@
if (fd != AT_FDCWD && file[0] != '/')
{
size_t filelen = strlen (file);
+ if (__builtin_expect (filelen == 0, 0))
+ {
+ __set_errno (ENOENT);
+ return -1;
+ }
+
static const char procfd[] = "/proc/self/fd/%d/%s";
/* Buffer for the path name we are going to use. It consists of
- the string /proc/self/fd/