gcc/libsanitizer/tsan
Markus Trippelsdorf 8c32ae0e6d Fix PR78294 - thread sanitizer broken when using ld.gold
When one uses ld.gold to build gcc, the thread sanitizer doesn't work,
because gold is more conservative when applying TLS relaxations than
ld.bfd. In this case a missing initial-exec attribute on a declaration
causes gcc to assume the general dynamic model. With ld.bfd this gets
relaxed to initial exec when linking the shared library, so the missing
attribute doesn't matter. But ld.gold doesn't perform this optimization
and this leads to crashes on tsan instrumented binaries.

See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78294
and: https://sourceware.org/bugzilla/show_bug.cgi?id=20805

The fix is easy, just add the missing attribute.

  PR sanitizer/78294
  * tsan/tsan_rtl.cc: Add missing attribute.

From-SVN: r242480
2016-11-16 11:21:42 +00:00
..
libtool-version
Makefile.am
Makefile.in
tsan_clock.cc
tsan_clock.h
tsan_debugging.cc
tsan_defs.h
tsan_dense_alloc.h
tsan_fd.cc
tsan_fd.h
tsan_flags.cc
tsan_flags.h
tsan_flags.inc
tsan_ignoreset.cc
tsan_ignoreset.h
tsan_interceptors_mac.cc
tsan_interceptors.cc
tsan_interceptors.h
tsan_interface_ann.cc
tsan_interface_ann.h
tsan_interface_atomic.cc
tsan_interface_inl.h
tsan_interface_java.cc
tsan_interface_java.h
tsan_interface.cc
tsan_interface.h
tsan_libdispatch_mac.cc
tsan_malloc_mac.cc
tsan_md5.cc
tsan_mman.cc
tsan_mman.h
tsan_mutex.cc
tsan_mutex.h
tsan_mutexset.cc
tsan_mutexset.h
tsan_new_delete.cc
tsan_platform_linux.cc
tsan_platform_mac.cc
tsan_platform_posix.cc
tsan_platform_windows.cc
tsan_platform.h
tsan_ppc_regs.h
tsan_preinit.cc
tsan_report.cc
tsan_report.h
tsan_rtl_aarch64.S
tsan_rtl_amd64.S
tsan_rtl_mips64.S
tsan_rtl_mutex.cc
tsan_rtl_ppc64.S
tsan_rtl_proc.cc
tsan_rtl_report.cc
tsan_rtl_thread.cc
tsan_rtl.cc Fix PR78294 - thread sanitizer broken when using ld.gold 2016-11-16 11:21:42 +00:00
tsan_rtl.h
tsan_stack_trace.cc
tsan_stack_trace.h
tsan_stat.cc
tsan_stat.h
tsan_suppressions.cc
tsan_suppressions.h
tsan_symbolize.cc
tsan_symbolize.h
tsan_sync.cc
tsan_sync.h
tsan_trace.h
tsan_update_shadow_word_inl.h
tsan_vector.h