From 609cf61467154868c88b1ede078322fb4b48a528 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 18 Oct 2006 19:26:30 +0000 Subject: [BZ #3313] 2006-10-17 Jakub Jelinek * sunrpc/xdr_mem.c (xdrmem_setpos): Don't compare addresses as signed longs, check for x_base + pos overflow. * sunrpc/Makefile (tests): Add tst-xdrmem2. * sunrpc/tst-xdrmem2.c: New test. 2006-10-18 Ulrich Drepper * elf/dl-lookup.c (_dl_lookup_symbol_x): Add warning to _dl_lookup_symbol_x code. 2006-10-17 Jakub Jelinek * elf/dl-runtime.c: Include sysdep-cancel.h. (_dl_fixup, _dl_profile_fixup): Use __rtld_mrlock_* and scoperec->nusers only if !SINGLE_THREAD_P. Use atomic_* instead of catomic_* macros. * elf/dl-sym.c: Include sysdep-cancel.h. (do_sym): Use __rtld_mrlock_* and scoperec->nusers only if !SINGLE_THREAD_P. Use atomic_* instead of catomic_* macros. * elf/dl-close.c: Include sysdep-cancel.h. (_dl_close): Use __rtld_mrlock_* and scoperec->nusers only if !SINGLE_THREAD_P. Use atomic_* instead of catomic_* macros. * elf/dl-open.c: Include sysdep-cancel.h. (dl_open_worker): Use __rtld_mrlock_* and scoperec->nusers only if !SINGLE_THREAD_P. Use atomic_* instead of catomic_* macros. 2006-10-17 Jakub Jelinek [BZ #3313] * malloc/malloc.c (malloc_consolidate): Set maxfb to address of last fastbin rather than end of fastbin array. 2006-10-18 Ulrich Drepper * sysdeps/i386/i486/bits/atomic.h (catomic_decrement): Use correct body macro. * sysdeps/x86_64/bits/atomic.h (__arch_c_compare_and_exchange_val_64_acq): Add missing casts. (catomic_decrement): Use correct body macro. 2006-10-17 Jakub Jelinek * include/atomic.h: Add a unique prefix to all local variables in macros. * csu/tst-atomic.c (do_test): Test also catomic_* macros. * include/link.h: Include . Define struct --- sysdeps/x86_64/bits/atomic.h | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'sysdeps/x86_64/bits') diff --git a/sysdeps/x86_64/bits/atomic.h b/sysdeps/x86_64/bits/atomic.h index e1981e94d6..65d6b02008 100644 --- a/sysdeps/x86_64/bits/atomic.h +++ b/sysdeps/x86_64/bits/atomic.h @@ -81,8 +81,8 @@ typedef uintmax_t uatomic_max_t; ({ __typeof (*mem) ret; \ __asm __volatile (LOCK_PREFIX "cmpxchgq %q2, %1" \ : "=a" (ret), "=m" (*mem) \ - : "r" ((long) (newval)), "m" (*mem), \ - "0" ((long) (oldval))); \ + : "r" ((long int) (newval)), "m" (*mem), \ + "0" ((long int) (oldval))); \ ret; }) @@ -121,12 +121,13 @@ typedef uintmax_t uatomic_max_t; #define __arch_c_compare_and_exchange_val_64_acq(mem, newval, oldval) \ ({ __typeof (*mem) ret; \ - __asm __volatile ("cmpl $0, %%fs:%P5\n\t" \ - "je 0f\n\t" \ - "lock\n" \ + __asm __volatile ("cmpl $0, %%fs:%P5\n\t" \ + "je 0f\n\t" \ + "lock\n" \ "0:\tcmpxchgq %q2, %1" \ : "=a" (ret), "=m" (*mem) \ - : "q" (newval), "m" (*mem), "0" (oldval), \ + : "q" ((long int) (newval)), "m" (*mem), \ + "0" ((long int)oldval), \ "i" (offsetof (tcbhead_t, multiple_threads))); \ ret; }) @@ -351,7 +352,7 @@ typedef uintmax_t uatomic_max_t; "cmpl $0, %%fs:%P2\n\tje 0f\n\tlock\n0:\t" #define catomic_decrement(mem) \ - __arch_increment_body (__arch_decrement_cprefix, mem) + __arch_decrement_body (__arch_decrement_cprefix, mem) #define atomic_decrement_and_test(mem) \ -- cgit v1.2.3