Skip to content
Snippets Groups Projects
  1. Aug 05, 2015
  2. Aug 04, 2015
  3. Aug 01, 2015
  4. Jul 31, 2015
  5. Jul 30, 2015
    • Andrew Senkevich's avatar
      Prevent runtime fail of SSE vector math tests on non SSE4.1 machine. · a9e8ea51
      Andrew Senkevich authored
          [BZ #18740]
          * sysdeps/x86_64/fpu/Makefile (double-vlen2-arch-ext-cflags,
          float-vlen4-arch-ext-cflags): Removed.
          * math/Makefile (CFLAGS-test-double-vlen2-wrappers.c,
          CFLAGS-test-float-vlen4-wrappers.c): Likewise.
      a9e8ea51
    • Mike Frysinger's avatar
      0e569d30
    • Mike Frysinger's avatar
      hppa: fix pthreadtypes.h namespace failures · 243cc404
      Mike Frysinger authored
      The conform tests flag the "aligned" symbol used inside the attributes,
      so rename it to __aligned__ like other headers.
      243cc404
    • Torvald Riegel's avatar
      hppa: Remove custom lowlevellock.h. · 87ab9d55
      Torvald Riegel authored
      This untested patch removes the custom lowlevellock.h on hppa.  It seems
      to contain an implementation equivalent to the generic lowlevellock.h.
      87ab9d55
    • Mike Frysinger's avatar
      hppa: sigaction.h: change sa_flags to an int · 827e0185
      Mike Frysinger authored
      This fixes the conform test for the sigaction.h header and makes it match
      all the other arches.
      827e0185
    • Mike Frysinger's avatar
      hppa: fix sysdep.h header setup · 979900af
      Mike Frysinger authored
      The semi-recent SYSCALL_CANCEL inclusion broke hppa due to the sysdep.h
      headers not including the unix/sysdep.h headers.  Rework the includes so
      we match the other ports:
      * hppa/sysdep.h:
      	- Do not include sys/syscall.h as the unix sysdep.h headers do it.
      	- Do not include config.h as libc-symbols.h does it, and it has no
      	#ifdef multiple-include protection, and it breaks when some files
      	do things like #undef __OPTIMIZE__.
      * sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h:
      	- Drop the generic/sysdep.h as the unix sysdep.h headers include it.
      * sysdeps/unix/sysv/linux/hppa/sysdep.h:
      	- Change to the unix & core hppa sysdep header stacks.
      	- Undef a few defines that the core headers already set up for us.
      979900af
    • Mike Frysinger's avatar
      hppa: rewrite INLINE_SYSCALL · a822b018
      Mike Frysinger authored
      The semi-recent SYSCALL_CANCEL macro imposes a slight nuance on the
      implementation of INLINE_SYSCALL: the nr argument cannot be expanded
      directly but must be passed on to another macro which may expand it.
      Most arches don't notice because INLINE_SYSCALL is defined in terms
      of INTERNAL_SYSCALL which has the additional layer of expansion, but
      on hppa, it was attempting to expand it directly.  That causes build
      errors like so:
      ../sysdeps/unix/sysv/linux/sigsuspend.c: In function '__sigsuspend':
      ../sysdeps/unix/sysv/linux/sigsuspend.c:31:62: error:
      	implicit declaration of function 'LOAD_ARGS___SYSCALL_NARGS'
      ../sysdeps/unix/sysv/linux/sigsuspend.c:31:304: error:
      	called object 'LOAD_ARGS___SYSCALL_NARGS(set, 8)' is not a function
      
      So rewrite hppa's INLINE_SYSCALL to use INTERNAL_SYSCALL like other
      arches do.  This is also a nice clean up as the two macros had quite
      a bit of duplicated logic.
      a822b018
  6. Jul 29, 2015
    • H.J. Lu's avatar
      Extend local PLT reference check · 9637d8a2
      H.J. Lu authored
      On x86, linker in binutils 2.26 and newer consolidates R_*_JUMP_SLOT with
      R_*_GLOB_DAT relocation against the same symbol.  This patch extends
      local PLT reference check to support alternate relocations.
      
      	[BZ #18078]
      	* scripts/check-localplt.awk: Support alternate relocations.
      	* scripts/localplt.awk: Also check relocations in DT_RELA/DT_REL
      	sections.
      	* sysdeps/unix/sysv/linux/i386/localplt.data: Mark free and
      	malloc entries with + REL R_386_GLOB_DAT.
      	* sysdeps/x86_64/localplt.data: New file.
      9637d8a2
    • Andrew Senkevich's avatar
      Added runtime check for AVX vector math tests. · febce2ac
      Andrew Senkevich authored
          [BZ #18731]
          * sysdeps/x86_64/fpu/math-tests-arch.h: Added AVX runtime check.
          * sysdeps/x86_64/fpu/test-double-vlen4.c: Likewise.
          * sysdeps/x86_64/fpu/test-float-vlen8.c: Likewise.
      febce2ac
  7. Jul 28, 2015
    • Mike Frysinger's avatar
      ia64: drop __tls_get_addr from expected ld.so plt usage · 95d8f022
      Mike Frysinger authored
      This file was updated with an educated guess as to the symbols needed,
      but on ia64, we don't have __tls_get_addr calls, so drop it from the
      list.
      95d8f022
    • Mike Frysinger's avatar
      ia64: atomic.h: fix atomic_exchange_and_add 64bit handling · cf31a2c7
      Mike Frysinger authored
      Way back in 2005 the atomic_exchange_and_add function was cleaned up to
      avoid the explicit size checking and instead let gcc handle things itself.
      Unfortunately that change ended up leaving beyond a cast to int, even when
      the incoming value was a long.  This has flown under the radar for a long
      time due to the function not being heavily used in the tree (especially as
      a full 64bit field), but a recent change to semaphores made some nptl tests
      fail reliably.  This is due to the code packing two 32bit values into one
      64bit variable (where the high 32bits contained the number of waiters), and
      then the whole variable being atomically updated between threads.  On ia64,
      that meant we never atomically updated the count, so sometimes the sem_post
      would not wake up the waiters.
      cf31a2c7
    • Mike Frysinger's avatar
      ia64: clean up old kernel headers cruft · 18855eca
      Mike Frysinger authored
      This define made more sense in the pre-sanitized kernel headers days,
      but since we require kernel versions that are sanitized, we don't need
      this hack anymore.
      18855eca
    • Mike Frysinger's avatar
      pwd.h: revert __nonnull markings on putpwent [BZ #18641] · 1eb8bf80
      Mike Frysinger authored
      This function actually checks for NULL arguments and the API has been
      tenatively documented as using EINVAL in that case.  We can debate
      leaving it this way, but it should be done after the pending release.
      1eb8bf80
  8. Jul 27, 2015
  9. Jul 26, 2015
  10. Jul 25, 2015
  11. Jul 24, 2015
    • Roland McGrath's avatar
      6b183b83
    • Siddhesh Poyarekar's avatar
      Use IE model for static variables in libc.so, libpthread.so and rtld · e400f3cc
      Siddhesh Poyarekar authored
      The recently introduced TLS variables in the thread-local destructor
      implementation (__cxa_thread_atexit_impl) used the default GD access
      model, resulting in a call to __tls_get_addr.  This causes a deadlock
      with recent changes to the way TLS is initialized because DTV
      allocations are delayed and hence despite knowing the offset to the
      variable inside its TLS block, the thread has to take the global rtld
      lock to safely update the TLS offset.
      
      This causes deadlocks when a thread is instantiated and joined inside
      a destructor of a dlopen'd DSO.  The correct long term fix is to
      somehow not take the lock, but that will need a lot deeper change set
      to alter the way in which the big rtld lock is used.
      
      Instead, this patch just eliminates the call to __tls_get_addr for the
      thread-local variables inside libc.so, libpthread.so and rtld by
      building all of their units with -mtls-model=initial-exec.
      
      There were concerns that the static storage for TLS is limited and
      hence we should not be using it.  Additionally, dynamically loaded
      modules may result in libc.so looking for this static storage pretty
      late in static binaries.  Both concerns are valid when using TLSDESC
      since that is where one may attempt to allocate a TLS block from
      static storage for even those variables that are not IE.  They're not
      very strong arguments for the traditional TLS model though, since it
      assumes that the static storage would be used sparingly and definitely
      not by default.  Hence, for now this would only theoretically affect
      ARM architectures.
      
      The impact is hence limited to statically linked binaries that dlopen
      modules that in turn load libc.so, all that on arm hardware.  It seems
      like a small enough impact to justify fixing the larger problem that
      currently affects everything everywhere.
      
      This still does not solve the original problem completely.  That is,
      it is still possible to deadlock on the big rtld lock with a small
      tweak to the test case attached to this patch.  That problem is
      however not a regression in 2.22 and hence could be tackled as a
      separate project.  The test case is picked up as is from Alex's patch.
      
      This change has been tested to verify that it does not cause any
      issues on x86_64.
      
      ChangeLog:
      
      	[BZ #18457]
      	* nptl/Makefile (tests): New test case tst-join7.
      	(modules-names): New test case module tst-join7mod.
      	* nptl/tst-join7.c: New file.
      	* nptl/tst-join7mod.c: New file.
      	* Makeconfig (tls-model): Pass -ftls-model=initial-exec for
      	all translation units in libc.so, libpthread.so and rtld.
      e400f3cc
    • Adhemerval Zanella's avatar
      Update powerpc-fpu libm-test-ulps. · 48f5f7a6
      Adhemerval Zanella authored
      48f5f7a6
    • Andrew Senkevich's avatar
      Fixed several libmvec bugs found during testing on KNL hardware. · 99017161
      Andrew Senkevich authored
      AVX512 IFUNC implementations, implementations of wrappers to
      AVX2 versions and KNL expf implementation fixed.
      
          * sysdeps/x86_64/fpu/multiarch/svml_d_cos8_core.S: Fixed AVX512 IFUNC.
          * sysdeps/x86_64/fpu/multiarch/svml_d_exp8_core.S: Likewise.
          * sysdeps/x86_64/fpu/multiarch/svml_d_log8_core.S: Likewise.
          * sysdeps/x86_64/fpu/multiarch/svml_d_pow8_core.S: Likewise.
          * sysdeps/x86_64/fpu/multiarch/svml_d_sin8_core.S: Likewise.
          * sysdeps/x86_64/fpu/multiarch/svml_d_sincos8_core.S: Likewise.
          * sysdeps/x86_64/fpu/multiarch/svml_s_cosf16_core.S: Likewise.
          * sysdeps/x86_64/fpu/multiarch/svml_s_expf16_core.S: Likewise.
          * sysdeps/x86_64/fpu/multiarch/svml_s_logf16_core.S: Likewise.
          * sysdeps/x86_64/fpu/multiarch/svml_s_powf16_core.S: Likewise.
          * sysdeps/x86_64/fpu/multiarch/svml_s_sincosf16_core.S: Likewise.
          * sysdeps/x86_64/fpu/multiarch/svml_s_sinf16_core.S: Likewise.
          * sysdeps/x86_64/fpu/svml_d_wrapper_impl.h: Fixed wrappers to AVX2.
          * sysdeps/x86_64/fpu/svml_s_wrapper_impl.h: Likewise.
          * sysdeps/x86_64/fpu/multiarch/svml_s_expf16_core_avx512.S: Fixed KNL
          implementation.
      99017161
    • Szabolcs Nagy's avatar
      [ARM][BZ #17711] Fix extern protected data handling · 3bcea719
      Szabolcs Nagy authored
      Fixes elf/tst-protected1a and elf/tst-protected1b tests.
      
      Depends on a gcc patch that makes protected visibility data non-local:
      https://gcc.gnu.org/ml/gcc-patches/2015-07/msg01871.html
      and on a binutils patch so R_*_GLOB_DAT relocs are used for it:
      https://sourceware.org/ml/binutils/2015-07/msg00247.html
      3bcea719
    • Szabolcs Nagy's avatar
      [AArch64][BZ #17711] Fix extern protected data handling · 0910702c
      Szabolcs Nagy authored
      Fixes elf/tst-protected1a and elf/tst-protected1b tests.
      
      Depends on a gcc patch that makes protected visibility data non-local:
      https://gcc.gnu.org/ml/gcc-patches/2015-07/msg01871.html
      and on a binutils patch so R_*_GLOB_DAT relocs are used for it:
      https://sourceware.org/ml/binutils/2015-07/msg00246.html
      0910702c
    • Siddhesh Poyarekar's avatar
      Mention dl_load_lock by name in the comments · a81a00ff
      Siddhesh Poyarekar authored
      Mention dl_load_lock by name instead of just 'load lock' in the
      comments.  This makes it unambigious which lock we're talking about.
      a81a00ff
    • Roland McGrath's avatar
      b301e68e
  12. Jul 23, 2015
    • Roland McGrath's avatar
      Add SIGWINCH to generic <bits/signum.h>. · 42486917
      Roland McGrath authored
      42486917
    • Roland McGrath's avatar
      NaCl: Fix missing getdtablesize symbol. · f8c3be3f
      Roland McGrath authored
      f8c3be3f
    • Mike Frysinger's avatar
      conform/linknamespace: whitelist matherrf/matherrl · 3840aabc
      Mike Frysinger authored
      glibc supports the deprecated matherr hook for math error reporting.  The
      conform tests take this into consideration and whitelist this symbol when
      running linknamespace tests.
      
      The ia64 libm code has long provided two additional hooks in this space:
      	matherrf (for floats)
      	matherrl (for long doubles)
      
      Which causes the conform tests to fail with chains that all look like:
      	[initial] __atan2 ->
      	[libm.a(e_atan2.o)] __libm_error_support ->
      	[libm.a(libm_error.o)] matherrf
      
      We can't (losslessly) redirect existing usage of these funcs to matherr
      because the structure passed in is different -- matherr uses a struct with
      doubles while matherrf/matherrl use floats and long doubles respectively.
      Plus, this has been part of the exported ABI since glibc-2.2.3, so it
      doesn't feel right to change it so late.
      
      Until we get around to obsoleting matherr entirely, whitelist these two
      additional ia64 symbols.
      3840aabc
    • Mike Frysinger's avatar
      ia64: sigaction.h: fix sa_flags ordering · 992f71dd
      Mike Frysinger authored
      
      Since ia64 is little endian, sa_flags has to come before the padding
      when splitting it from 64bits to 32bits.
      
      Reported-by: default avatarJoseph Myers <joseph@codesourcery.com>
      992f71dd
    • Siddhesh Poyarekar's avatar
      Also use l_tls_dtor_count to decide on object unload (BZ #18657) · 90b37cac
      Siddhesh Poyarekar authored
      When an TLS destructor is registered, we set the DF_1_NODELETE flag to
      signal that the object should not be destroyed.  We then clear the
      DF_1_NODELETE flag when all destructors are called, which is wrong -
      the flag could have been set by other means too.
      
      This patch replaces this use of the flag by using l_tls_dtor_count
      directly to determine whether it is safe to unload the object.  This
      change has the added advantage of eliminating the lock taking when
      calling the destructors, which could result in a deadlock.  The patch
      also fixes the test case tst-tls-atexit - it was making an invalid
      dlclose call, which would just return an error silently.
      
      I have also added a detailed note on concurrency which also aims to
      justify why I chose the semantics I chose for accesses to
      l_tls_dtor_count.  Thanks to Torvald for his help in getting me
      started on this and (literally) teaching my how to approach the
      problem.
      
      Change verified on x86_64; the test suite does not show any
      regressions due to the patch.
      
      ChangeLog:
      
      	[BZ #18657]
      	* elf/dl-close.c (_dl_close_worker): Don't unload DSO if there
      	are pending TLS destructor calls.
      	* include/link.h (struct link_map): Add concurrency note for
      	L_TLS_DTOR_COUNT.
      	* stdlib/cxa_thread_atexit_impl.c (__cxa_thread_atexit_impl):
      	Don't touch the link map flag.  Atomically increment
      	l_tls_dtor_count.
      	(__call_tls_dtors): Atomically decrement l_tls_dtor_count.
      	Avoid taking the load lock and don't touch the link map flag.
      	* stdlib/tst-tls-atexit-nodelete.c: New test case.
      	* stdlib/Makefile (tests): Use it.
      	* stdlib/tst-tls-atexit.c (do_test): dlopen
      	tst-tls-atexit-lib.so again before dlclose.  Add conditionals
      	to allow tst-tls-atexit-nodelete test case to use it.
      90b37cac
  13. Jul 22, 2015
Loading