svn commit: r343311 - in projects/clang800-import/contrib/compiler-rt: . include/sanitizer include/xray lib/asan lib/builtins lib/builtins/arm lib/builtins/arm64 lib/builtins/ppc lib/cfi lib/dfsan ...
Dimitry Andric
dim at FreeBSD.org
Tue Jan 22 19:20:32 UTC 2019
Author: dim
Date: Tue Jan 22 19:20:24 2019
New Revision: 343311
URL: https://svnweb.freebsd.org/changeset/base/343311
Log:
Merge compiler-rt trunk r351319, and resolve conflicts.
Added:
projects/clang800-import/contrib/compiler-rt/lib/builtins/ppc/fixunstfti.c
- copied unchanged from r343310, vendor/compiler-rt/dist/lib/builtins/ppc/fixunstfti.c
projects/clang800-import/contrib/compiler-rt/lib/builtins/ppc/floattitf.c
- copied unchanged from r343310, vendor/compiler-rt/dist/lib/builtins/ppc/floattitf.c
projects/clang800-import/contrib/compiler-rt/lib/esan/esan_sideline_bsd.cpp
- copied unchanged from r343310, vendor/compiler-rt/dist/lib/esan/esan_sideline_bsd.cpp
projects/clang800-import/contrib/compiler-rt/lib/fuzzer/FuzzerBuiltins.h
- copied unchanged from r343310, vendor/compiler-rt/dist/lib/fuzzer/FuzzerBuiltins.h
projects/clang800-import/contrib/compiler-rt/lib/fuzzer/FuzzerBuiltinsMsvc.h
- copied unchanged from r343310, vendor/compiler-rt/dist/lib/fuzzer/FuzzerBuiltinsMsvc.h
projects/clang800-import/contrib/compiler-rt/lib/fuzzer/FuzzerExtFunctionsWindows.cpp
- copied unchanged from r343310, vendor/compiler-rt/dist/lib/fuzzer/FuzzerExtFunctionsWindows.cpp
projects/clang800-import/contrib/compiler-rt/lib/hwasan/hwasan_checks.h
- copied unchanged from r343310, vendor/compiler-rt/dist/lib/hwasan/hwasan_checks.h
projects/clang800-import/contrib/compiler-rt/lib/hwasan/hwasan_memintrinsics.cc
- copied unchanged from r343310, vendor/compiler-rt/dist/lib/hwasan/hwasan_memintrinsics.cc
projects/clang800-import/contrib/compiler-rt/lib/hwasan/hwasan_thread_list.cc
- copied unchanged from r343310, vendor/compiler-rt/dist/lib/hwasan/hwasan_thread_list.cc
projects/clang800-import/contrib/compiler-rt/lib/hwasan/hwasan_thread_list.h
- copied unchanged from r343310, vendor/compiler-rt/dist/lib/hwasan/hwasan_thread_list.h
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_local_address_space_view.h
- copied unchanged from r343310, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_local_address_space_view.h
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_netbsd.cc
- copied unchanged from r343310, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_netbsd.cc
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_freebsd.cc
- copied unchanged from r343310, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_platform_limits_freebsd.cc
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_freebsd.h
- copied unchanged from r343310, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_platform_limits_freebsd.h
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_ring_buffer.h
- copied unchanged from r343310, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_ring_buffer.h
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_type_traits.cc
- copied unchanged from r343310, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_type_traits.cc
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_type_traits.h
- copied unchanged from r343310, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_type_traits.h
projects/clang800-import/contrib/compiler-rt/lib/xray/xray_fdr_controller.h
- copied unchanged from r343310, vendor/compiler-rt/dist/lib/xray/xray_fdr_controller.h
projects/clang800-import/contrib/compiler-rt/lib/xray/xray_fdr_log_writer.h
- copied unchanged from r343310, vendor/compiler-rt/dist/lib/xray/xray_fdr_log_writer.h
Deleted:
projects/clang800-import/contrib/compiler-rt/lib/builtins/arm64/
projects/clang800-import/contrib/compiler-rt/lib/fuzzer/FuzzerExtFunctionsDlsymWin.cpp
projects/clang800-import/contrib/compiler-rt/lib/fuzzer/FuzzerExtFunctionsWeakAlias.cpp
Modified:
projects/clang800-import/contrib/compiler-rt/LICENSE.TXT
projects/clang800-import/contrib/compiler-rt/include/sanitizer/allocator_interface.h
projects/clang800-import/contrib/compiler-rt/include/sanitizer/common_interface_defs.h
projects/clang800-import/contrib/compiler-rt/include/sanitizer/hwasan_interface.h
projects/clang800-import/contrib/compiler-rt/include/sanitizer/netbsd_syscall_hooks.h
projects/clang800-import/contrib/compiler-rt/include/xray/xray_log_interface.h
projects/clang800-import/contrib/compiler-rt/lib/asan/asan_allocator.h
projects/clang800-import/contrib/compiler-rt/lib/asan/asan_errors.cc
projects/clang800-import/contrib/compiler-rt/lib/asan/asan_errors.h
projects/clang800-import/contrib/compiler-rt/lib/asan/asan_flags.inc
projects/clang800-import/contrib/compiler-rt/lib/asan/asan_fuchsia.cc
projects/clang800-import/contrib/compiler-rt/lib/asan/asan_globals.cc
projects/clang800-import/contrib/compiler-rt/lib/asan/asan_globals_win.cc
projects/clang800-import/contrib/compiler-rt/lib/asan/asan_internal.h
projects/clang800-import/contrib/compiler-rt/lib/asan/asan_linux.cc
projects/clang800-import/contrib/compiler-rt/lib/asan/asan_malloc_linux.cc
projects/clang800-import/contrib/compiler-rt/lib/asan/asan_malloc_mac.cc
projects/clang800-import/contrib/compiler-rt/lib/asan/asan_malloc_win.cc
projects/clang800-import/contrib/compiler-rt/lib/asan/asan_new_delete.cc
projects/clang800-import/contrib/compiler-rt/lib/asan/asan_posix.cc
projects/clang800-import/contrib/compiler-rt/lib/asan/asan_report.h
projects/clang800-import/contrib/compiler-rt/lib/asan/asan_rtems.cc
projects/clang800-import/contrib/compiler-rt/lib/asan/asan_rtl.cc
projects/clang800-import/contrib/compiler-rt/lib/asan/asan_thread.cc
projects/clang800-import/contrib/compiler-rt/lib/asan/asan_win.cc
projects/clang800-import/contrib/compiler-rt/lib/asan/asan_win_dll_thunk.cc
projects/clang800-import/contrib/compiler-rt/lib/builtins/arm/addsf3.S
projects/clang800-import/contrib/compiler-rt/lib/builtins/arm/aeabi_cdcmp.S
projects/clang800-import/contrib/compiler-rt/lib/builtins/arm/aeabi_cfcmp.S
projects/clang800-import/contrib/compiler-rt/lib/builtins/clzdi2.c
projects/clang800-import/contrib/compiler-rt/lib/builtins/cpu_model.c
projects/clang800-import/contrib/compiler-rt/lib/builtins/ctzdi2.c
projects/clang800-import/contrib/compiler-rt/lib/builtins/divdc3.c
projects/clang800-import/contrib/compiler-rt/lib/builtins/divdf3.c
projects/clang800-import/contrib/compiler-rt/lib/builtins/divsc3.c
projects/clang800-import/contrib/compiler-rt/lib/builtins/divsf3.c
projects/clang800-import/contrib/compiler-rt/lib/builtins/divtc3.c
projects/clang800-import/contrib/compiler-rt/lib/builtins/emutls.c
projects/clang800-import/contrib/compiler-rt/lib/builtins/fp_lib.h
projects/clang800-import/contrib/compiler-rt/lib/builtins/gcc_personality_v0.c
projects/clang800-import/contrib/compiler-rt/lib/builtins/int_lib.h
projects/clang800-import/contrib/compiler-rt/lib/builtins/int_math.h
projects/clang800-import/contrib/compiler-rt/lib/builtins/int_types.h
projects/clang800-import/contrib/compiler-rt/lib/builtins/int_util.c
projects/clang800-import/contrib/compiler-rt/lib/builtins/int_util.h
projects/clang800-import/contrib/compiler-rt/lib/builtins/os_version_check.c
projects/clang800-import/contrib/compiler-rt/lib/builtins/ppc/divtc3.c
projects/clang800-import/contrib/compiler-rt/lib/cfi/cfi.cc
projects/clang800-import/contrib/compiler-rt/lib/cfi/cfi_blacklist.txt
projects/clang800-import/contrib/compiler-rt/lib/dfsan/dfsan.cc
projects/clang800-import/contrib/compiler-rt/lib/esan/esan_interceptors.cpp
projects/clang800-import/contrib/compiler-rt/lib/esan/esan_shadow.h
projects/clang800-import/contrib/compiler-rt/lib/esan/esan_sideline.h
projects/clang800-import/contrib/compiler-rt/lib/fuzzer/FuzzerCommand.h
projects/clang800-import/contrib/compiler-rt/lib/fuzzer/FuzzerCorpus.h
projects/clang800-import/contrib/compiler-rt/lib/fuzzer/FuzzerDefs.h
projects/clang800-import/contrib/compiler-rt/lib/fuzzer/FuzzerDriver.cpp
projects/clang800-import/contrib/compiler-rt/lib/fuzzer/FuzzerExtFunctionsWeak.cpp
projects/clang800-import/contrib/compiler-rt/lib/fuzzer/FuzzerFlags.def
projects/clang800-import/contrib/compiler-rt/lib/fuzzer/FuzzerIO.cpp
projects/clang800-import/contrib/compiler-rt/lib/fuzzer/FuzzerIO.h
projects/clang800-import/contrib/compiler-rt/lib/fuzzer/FuzzerIOPosix.cpp
projects/clang800-import/contrib/compiler-rt/lib/fuzzer/FuzzerIOWindows.cpp
projects/clang800-import/contrib/compiler-rt/lib/fuzzer/FuzzerInternal.h
projects/clang800-import/contrib/compiler-rt/lib/fuzzer/FuzzerLoop.cpp
projects/clang800-import/contrib/compiler-rt/lib/fuzzer/FuzzerMutate.cpp
projects/clang800-import/contrib/compiler-rt/lib/fuzzer/FuzzerMutate.h
projects/clang800-import/contrib/compiler-rt/lib/fuzzer/FuzzerOptions.h
projects/clang800-import/contrib/compiler-rt/lib/fuzzer/FuzzerTracePC.cpp
projects/clang800-import/contrib/compiler-rt/lib/fuzzer/FuzzerTracePC.h
projects/clang800-import/contrib/compiler-rt/lib/fuzzer/FuzzerUtil.h
projects/clang800-import/contrib/compiler-rt/lib/fuzzer/FuzzerUtilFuchsia.cpp
projects/clang800-import/contrib/compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp
projects/clang800-import/contrib/compiler-rt/lib/hwasan/hwasan.cc
projects/clang800-import/contrib/compiler-rt/lib/hwasan/hwasan.h
projects/clang800-import/contrib/compiler-rt/lib/hwasan/hwasan_allocator.cc
projects/clang800-import/contrib/compiler-rt/lib/hwasan/hwasan_allocator.h
projects/clang800-import/contrib/compiler-rt/lib/hwasan/hwasan_dynamic_shadow.cc
projects/clang800-import/contrib/compiler-rt/lib/hwasan/hwasan_flags.h
projects/clang800-import/contrib/compiler-rt/lib/hwasan/hwasan_flags.inc
projects/clang800-import/contrib/compiler-rt/lib/hwasan/hwasan_interceptors.cc
projects/clang800-import/contrib/compiler-rt/lib/hwasan/hwasan_interface_internal.h
projects/clang800-import/contrib/compiler-rt/lib/hwasan/hwasan_linux.cc
projects/clang800-import/contrib/compiler-rt/lib/hwasan/hwasan_mapping.h
projects/clang800-import/contrib/compiler-rt/lib/hwasan/hwasan_new_delete.cc
projects/clang800-import/contrib/compiler-rt/lib/hwasan/hwasan_poisoning.cc
projects/clang800-import/contrib/compiler-rt/lib/hwasan/hwasan_poisoning.h
projects/clang800-import/contrib/compiler-rt/lib/hwasan/hwasan_report.cc
projects/clang800-import/contrib/compiler-rt/lib/hwasan/hwasan_report.h
projects/clang800-import/contrib/compiler-rt/lib/hwasan/hwasan_thread.cc
projects/clang800-import/contrib/compiler-rt/lib/hwasan/hwasan_thread.h
projects/clang800-import/contrib/compiler-rt/lib/interception/interception.h
projects/clang800-import/contrib/compiler-rt/lib/interception/interception_linux.h
projects/clang800-import/contrib/compiler-rt/lib/interception/interception_win.cc
projects/clang800-import/contrib/compiler-rt/lib/lsan/lsan_allocator.cc
projects/clang800-import/contrib/compiler-rt/lib/lsan/lsan_allocator.h
projects/clang800-import/contrib/compiler-rt/lib/lsan/lsan_common_mac.cc
projects/clang800-import/contrib/compiler-rt/lib/lsan/lsan_interceptors.cc
projects/clang800-import/contrib/compiler-rt/lib/msan/msan.cc
projects/clang800-import/contrib/compiler-rt/lib/msan/msan_allocator.cc
projects/clang800-import/contrib/compiler-rt/lib/msan/msan_interceptors.cc
projects/clang800-import/contrib/compiler-rt/lib/msan/msan_linux.cc
projects/clang800-import/contrib/compiler-rt/lib/profile/GCDAProfiling.c
projects/clang800-import/contrib/compiler-rt/lib/profile/InstrProfData.inc
projects/clang800-import/contrib/compiler-rt/lib/profile/InstrProfilingPlatformLinux.c
projects/clang800-import/contrib/compiler-rt/lib/profile/InstrProfilingPlatformOther.c
projects/clang800-import/contrib/compiler-rt/lib/profile/InstrProfilingValue.c
projects/clang800-import/contrib/compiler-rt/lib/profile/WindowsMMap.c
projects/clang800-import/contrib/compiler-rt/lib/profile/WindowsMMap.h
projects/clang800-import/contrib/compiler-rt/lib/safestack/safestack.cc
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_allocator.h
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_allocator_bytemap.h
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_allocator_combined.h
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_allocator_internal.h
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_allocator_primary32.h
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_allocator_primary64.h
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_allocator_secondary.h
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_allocator_size_class_map.h
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_atomic_clang_x86.h
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_common.cc
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_common.h
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_common_libcdep.cc
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_coverage_fuchsia.cc
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_coverage_win_sections.cc
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_file.h
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_flags.inc
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_fuchsia.cc
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_interceptors_ioctl_netbsd.inc
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_libc.cc
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_linux.h
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cc
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_mac.cc
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_mac.h
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_malloc_mac.inc
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_openbsd.cc
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform.h
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_netbsd.h
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_solaris.h
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_posix.cc
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_posix.h
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_posix_libcdep.cc
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_procmaps.h
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_procmaps_bsd.cc
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_procmaps_common.cc
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_procmaps_linux.cc
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_procmaps_mac.cc
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_procmaps_solaris.cc
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_rtems.cc
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_solaris.cc
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_stackdepot.cc
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_stackdepot.h
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.h
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_libcdep.cc
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_printer.cc
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_sparc.cc
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_fuchsia.h
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_syscall_generic.inc
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_syscall_linux_aarch64.inc
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_syscall_linux_arm.inc
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_syscall_linux_x86_64.inc
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_syscalls_netbsd.inc
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_termination.cc
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_thread_registry.cc
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_thread_registry.h
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_unwind_linux_libcdep.cc
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_win.cc
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_win_defs.h
projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/symbolizer/scripts/global_symbols.txt
projects/clang800-import/contrib/compiler-rt/lib/scudo/scudo_allocator.cpp
projects/clang800-import/contrib/compiler-rt/lib/scudo/scudo_allocator.h
projects/clang800-import/contrib/compiler-rt/lib/scudo/scudo_malloc.cpp
projects/clang800-import/contrib/compiler-rt/lib/tsan/rtl/tsan_debugging.cc
projects/clang800-import/contrib/compiler-rt/lib/tsan/rtl/tsan_flags.cc
projects/clang800-import/contrib/compiler-rt/lib/tsan/rtl/tsan_flags.inc
projects/clang800-import/contrib/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc
projects/clang800-import/contrib/compiler-rt/lib/tsan/rtl/tsan_interceptors.h
projects/clang800-import/contrib/compiler-rt/lib/tsan/rtl/tsan_interceptors_mac.cc
projects/clang800-import/contrib/compiler-rt/lib/tsan/rtl/tsan_libdispatch_mac.cc
projects/clang800-import/contrib/compiler-rt/lib/tsan/rtl/tsan_platform.h
projects/clang800-import/contrib/compiler-rt/lib/tsan/rtl/tsan_platform_linux.cc
projects/clang800-import/contrib/compiler-rt/lib/tsan/rtl/tsan_platform_mac.cc
projects/clang800-import/contrib/compiler-rt/lib/tsan/rtl/tsan_report.cc
projects/clang800-import/contrib/compiler-rt/lib/tsan/rtl/tsan_rtl.cc
projects/clang800-import/contrib/compiler-rt/lib/tsan/rtl/tsan_rtl.h
projects/clang800-import/contrib/compiler-rt/lib/tsan/rtl/tsan_rtl_aarch64.S
projects/clang800-import/contrib/compiler-rt/lib/tsan/rtl/tsan_rtl_amd64.S
projects/clang800-import/contrib/compiler-rt/lib/tsan/rtl/tsan_rtl_thread.cc
projects/clang800-import/contrib/compiler-rt/lib/tsan/rtl/tsan_suppressions.cc
projects/clang800-import/contrib/compiler-rt/lib/ubsan/ubsan_checks.inc
projects/clang800-import/contrib/compiler-rt/lib/ubsan/ubsan_flags.inc
projects/clang800-import/contrib/compiler-rt/lib/ubsan/ubsan_handlers.cc
projects/clang800-import/contrib/compiler-rt/lib/ubsan/ubsan_handlers.h
projects/clang800-import/contrib/compiler-rt/lib/ubsan/ubsan_interface.inc
projects/clang800-import/contrib/compiler-rt/lib/ubsan_minimal/ubsan_minimal_handlers.cc
projects/clang800-import/contrib/compiler-rt/lib/xray/xray_allocator.h
projects/clang800-import/contrib/compiler-rt/lib/xray/xray_basic_logging.cc
projects/clang800-import/contrib/compiler-rt/lib/xray/xray_buffer_queue.cc
projects/clang800-import/contrib/compiler-rt/lib/xray/xray_buffer_queue.h
projects/clang800-import/contrib/compiler-rt/lib/xray/xray_defs.h
projects/clang800-import/contrib/compiler-rt/lib/xray/xray_fdr_log_records.h
projects/clang800-import/contrib/compiler-rt/lib/xray/xray_fdr_logging.cc
projects/clang800-import/contrib/compiler-rt/lib/xray/xray_function_call_trie.h
projects/clang800-import/contrib/compiler-rt/lib/xray/xray_init.cc
projects/clang800-import/contrib/compiler-rt/lib/xray/xray_interface.cc
projects/clang800-import/contrib/compiler-rt/lib/xray/xray_profile_collector.cc
projects/clang800-import/contrib/compiler-rt/lib/xray/xray_profile_collector.h
projects/clang800-import/contrib/compiler-rt/lib/xray/xray_profiling.cc
projects/clang800-import/contrib/compiler-rt/lib/xray/xray_profiling_flags.inc
projects/clang800-import/contrib/compiler-rt/lib/xray/xray_segmented_array.h
projects/clang800-import/contrib/compiler-rt/lib/xray/xray_trampoline_x86_64.S
projects/clang800-import/contrib/compiler-rt/lib/xray/xray_tsc.h
projects/clang800-import/contrib/compiler-rt/lib/xray/xray_utils.cc
projects/clang800-import/contrib/compiler-rt/lib/xray/xray_utils.h
projects/clang800-import/contrib/compiler-rt/lib/xray/xray_x86_64.cc
Directory Properties:
projects/clang800-import/contrib/compiler-rt/ (props changed)
projects/clang800-import/contrib/compiler-rt/lib/fuzzer/ (props changed)
Modified: projects/clang800-import/contrib/compiler-rt/LICENSE.TXT
==============================================================================
--- projects/clang800-import/contrib/compiler-rt/LICENSE.TXT Tue Jan 22 19:03:51 2019 (r343310)
+++ projects/clang800-import/contrib/compiler-rt/LICENSE.TXT Tue Jan 22 19:20:24 2019 (r343311)
@@ -14,7 +14,7 @@ Full text of the relevant licenses is included below.
University of Illinois/NCSA
Open Source License
-Copyright (c) 2009-2018 by the contributors listed in CREDITS.TXT
+Copyright (c) 2009-2019 by the contributors listed in CREDITS.TXT
All rights reserved.
Modified: projects/clang800-import/contrib/compiler-rt/include/sanitizer/allocator_interface.h
==============================================================================
--- projects/clang800-import/contrib/compiler-rt/include/sanitizer/allocator_interface.h Tue Jan 22 19:03:51 2019 (r343310)
+++ projects/clang800-import/contrib/compiler-rt/include/sanitizer/allocator_interface.h Tue Jan 22 19:20:24 2019 (r343311)
@@ -82,7 +82,6 @@ extern "C" {
Currently available with ASan only.
*/
void __sanitizer_purge_allocator(void);
-
#ifdef __cplusplus
} // extern "C"
#endif
Modified: projects/clang800-import/contrib/compiler-rt/include/sanitizer/common_interface_defs.h
==============================================================================
--- projects/clang800-import/contrib/compiler-rt/include/sanitizer/common_interface_defs.h Tue Jan 22 19:03:51 2019 (r343310)
+++ projects/clang800-import/contrib/compiler-rt/include/sanitizer/common_interface_defs.h Tue Jan 22 19:20:24 2019 (r343311)
@@ -124,6 +124,12 @@ extern "C" {
// Symbolizes the supplied 'pc' using the format string 'fmt'.
// Outputs at most 'out_buf_size' bytes into 'out_buf'.
+ // If 'out_buf' is not empty then output is zero or more non empty C strings
+ // followed by single empty C string. Multiple strings can be returned if PC
+ // corresponds to inlined function. Inlined frames are printed in the order
+ // from "most-inlined" to the "least-inlined", so the last frame should be the
+ // not inlined function.
+ // Inlined frames can be removed with 'symbolize_inline_frames=0'.
// The format syntax is described in
// lib/sanitizer_common/sanitizer_stacktrace_printer.h.
void __sanitizer_symbolize_pc(void *pc, const char *fmt, char *out_buf,
Modified: projects/clang800-import/contrib/compiler-rt/include/sanitizer/hwasan_interface.h
==============================================================================
--- projects/clang800-import/contrib/compiler-rt/include/sanitizer/hwasan_interface.h Tue Jan 22 19:03:51 2019 (r343310)
+++ projects/clang800-import/contrib/compiler-rt/include/sanitizer/hwasan_interface.h Tue Jan 22 19:20:24 2019 (r343311)
@@ -19,6 +19,12 @@
#ifdef __cplusplus
extern "C" {
#endif
+ // Initialize shadow but not the rest of the runtime.
+ // Does not call libc unless there is an error.
+ // Can be called multiple times, or not at all (in which case shadow will
+ // be initialized in compiler-inserted __hwasan_init() call).
+ void __hwasan_shadow_init(void);
+
// This function may be optionally provided by user and should return
// a string containing HWASan runtime options. See asan_flags.h for details.
const char* __hwasan_default_options(void);
@@ -26,6 +32,51 @@ extern "C" {
void __hwasan_enable_allocator_tagging(void);
void __hwasan_disable_allocator_tagging(void);
+ // Mark region of memory with the given tag. Both address and size need to be
+ // 16-byte aligned.
+ void __hwasan_tag_memory(const volatile void *p, unsigned char tag,
+ size_t size);
+
+ /// Set pointer tag. Previous tag is lost.
+ void *__hwasan_tag_pointer(const volatile void *p, unsigned char tag);
+
+ // Set memory tag from the current SP address to the given address to zero.
+ // This is meant to annotate longjmp and other non-local jumps.
+ // This function needs to know the (almost) exact destination frame address;
+ // clearing shadow for the entire thread stack like __asan_handle_no_return
+ // does would cause false reports.
+ void __hwasan_handle_longjmp(const void *sp_dst);
+
+ // Libc hook for thread creation. Should be called in the child thread before
+ // any instrumented code.
+ void __hwasan_thread_enter();
+
+ // Libc hook for thread destruction. No instrumented code should run after
+ // this call.
+ void __hwasan_thread_exit();
+
+ // Print shadow and origin for the memory range to stderr in a human-readable
+ // format.
+ void __hwasan_print_shadow(const volatile void *x, size_t size);
+
+ // Print one-line report about the memory usage of the current process.
+ void __hwasan_print_memory_usage();
+
+ int __sanitizer_posix_memalign(void **memptr, size_t alignment, size_t size);
+ void * __sanitizer_memalign(size_t alignment, size_t size);
+ void * __sanitizer_aligned_alloc(size_t alignment, size_t size);
+ void * __sanitizer___libc_memalign(size_t alignment, size_t size);
+ void * __sanitizer_valloc(size_t size);
+ void * __sanitizer_pvalloc(size_t size);
+ void __sanitizer_free(void *ptr);
+ void __sanitizer_cfree(void *ptr);
+ size_t __sanitizer_malloc_usable_size(const void *ptr);
+ struct mallinfo __sanitizer_mallinfo();
+ int __sanitizer_mallopt(int cmd, int value);
+ void __sanitizer_malloc_stats(void);
+ void * __sanitizer_calloc(size_t nmemb, size_t size);
+ void * __sanitizer_realloc(void *ptr, size_t size);
+ void * __sanitizer_malloc(size_t size);
#ifdef __cplusplus
} // extern "C"
#endif
Modified: projects/clang800-import/contrib/compiler-rt/include/sanitizer/netbsd_syscall_hooks.h
==============================================================================
--- projects/clang800-import/contrib/compiler-rt/include/sanitizer/netbsd_syscall_hooks.h Tue Jan 22 19:03:51 2019 (r343310)
+++ projects/clang800-import/contrib/compiler-rt/include/sanitizer/netbsd_syscall_hooks.h Tue Jan 22 19:20:24 2019 (r343311)
@@ -21,8 +21,8 @@
// DO NOT EDIT! THIS FILE HAS BEEN GENERATED!
//
// Generated with: generate_netbsd_syscalls.awk
-// Generated date: 2018-03-03
-// Generated from: syscalls.master,v 1.291 2018/01/06 16:41:23 kamil Exp
+// Generated date: 2018-10-30
+// Generated from: syscalls.master,v 1.293 2018/07/31 13:00:13 rjs Exp
//
//===----------------------------------------------------------------------===//
#ifndef SANITIZER_NETBSD_SYSCALL_HOOKS_H
@@ -986,7 +986,15 @@
#define __sanitizer_syscall_post_fpathconf(res, fd, name) \
__sanitizer_syscall_post_impl_fpathconf(res, (long long)(fd), \
(long long)(name))
-/* syscall 193 has been skipped */
+#define __sanitizer_syscall_pre_getsockopt2(s, level, name, val, avalsize) \
+ __sanitizer_syscall_pre_impl_getsockopt2( \
+ (long long)(s), (long long)(level), (long long)(name), (long long)(val), \
+ (long long)(avalsize))
+#define __sanitizer_syscall_post_getsockopt2(res, s, level, name, val, \
+ avalsize) \
+ __sanitizer_syscall_post_impl_getsockopt2( \
+ res, (long long)(s), (long long)(level), (long long)(name), \
+ (long long)(val), (long long)(avalsize))
#define __sanitizer_syscall_pre_getrlimit(which, rlp) \
__sanitizer_syscall_pre_impl_getrlimit((long long)(which), (long long)(rlp))
#define __sanitizer_syscall_post_getrlimit(res, which, rlp) \
@@ -1752,18 +1760,8 @@
__sanitizer_syscall_post_impl___sigaction_sigtramp( \
res, (long long)(signum), (long long)(nsa), (long long)(osa), \
(long long)(tramp), (long long)(vers))
-#define __sanitizer_syscall_pre_pmc_get_info(ctr, op, args) \
- __sanitizer_syscall_pre_impl_pmc_get_info((long long)(ctr), (long long)(op), \
- (long long)(args))
-#define __sanitizer_syscall_post_pmc_get_info(res, ctr, op, args) \
- __sanitizer_syscall_post_impl_pmc_get_info( \
- res, (long long)(ctr), (long long)(op), (long long)(args))
-#define __sanitizer_syscall_pre_pmc_control(ctr, op, args) \
- __sanitizer_syscall_pre_impl_pmc_control((long long)(ctr), (long long)(op), \
- (long long)(args))
-#define __sanitizer_syscall_post_pmc_control(res, ctr, op, args) \
- __sanitizer_syscall_post_impl_pmc_control( \
- res, (long long)(ctr), (long long)(op), (long long)(args))
+/* syscall 341 has been skipped */
+/* syscall 342 has been skipped */
#define __sanitizer_syscall_pre_rasctl(addr, len, op) \
__sanitizer_syscall_pre_impl_rasctl((long long)(addr), (long long)(len), \
(long long)(op))
@@ -3444,7 +3442,13 @@ void __sanitizer_syscall_post_impl_pathconf(long long
void __sanitizer_syscall_pre_impl_fpathconf(long long fd, long long name);
void __sanitizer_syscall_post_impl_fpathconf(long long res, long long fd,
long long name);
-/* syscall 193 has been skipped */
+void __sanitizer_syscall_pre_impl_getsockopt2(long long s, long long level,
+ long long name, long long val,
+ long long avalsize);
+void __sanitizer_syscall_post_impl_getsockopt2(long long res, long long s,
+ long long level, long long name,
+ long long val,
+ long long avalsize);
void __sanitizer_syscall_pre_impl_getrlimit(long long which, long long rlp);
void __sanitizer_syscall_post_impl_getrlimit(long long res, long long which,
long long rlp);
@@ -4001,14 +4005,8 @@ void __sanitizer_syscall_pre_impl___sigaction_sigtramp
void __sanitizer_syscall_post_impl___sigaction_sigtramp(
long long res, long long signum, long long nsa, long long osa,
long long tramp, long long vers);
-void __sanitizer_syscall_pre_impl_pmc_get_info(long long ctr, long long op,
- long long args);
-void __sanitizer_syscall_post_impl_pmc_get_info(long long res, long long ctr,
- long long op, long long args);
-void __sanitizer_syscall_pre_impl_pmc_control(long long ctr, long long op,
- long long args);
-void __sanitizer_syscall_post_impl_pmc_control(long long res, long long ctr,
- long long op, long long args);
+/* syscall 341 has been skipped */
+/* syscall 342 has been skipped */
void __sanitizer_syscall_pre_impl_rasctl(long long addr, long long len,
long long op);
void __sanitizer_syscall_post_impl_rasctl(long long res, long long addr,
Modified: projects/clang800-import/contrib/compiler-rt/include/xray/xray_log_interface.h
==============================================================================
--- projects/clang800-import/contrib/compiler-rt/include/xray/xray_log_interface.h Tue Jan 22 19:03:51 2019 (r343310)
+++ projects/clang800-import/contrib/compiler-rt/include/xray/xray_log_interface.h Tue Jan 22 19:20:24 2019 (r343311)
@@ -158,8 +158,8 @@ struct XRayLogImpl {
/// The log initialization routine provided by the implementation, always
/// provided with the following parameters:
///
- /// - buffer size
- /// - maximum number of buffers
+ /// - buffer size (unused)
+ /// - maximum number of buffers (unused)
/// - a pointer to an argument struct that the implementation MUST handle
/// - the size of the argument struct
///
@@ -354,26 +354,5 @@ XRayLogFlushStatus __xray_log_process_buffers(void (*P
XRayBuffer));
} // extern "C"
-
-namespace __xray {
-
-/// DEPRECATED: Use __xray_log_init_mode(...) instead, and provide flag
-/// configuration strings to set the options instead.
-/// Options used by the LLVM XRay FDR logging implementation.
-struct FDRLoggingOptions {
- bool ReportErrors = false;
- int Fd = -1;
-};
-
-/// DEPRECATED: Use __xray_log_init_mode(...) instead, and provide flag
-/// configuration strings to set the options instead.
-/// Options used by the LLVM XRay Basic (Naive) logging implementation.
-struct BasicLoggingOptions {
- int DurationFilterMicros = 0;
- size_t MaxStackDepth = 0;
- size_t ThreadBufferSize = 0;
-};
-
-} // namespace __xray
#endif // XRAY_XRAY_LOG_INTERFACE_H
Modified: projects/clang800-import/contrib/compiler-rt/lib/asan/asan_allocator.h
==============================================================================
--- projects/clang800-import/contrib/compiler-rt/lib/asan/asan_allocator.h Tue Jan 22 19:03:51 2019 (r343310)
+++ projects/clang800-import/contrib/compiler-rt/lib/asan/asan_allocator.h Tue Jan 22 19:20:24 2019 (r343311)
@@ -148,6 +148,7 @@ const uptr kAllocatorSpace = 0x600000000000ULL;
const uptr kAllocatorSize = 0x40000000000ULL; // 4T.
typedef DefaultSizeClassMap SizeClassMap;
# endif
+template <typename AddressSpaceViewTy>
struct AP64 { // Allocator64 parameters. Deliberately using a short name.
static const uptr kSpaceBeg = kAllocatorSpace;
static const uptr kSpaceSize = kAllocatorSize;
@@ -155,37 +156,57 @@ struct AP64 { // Allocator64 parameters. Deliberately
typedef __asan::SizeClassMap SizeClassMap;
typedef AsanMapUnmapCallback MapUnmapCallback;
static const uptr kFlags = 0;
+ using AddressSpaceView = AddressSpaceViewTy;
};
-typedef SizeClassAllocator64<AP64> PrimaryAllocator;
+template <typename AddressSpaceView>
+using PrimaryAllocatorASVT = SizeClassAllocator64<AP64<AddressSpaceView>>;
+using PrimaryAllocator = PrimaryAllocatorASVT<LocalAddressSpaceView>;
#else // Fallback to SizeClassAllocator32.
static const uptr kRegionSizeLog = 20;
static const uptr kNumRegions = SANITIZER_MMAP_RANGE_SIZE >> kRegionSizeLog;
# if SANITIZER_WORDSIZE == 32
-typedef FlatByteMap<kNumRegions> ByteMap;
+template <typename AddressSpaceView>
+using ByteMapASVT = FlatByteMap<kNumRegions, AddressSpaceView>;
# elif SANITIZER_WORDSIZE == 64
-typedef TwoLevelByteMap<(kNumRegions >> 12), 1 << 12> ByteMap;
+template <typename AddressSpaceView>
+using ByteMapASVT =
+ TwoLevelByteMap<(kNumRegions >> 12), 1 << 12, AddressSpaceView>;
# endif
typedef CompactSizeClassMap SizeClassMap;
+template <typename AddressSpaceViewTy>
struct AP32 {
static const uptr kSpaceBeg = 0;
static const u64 kSpaceSize = SANITIZER_MMAP_RANGE_SIZE;
static const uptr kMetadataSize = 16;
typedef __asan::SizeClassMap SizeClassMap;
static const uptr kRegionSizeLog = __asan::kRegionSizeLog;
- typedef __asan::ByteMap ByteMap;
+ using AddressSpaceView = AddressSpaceViewTy;
+ using ByteMap = __asan::ByteMapASVT<AddressSpaceView>;
typedef AsanMapUnmapCallback MapUnmapCallback;
static const uptr kFlags = 0;
};
-typedef SizeClassAllocator32<AP32> PrimaryAllocator;
+template <typename AddressSpaceView>
+using PrimaryAllocatorASVT = SizeClassAllocator32<AP32<AddressSpaceView> >;
+using PrimaryAllocator = PrimaryAllocatorASVT<LocalAddressSpaceView>;
#endif // SANITIZER_CAN_USE_ALLOCATOR64
static const uptr kNumberOfSizeClasses = SizeClassMap::kNumClasses;
-typedef SizeClassAllocatorLocalCache<PrimaryAllocator> AllocatorCache;
-typedef LargeMmapAllocator<AsanMapUnmapCallback> SecondaryAllocator;
-typedef CombinedAllocator<PrimaryAllocator, AllocatorCache,
- SecondaryAllocator> AsanAllocator;
+template <typename AddressSpaceView>
+using AllocatorCacheASVT =
+ SizeClassAllocatorLocalCache<PrimaryAllocatorASVT<AddressSpaceView>>;
+using AllocatorCache = AllocatorCacheASVT<LocalAddressSpaceView>;
+template <typename AddressSpaceView>
+using SecondaryAllocatorASVT =
+ LargeMmapAllocator<AsanMapUnmapCallback, DefaultLargeMmapAllocatorPtrArray,
+ AddressSpaceView>;
+template <typename AddressSpaceView>
+using AsanAllocatorASVT =
+ CombinedAllocator<PrimaryAllocatorASVT<AddressSpaceView>,
+ AllocatorCacheASVT<AddressSpaceView>,
+ SecondaryAllocatorASVT<AddressSpaceView>>;
+using AsanAllocator = AsanAllocatorASVT<LocalAddressSpaceView>;
struct AsanThreadLocalMallocStorage {
uptr quarantine_cache[16];
Modified: projects/clang800-import/contrib/compiler-rt/lib/asan/asan_errors.cc
==============================================================================
--- projects/clang800-import/contrib/compiler-rt/lib/asan/asan_errors.cc Tue Jan 22 19:03:51 2019 (r343310)
+++ projects/clang800-import/contrib/compiler-rt/lib/asan/asan_errors.cc Tue Jan 22 19:20:24 2019 (r343311)
@@ -125,9 +125,8 @@ void ErrorAllocTypeMismatch::Print() {
Decorator d;
Printf("%s", d.Error());
Report("ERROR: AddressSanitizer: %s (%s vs %s) on %p\n",
- scariness.GetDescription(),
- alloc_names[alloc_type], dealloc_names[dealloc_type],
- addr_description.addr);
+ scariness.GetDescription(), alloc_names[alloc_type],
+ dealloc_names[dealloc_type], addr_description.Address());
Printf("%s", d.Default());
CHECK_GT(dealloc_stack->size, 0);
scariness.Print();
Modified: projects/clang800-import/contrib/compiler-rt/lib/asan/asan_errors.h
==============================================================================
--- projects/clang800-import/contrib/compiler-rt/lib/asan/asan_errors.h Tue Jan 22 19:03:51 2019 (r343310)
+++ projects/clang800-import/contrib/compiler-rt/lib/asan/asan_errors.h Tue Jan 22 19:20:24 2019 (r343311)
@@ -110,8 +110,8 @@ struct ErrorFreeNotMalloced : ErrorBase {
struct ErrorAllocTypeMismatch : ErrorBase {
const BufferedStackTrace *dealloc_stack;
- HeapAddressDescription addr_description;
AllocType alloc_type, dealloc_type;
+ AddressDescription addr_description;
ErrorAllocTypeMismatch() = default; // (*)
ErrorAllocTypeMismatch(u32 tid, BufferedStackTrace *stack, uptr addr,
@@ -119,9 +119,8 @@ struct ErrorAllocTypeMismatch : ErrorBase {
: ErrorBase(tid, 10, "alloc-dealloc-mismatch"),
dealloc_stack(stack),
alloc_type(alloc_type_),
- dealloc_type(dealloc_type_) {
- GetHeapAddressInformation(addr, 1, &addr_description);
- };
+ dealloc_type(dealloc_type_),
+ addr_description(addr, 1, false) {}
void Print();
};
Modified: projects/clang800-import/contrib/compiler-rt/lib/asan/asan_flags.inc
==============================================================================
--- projects/clang800-import/contrib/compiler-rt/lib/asan/asan_flags.inc Tue Jan 22 19:03:51 2019 (r343310)
+++ projects/clang800-import/contrib/compiler-rt/lib/asan/asan_flags.inc Tue Jan 22 19:20:24 2019 (r343311)
@@ -152,8 +152,6 @@ ASAN_FLAG(const char *, suppressions, "", "Suppression
ASAN_FLAG(bool, halt_on_error, true,
"Crash the program after printing the first error report "
"(WARNING: USE AT YOUR OWN RISK!)")
-ASAN_FLAG(bool, use_odr_indicator, false,
- "Use special ODR indicator symbol for ODR violation detection")
ASAN_FLAG(bool, allocator_frees_and_returns_null_on_realloc_zero, true,
"realloc(p, 0) is equivalent to free(p) by default (Same as the "
"POSIX standard). If set to false, realloc(p, 0) will return a "
Modified: projects/clang800-import/contrib/compiler-rt/lib/asan/asan_fuchsia.cc
==============================================================================
--- projects/clang800-import/contrib/compiler-rt/lib/asan/asan_fuchsia.cc Tue Jan 22 19:03:51 2019 (r343310)
+++ projects/clang800-import/contrib/compiler-rt/lib/asan/asan_fuchsia.cc Tue Jan 22 19:20:24 2019 (r343311)
@@ -190,6 +190,13 @@ static void ThreadExitHook(void *hook, uptr os_id) {
AsanThread::TSDDtor(per_thread);
}
+bool HandleDlopenInit() {
+ // Not supported on this platform.
+ static_assert(!SANITIZER_SUPPORTS_INIT_FOR_DLOPEN,
+ "Expected SANITIZER_SUPPORTS_INIT_FOR_DLOPEN to be false");
+ return false;
+}
+
} // namespace __asan
// These are declared (in extern "C") by <zircon/sanitizer.h>.
Modified: projects/clang800-import/contrib/compiler-rt/lib/asan/asan_globals.cc
==============================================================================
--- projects/clang800-import/contrib/compiler-rt/lib/asan/asan_globals.cc Tue Jan 22 19:03:51 2019 (r343310)
+++ projects/clang800-import/contrib/compiler-rt/lib/asan/asan_globals.cc Tue Jan 22 19:20:24 2019 (r343311)
@@ -83,9 +83,11 @@ static bool IsAddressNearGlobal(uptr addr, const __asa
}
static void ReportGlobal(const Global &g, const char *prefix) {
- Report("%s Global[%p]: beg=%p size=%zu/%zu name=%s module=%s dyn_init=%zu\n",
- prefix, &g, (void *)g.beg, g.size, g.size_with_redzone, g.name,
- g.module_name, g.has_dynamic_init);
+ Report(
+ "%s Global[%p]: beg=%p size=%zu/%zu name=%s module=%s dyn_init=%zu "
+ "odr_indicator=%p\n",
+ prefix, &g, (void *)g.beg, g.size, g.size_with_redzone, g.name,
+ g.module_name, g.has_dynamic_init, (void *)g.odr_indicator);
if (g.location) {
Report(" location (%p): name=%s[%p], %d %d\n", g.location,
g.location->filename, g.location->filename, g.location->line_no,
@@ -133,6 +135,9 @@ enum GlobalSymbolState {
// this method in case compiler instruments global variables through their
// local aliases.
static void CheckODRViolationViaIndicator(const Global *g) {
+ // Instrumentation requests to skip ODR check.
+ if (g->odr_indicator == UINTPTR_MAX)
+ return;
u8 *odr_indicator = reinterpret_cast<u8 *>(g->odr_indicator);
if (*odr_indicator == UNREGISTERED) {
*odr_indicator = REGISTERED;
@@ -183,9 +188,7 @@ static void CheckODRViolationViaPoisoning(const Global
// This routine chooses between two different methods of ODR violation
// detection.
static inline bool UseODRIndicator(const Global *g) {
- // Use ODR indicator method iff use_odr_indicator flag is set and
- // indicator symbol address is not 0.
- return flags()->use_odr_indicator && g->odr_indicator > 0;
+ return g->odr_indicator > 0;
}
// Register a global variable.
@@ -248,7 +251,7 @@ static void UnregisterGlobal(const Global *g) {
// implementation. It might not be worth doing anyway.
// Release ODR indicator.
- if (UseODRIndicator(g)) {
+ if (UseODRIndicator(g) && g->odr_indicator != UINTPTR_MAX) {
u8 *odr_indicator = reinterpret_cast<u8 *>(g->odr_indicator);
*odr_indicator = UNREGISTERED;
}
Modified: projects/clang800-import/contrib/compiler-rt/lib/asan/asan_globals_win.cc
==============================================================================
--- projects/clang800-import/contrib/compiler-rt/lib/asan/asan_globals_win.cc Tue Jan 22 19:03:51 2019 (r343310)
+++ projects/clang800-import/contrib/compiler-rt/lib/asan/asan_globals_win.cc Tue Jan 22 19:20:24 2019 (r343311)
@@ -29,7 +29,7 @@ static void call_on_globals(void (*hook)(__asan_global
__asan_global *end = &__asan_globals_end;
uptr bytediff = (uptr)end - (uptr)start;
if (bytediff % sizeof(__asan_global) != 0) {
-#ifdef SANITIZER_DLL_THUNK
+#if defined(SANITIZER_DLL_THUNK) || defined(SANITIZER_DYNAMIC_RUNTIME_THUNK)
__debugbreak();
#else
CHECK("corrupt asan global array");
Modified: projects/clang800-import/contrib/compiler-rt/lib/asan/asan_internal.h
==============================================================================
--- projects/clang800-import/contrib/compiler-rt/lib/asan/asan_internal.h Tue Jan 22 19:03:51 2019 (r343310)
+++ projects/clang800-import/contrib/compiler-rt/lib/asan/asan_internal.h Tue Jan 22 19:20:24 2019 (r343311)
@@ -111,6 +111,11 @@ void *AsanDlSymNext(const char *sym);
void ReserveShadowMemoryRange(uptr beg, uptr end, const char *name);
+// Returns `true` iff most of ASan init process should be skipped due to the
+// ASan library being loaded via `dlopen()`. Platforms may perform any
+// `dlopen()` specific initialization inside this function.
+bool HandleDlopenInit();
+
// Add convenient macro for interface functions that may be represented as
// weak hooks.
#define ASAN_MALLOC_HOOK(ptr, size) \
Modified: projects/clang800-import/contrib/compiler-rt/lib/asan/asan_linux.cc
==============================================================================
--- projects/clang800-import/contrib/compiler-rt/lib/asan/asan_linux.cc Tue Jan 22 19:03:51 2019 (r343310)
+++ projects/clang800-import/contrib/compiler-rt/lib/asan/asan_linux.cc Tue Jan 22 19:20:24 2019 (r343311)
@@ -248,6 +248,13 @@ void *AsanDlSymNext(const char *sym) {
return dlsym(RTLD_NEXT, sym);
}
+bool HandleDlopenInit() {
+ // Not supported on this platform.
+ static_assert(!SANITIZER_SUPPORTS_INIT_FOR_DLOPEN,
+ "Expected SANITIZER_SUPPORTS_INIT_FOR_DLOPEN to be false");
+ return false;
+}
+
} // namespace __asan
#endif // SANITIZER_FREEBSD || SANITIZER_LINUX || SANITIZER_NETBSD ||
Modified: projects/clang800-import/contrib/compiler-rt/lib/asan/asan_malloc_linux.cc
==============================================================================
--- projects/clang800-import/contrib/compiler-rt/lib/asan/asan_malloc_linux.cc Tue Jan 22 19:03:51 2019 (r343310)
+++ projects/clang800-import/contrib/compiler-rt/lib/asan/asan_malloc_linux.cc Tue Jan 22 19:20:24 2019 (r343311)
@@ -209,7 +209,7 @@ INTERCEPTOR(struct fake_mallinfo, mallinfo, void) {
}
INTERCEPTOR(int, mallopt, int cmd, int value) {
- return -1;
+ return 0;
}
#endif // SANITIZER_INTERCEPT_MALLOPT_AND_MALLINFO
Modified: projects/clang800-import/contrib/compiler-rt/lib/asan/asan_malloc_mac.cc
==============================================================================
--- projects/clang800-import/contrib/compiler-rt/lib/asan/asan_malloc_mac.cc Tue Jan 22 19:03:51 2019 (r343310)
+++ projects/clang800-import/contrib/compiler-rt/lib/asan/asan_malloc_mac.cc Tue Jan 22 19:20:24 2019 (r343311)
@@ -61,4 +61,25 @@ using namespace __asan;
#include "sanitizer_common/sanitizer_malloc_mac.inc"
+namespace COMMON_MALLOC_NAMESPACE {
+bool HandleDlopenInit() {
+ static_assert(SANITIZER_SUPPORTS_INIT_FOR_DLOPEN,
+ "Expected SANITIZER_SUPPORTS_INIT_FOR_DLOPEN to be true");
+ // We have no reliable way of knowing how we are being loaded
+ // so make it a requirement on Apple platforms to set this environment
+ // variable to indicate that we want to perform initialization via
+ // dlopen().
+ auto init_str = GetEnv("APPLE_ASAN_INIT_FOR_DLOPEN");
+ if (!init_str)
+ return false;
+ if (internal_strncmp(init_str, "1", 1) != 0)
+ return false;
+ // When we are loaded via `dlopen()` path we still initialize the malloc zone
+ // so Symbolication clients (e.g. `leaks`) that load the ASan allocator can
+ // find an initialized malloc zone.
+ InitMallocZoneFields();
+ return true;
+}
+} // namespace COMMON_MALLOC_NAMESPACE
+
#endif
Modified: projects/clang800-import/contrib/compiler-rt/lib/asan/asan_malloc_win.cc
==============================================================================
--- projects/clang800-import/contrib/compiler-rt/lib/asan/asan_malloc_win.cc Tue Jan 22 19:03:51 2019 (r343310)
+++ projects/clang800-import/contrib/compiler-rt/lib/asan/asan_malloc_win.cc Tue Jan 22 19:20:24 2019 (r343311)
@@ -14,9 +14,18 @@
#include "sanitizer_common/sanitizer_platform.h"
#if SANITIZER_WINDOWS
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
+// Intentionally not including windows.h here, to avoid the risk of
+// pulling in conflicting declarations of these functions. (With mingw-w64,
+// there's a risk of windows.h pulling in stdint.h.)
+typedef int BOOL;
+typedef void *HANDLE;
+typedef const void *LPCVOID;
+typedef void *LPVOID;
+#define HEAP_ZERO_MEMORY 0x00000008
+#define HEAP_REALLOC_IN_PLACE_ONLY 0x00000010
+
+
#include "asan_allocator.h"
#include "asan_interceptors.h"
#include "asan_internal.h"
@@ -125,13 +134,18 @@ void *_recalloc_base(void *p, size_t n, size_t elem_si
}
ALLOCATION_FUNCTION_ATTRIBUTE
-size_t _msize(const void *ptr) {
+size_t _msize(void *ptr) {
GET_CURRENT_PC_BP_SP;
(void)sp;
return asan_malloc_usable_size(ptr, pc, bp);
}
ALLOCATION_FUNCTION_ATTRIBUTE
+size_t _msize_base(void *ptr) {
+ return _msize(ptr);
+}
+
+ALLOCATION_FUNCTION_ATTRIBUTE
void *_expand(void *memblock, size_t size) {
// _expand is used in realloc-like functions to resize the buffer if possible.
// We don't want memory to stand still while resizing buffers, so return 0.
@@ -226,6 +240,7 @@ void ReplaceSystemMalloc() {
TryToOverrideFunction("_recalloc_base", (uptr)_recalloc);
TryToOverrideFunction("_recalloc_crt", (uptr)_recalloc);
TryToOverrideFunction("_msize", (uptr)_msize);
+ TryToOverrideFunction("_msize_base", (uptr)_msize);
TryToOverrideFunction("_expand", (uptr)_expand);
TryToOverrideFunction("_expand_base", (uptr)_expand);
Modified: projects/clang800-import/contrib/compiler-rt/lib/asan/asan_new_delete.cc
==============================================================================
--- projects/clang800-import/contrib/compiler-rt/lib/asan/asan_new_delete.cc Tue Jan 22 19:03:51 2019 (r343310)
+++ projects/clang800-import/contrib/compiler-rt/lib/asan/asan_new_delete.cc Tue Jan 22 19:20:24 2019 (r343311)
@@ -26,7 +26,7 @@
// anyway by passing extra -export flags to the linker, which is exactly that
// dllexport would normally do. We need to export them in order to make the
// VS2015 dynamic CRT (MD) work.
-#if SANITIZER_WINDOWS
+#if SANITIZER_WINDOWS && defined(_MSC_VER)
#define CXX_OPERATOR_ATTRIBUTE
#define COMMENT_EXPORT(sym) __pragma(comment(linker, "/export:" sym))
#ifdef _WIN64
Modified: projects/clang800-import/contrib/compiler-rt/lib/asan/asan_posix.cc
==============================================================================
--- projects/clang800-import/contrib/compiler-rt/lib/asan/asan_posix.cc Tue Jan 22 19:03:51 2019 (r343310)
+++ projects/clang800-import/contrib/compiler-rt/lib/asan/asan_posix.cc Tue Jan 22 19:20:24 2019 (r343311)
@@ -40,6 +40,51 @@ void AsanOnDeadlySignal(int signo, void *siginfo, void
// ---------------------- TSD ---------------- {{{1
+#if SANITIZER_NETBSD || SANITIZER_FREEBSD
+// Thread Static Data cannot be used in early init on NetBSD and FreeBSD.
+// Reuse the Asan TSD API for compatibility with existing code
+// with an alternative implementation.
+
+static void (*tsd_destructor)(void *tsd) = nullptr;
+
+struct tsd_key {
+ tsd_key() : key(nullptr) {}
+ ~tsd_key() {
+ CHECK(tsd_destructor);
+ if (key)
+ (*tsd_destructor)(key);
+ }
+ void *key;
+};
+
+static thread_local struct tsd_key key;
+
+void AsanTSDInit(void (*destructor)(void *tsd)) {
+ CHECK(!tsd_destructor);
+ tsd_destructor = destructor;
+}
+
+void *AsanTSDGet() {
+ CHECK(tsd_destructor);
+ return key.key;
+}
+
+void AsanTSDSet(void *tsd) {
+ CHECK(tsd_destructor);
+ CHECK(tsd);
+ CHECK(!key.key);
+ key.key = tsd;
+}
+
+void PlatformTSDDtor(void *tsd) {
+ CHECK(tsd_destructor);
+ CHECK_EQ(key.key, tsd);
+ key.key = nullptr;
+ // Make sure that signal handler can not see a stale current thread pointer.
+ atomic_signal_fence(memory_order_seq_cst);
+ AsanThread::TSDDtor(tsd);
+}
+#else
static pthread_key_t tsd_key;
static bool tsd_key_inited = false;
void AsanTSDInit(void (*destructor)(void *tsd)) {
@@ -67,6 +112,7 @@ void PlatformTSDDtor(void *tsd) {
}
AsanThread::TSDDtor(tsd);
}
+#endif
} // namespace __asan
#endif // SANITIZER_POSIX
Modified: projects/clang800-import/contrib/compiler-rt/lib/asan/asan_report.h
==============================================================================
--- projects/clang800-import/contrib/compiler-rt/lib/asan/asan_report.h Tue Jan 22 19:03:51 2019 (r343310)
+++ projects/clang800-import/contrib/compiler-rt/lib/asan/asan_report.h Tue Jan 22 19:20:24 2019 (r343311)
@@ -12,6 +12,9 @@
// ASan-private header for error reporting functions.
//===----------------------------------------------------------------------===//
+#ifndef ASAN_REPORT_H
+#define ASAN_REPORT_H
+
#include "asan_allocator.h"
#include "asan_internal.h"
#include "asan_thread.h"
@@ -92,3 +95,4 @@ void ReportMacCfReallocUnknown(uptr addr, uptr zone_pt
BufferedStackTrace *stack);
} // namespace __asan
+#endif // ASAN_REPORT_H
Modified: projects/clang800-import/contrib/compiler-rt/lib/asan/asan_rtems.cc
==============================================================================
--- projects/clang800-import/contrib/compiler-rt/lib/asan/asan_rtems.cc Tue Jan 22 19:03:51 2019 (r343310)
+++ projects/clang800-import/contrib/compiler-rt/lib/asan/asan_rtems.cc Tue Jan 22 19:20:24 2019 (r343311)
@@ -213,6 +213,12 @@ static void HandleExit() {
}
}
+bool HandleDlopenInit() {
+ // Not supported on this platform.
+ static_assert(!SANITIZER_SUPPORTS_INIT_FOR_DLOPEN,
+ "Expected SANITIZER_SUPPORTS_INIT_FOR_DLOPEN to be false");
+ return false;
+}
} // namespace __asan
// These are declared (in extern "C") by <some_path/sanitizer.h>.
Modified: projects/clang800-import/contrib/compiler-rt/lib/asan/asan_rtl.cc
==============================================================================
--- projects/clang800-import/contrib/compiler-rt/lib/asan/asan_rtl.cc Tue Jan 22 19:03:51 2019 (r343310)
+++ projects/clang800-import/contrib/compiler-rt/lib/asan/asan_rtl.cc Tue Jan 22 19:20:24 2019 (r343311)
@@ -383,6 +383,19 @@ void PrintAddressSpaceLayout() {
kHighShadowBeg > kMidMemEnd);
}
+#if defined(__thumb__) && defined(__linux__)
+#define START_BACKGROUND_THREAD_IN_ASAN_INTERNAL
+#endif
+
+#ifndef START_BACKGROUND_THREAD_IN_ASAN_INTERNAL
+static bool UNUSED __local_asan_dyninit = [] {
+ MaybeStartBackgroudThread();
+ SetSoftRssLimitExceededCallback(AsanSoftRssLimitExceededCallback);
+
+ return false;
+}();
+#endif
+
static void AsanInitInternal() {
if (LIKELY(asan_inited)) return;
SanitizerToolName = "AddressSanitizer";
@@ -396,6 +409,14 @@ static void AsanInitInternal() {
// initialization steps look at flags().
InitializeFlags();
+ // Stop performing init at this point if we are being loaded via
+ // dlopen() and the platform supports it.
+ if (SANITIZER_SUPPORTS_INIT_FOR_DLOPEN && UNLIKELY(HandleDlopenInit())) {
+ asan_init_is_running = false;
+ VReport(1, "AddressSanitizer init is being performed for dlopen().\n");
+ return;
+ }
+
AsanCheckIncompatibleRT();
AsanCheckDynamicRTPrereqs();
AvoidCVE_2016_2143();
@@ -420,6 +441,8 @@ static void AsanInitInternal() {
__asan_option_detect_stack_use_after_return =
flags()->detect_stack_use_after_return;
+ __sanitizer::InitializePlatformEarly();
+
// Re-exec ourselves if we need to set additional env or command line args.
MaybeReexec();
@@ -447,8 +470,10 @@ static void AsanInitInternal() {
allocator_options.SetFrom(flags(), common_flags());
InitializeAllocator(allocator_options);
+#ifdef START_BACKGROUND_THREAD_IN_ASAN_INTERNAL
MaybeStartBackgroudThread();
SetSoftRssLimitExceededCallback(AsanSoftRssLimitExceededCallback);
+#endif
// On Linux AsanThread::ThreadStart() calls malloc() that's why asan_inited
// should be set to 1 prior to initializing the threads.
Modified: projects/clang800-import/contrib/compiler-rt/lib/asan/asan_thread.cc
==============================================================================
--- projects/clang800-import/contrib/compiler-rt/lib/asan/asan_thread.cc Tue Jan 22 19:03:51 2019 (r343310)
+++ projects/clang800-import/contrib/compiler-rt/lib/asan/asan_thread.cc Tue Jan 22 19:20:24 2019 (r343311)
@@ -223,9 +223,11 @@ void AsanThread::Init(const InitOptions *options) {
atomic_store(&stack_switching_, false, memory_order_release);
CHECK_EQ(this->stack_size(), 0U);
SetThreadStackAndTls(options);
- CHECK_GT(this->stack_size(), 0U);
- CHECK(AddrIsInMem(stack_bottom_));
- CHECK(AddrIsInMem(stack_top_ - 1));
+ if (stack_top_ != stack_bottom_) {
+ CHECK_GT(this->stack_size(), 0U);
+ CHECK(AddrIsInMem(stack_bottom_));
+ CHECK(AddrIsInMem(stack_top_ - 1));
+ }
ClearShadowForThreadStackAndTLS();
fake_stack_ = nullptr;
if (__asan_option_detect_stack_use_after_return)
@@ -289,20 +291,23 @@ void AsanThread::SetThreadStackAndTls(const InitOption
DCHECK_EQ(options, nullptr);
uptr tls_size = 0;
uptr stack_size = 0;
- GetThreadStackAndTls(tid() == 0, const_cast<uptr *>(&stack_bottom_),
- const_cast<uptr *>(&stack_size), &tls_begin_, &tls_size);
+ GetThreadStackAndTls(tid() == 0, &stack_bottom_, &stack_size, &tls_begin_,
+ &tls_size);
stack_top_ = stack_bottom_ + stack_size;
tls_end_ = tls_begin_ + tls_size;
dtls_ = DTLS_Get();
- int local;
- CHECK(AddrIsInStack((uptr)&local));
+ if (stack_top_ != stack_bottom_) {
+ int local;
+ CHECK(AddrIsInStack((uptr)&local));
+ }
}
#endif // !SANITIZER_FUCHSIA && !SANITIZER_RTEMS
void AsanThread::ClearShadowForThreadStackAndTLS() {
- PoisonShadow(stack_bottom_, stack_top_ - stack_bottom_, 0);
+ if (stack_top_ != stack_bottom_)
+ PoisonShadow(stack_bottom_, stack_top_ - stack_bottom_, 0);
if (tls_begin_ != tls_end_) {
uptr tls_begin_aligned = RoundDownTo(tls_begin_, SHADOW_GRANULARITY);
uptr tls_end_aligned = RoundUpTo(tls_end_, SHADOW_GRANULARITY);
@@ -314,6 +319,9 @@ void AsanThread::ClearShadowForThreadStackAndTLS() {
bool AsanThread::GetStackFrameAccessByAddr(uptr addr,
StackFrameAccess *access) {
+ if (stack_top_ == stack_bottom_)
+ return false;
+
uptr bottom = 0;
if (AddrIsInStack(addr)) {
bottom = stack_bottom();
Modified: projects/clang800-import/contrib/compiler-rt/lib/asan/asan_win.cc
==============================================================================
--- projects/clang800-import/contrib/compiler-rt/lib/asan/asan_win.cc Tue Jan 22 19:03:51 2019 (r343310)
+++ projects/clang800-import/contrib/compiler-rt/lib/asan/asan_win.cc Tue Jan 22 19:20:24 2019 (r343311)
@@ -159,6 +159,14 @@ INTERCEPTOR_WINAPI(DWORD, CreateThread,
namespace __asan {
void InitializePlatformInterceptors() {
+ // The interceptors were not designed to be removable, so we have to keep this
+ // module alive for the life of the process.
+ HMODULE pinned;
+ CHECK(GetModuleHandleExW(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS |
+ GET_MODULE_HANDLE_EX_FLAG_PIN,
+ (LPCWSTR)&InitializePlatformInterceptors,
+ &pinned));
+
ASAN_INTERCEPT_FUNC(CreateThread);
ASAN_INTERCEPT_FUNC(SetUnhandledExceptionFilter);
@@ -312,6 +320,13 @@ int __asan_set_seh_filter() {
if (prev_seh_handler != &SEHHandler)
default_seh_handler = prev_seh_handler;
return 0;
+}
+
+bool HandleDlopenInit() {
+ // Not supported on this platform.
+ static_assert(!SANITIZER_SUPPORTS_INIT_FOR_DLOPEN,
+ "Expected SANITIZER_SUPPORTS_INIT_FOR_DLOPEN to be false");
+ return false;
}
#if !ASAN_DYNAMIC
Modified: projects/clang800-import/contrib/compiler-rt/lib/asan/asan_win_dll_thunk.cc
==============================================================================
--- projects/clang800-import/contrib/compiler-rt/lib/asan/asan_win_dll_thunk.cc Tue Jan 22 19:03:51 2019 (r343310)
+++ projects/clang800-import/contrib/compiler-rt/lib/asan/asan_win_dll_thunk.cc Tue Jan 22 19:20:24 2019 (r343311)
@@ -48,6 +48,7 @@ INTERCEPT_WRAP_W_WWW(_recalloc)
INTERCEPT_WRAP_W_WWW(_recalloc_base)
INTERCEPT_WRAP_W_W(_msize)
+INTERCEPT_WRAP_W_W(_msize_base)
INTERCEPT_WRAP_W_W(_expand)
INTERCEPT_WRAP_W_W(_expand_dbg)
Modified: projects/clang800-import/contrib/compiler-rt/lib/builtins/arm/addsf3.S
==============================================================================
--- projects/clang800-import/contrib/compiler-rt/lib/builtins/arm/addsf3.S Tue Jan 22 19:03:51 2019 (r343310)
+++ projects/clang800-import/contrib/compiler-rt/lib/builtins/arm/addsf3.S Tue Jan 22 19:20:24 2019 (r343311)
@@ -178,7 +178,7 @@ LOCAL_LABEL(do_substraction):
push {r0, r1, r2, r3}
movs r0, r4
- bl __clzsi2
+ bl SYMBOL_NAME(__clzsi2)
movs r5, r0
pop {r0, r1, r2, r3}
// shift = rep_clz(aSignificand) - rep_clz(implicitBit << 3);
Modified: projects/clang800-import/contrib/compiler-rt/lib/builtins/arm/aeabi_cdcmp.S
==============================================================================
--- projects/clang800-import/contrib/compiler-rt/lib/builtins/arm/aeabi_cdcmp.S Tue Jan 22 19:03:51 2019 (r343310)
+++ projects/clang800-import/contrib/compiler-rt/lib/builtins/arm/aeabi_cdcmp.S Tue Jan 22 19:20:24 2019 (r343311)
@@ -55,7 +55,7 @@ DEFINE_COMPILERRT_FUNCTION(__aeabi_cdcmpeq)
mov ip, #APSR_C
msr APSR_nzcvq, ip
#else
- msr CPSR_f, #APSR_C
+ msr APSR_nzcvq, #APSR_C
#endif
JMP(lr)
#endif
@@ -115,11 +115,7 @@ DEFINE_COMPILERRT_FUNCTION(__aeabi_cdcmple)
movne ip, #(APSR_C)
1:
-#if defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__)
msr APSR_nzcvq, ip
-#else
- msr CPSR_f, ip
-#endif
pop {r0-r3}
POP_PC()
#endif
Modified: projects/clang800-import/contrib/compiler-rt/lib/builtins/arm/aeabi_cfcmp.S
==============================================================================
--- projects/clang800-import/contrib/compiler-rt/lib/builtins/arm/aeabi_cfcmp.S Tue Jan 22 19:03:51 2019 (r343310)
+++ projects/clang800-import/contrib/compiler-rt/lib/builtins/arm/aeabi_cfcmp.S Tue Jan 22 19:20:24 2019 (r343311)
@@ -55,7 +55,7 @@ DEFINE_COMPILERRT_FUNCTION(__aeabi_cfcmpeq)
mov ip, #APSR_C
msr APSR_nzcvq, ip
#else
- msr CPSR_f, #APSR_C
+ msr APSR_nzcvq, #APSR_C
#endif
JMP(lr)
#endif
@@ -115,11 +115,7 @@ DEFINE_COMPILERRT_FUNCTION(__aeabi_cfcmple)
movne ip, #(APSR_C)
1:
-#if defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__)
msr APSR_nzcvq, ip
-#else
- msr CPSR_f, ip
-#endif
pop {r0-r3}
POP_PC()
#endif
Modified: projects/clang800-import/contrib/compiler-rt/lib/builtins/clzdi2.c
==============================================================================
--- projects/clang800-import/contrib/compiler-rt/lib/builtins/clzdi2.c Tue Jan 22 19:03:51 2019 (r343310)
+++ projects/clang800-import/contrib/compiler-rt/lib/builtins/clzdi2.c Tue Jan 22 19:20:24 2019 (r343311)
@@ -16,8 +16,13 @@
/* Returns: the number of leading 0-bits */
-#if !defined(__clang__) && (defined(__sparc64__) || defined(__mips64) || defined(__riscv__))
-/* gcc resolves __builtin_clz -> __clzdi2 leading to infinite recursion */
+#if !defined(__clang__) && \
+ ((defined(__sparc__) && defined(__arch64__)) || \
+ defined(__mips64) || \
+ (defined(__riscv) && __SIZEOF_POINTER__ >= 8))
+/* On 64-bit architectures with neither a native clz instruction nor a native
+ * ctz instruction, gcc resolves __builtin_clz to __clzdi2 rather than
+ * __clzsi2, leading to infinite recursion. */
#define __builtin_clz(a) __clzsi2(a)
extern si_int __clzsi2(si_int);
#endif
Modified: projects/clang800-import/contrib/compiler-rt/lib/builtins/cpu_model.c
==============================================================================
--- projects/clang800-import/contrib/compiler-rt/lib/builtins/cpu_model.c Tue Jan 22 19:03:51 2019 (r343310)
+++ projects/clang800-import/contrib/compiler-rt/lib/builtins/cpu_model.c Tue Jan 22 19:20:24 2019 (r343311)
@@ -55,6 +55,9 @@ enum ProcessorTypes {
AMD_BTVER2,
AMDFAM17H,
INTEL_KNM,
+ INTEL_GOLDMONT,
+ INTEL_GOLDMONT_PLUS,
+ INTEL_TREMONT,
CPU_TYPE_MAX
};
@@ -76,6 +79,8 @@ enum ProcessorSubtypes {
INTEL_COREI7_SKYLAKE,
INTEL_COREI7_SKYLAKE_AVX512,
INTEL_COREI7_CANNONLAKE,
+ INTEL_COREI7_ICELAKE_CLIENT,
+ INTEL_COREI7_ICELAKE_SERVER,
CPU_SUBTYPE_MAX
};
@@ -110,7 +115,12 @@ enum ProcessorFeatures {
FEATURE_AVX512IFMA,
FEATURE_AVX5124VNNIW,
FEATURE_AVX5124FMAPS,
- FEATURE_AVX512VPOPCNTDQ
+ FEATURE_AVX512VPOPCNTDQ,
+ FEATURE_AVX512VBMI2,
+ FEATURE_GFNI,
+ FEATURE_VPCLMULQDQ,
+ FEATURE_AVX512VNNI,
+ FEATURE_AVX512BITALG
};
// The check below for i386 was copied from clang's cpuid.h (__get_cpuid_max).
@@ -364,6 +374,14 @@ getIntelProcessorTypeAndSubtype(unsigned Family, unsig
case 0x4c: // really airmont
*Type = INTEL_SILVERMONT;
break; // "silvermont"
+ // Goldmont:
+ case 0x5c: // Apollo Lake
+ case 0x5f: // Denverton
+ *Type = INTEL_GOLDMONT;
+ break; // "goldmont"
+ case 0x7a:
+ *Type = INTEL_GOLDMONT_PLUS;
+ break;
case 0x57:
*Type = INTEL_KNL; // knl
@@ -438,35 +456,45 @@ static void getAMDProcessorTypeAndSubtype(unsigned Fam
}
static void getAvailableFeatures(unsigned ECX, unsigned EDX, unsigned MaxLeaf,
- unsigned *FeaturesOut) {
+ unsigned *FeaturesOut,
+ unsigned *Features2Out) {
unsigned Features = 0;
+ unsigned Features2 = 0;
unsigned EAX, EBX;
+#define setFeature(F) \
+ do { \
+ if (F < 32) \
+ Features |= 1U << (F & 0x1f); \
+ else if (F < 64) \
+ Features2 |= 1U << ((F - 32) & 0x1f); \
+ } while (0)
+
if ((EDX >> 15) & 1)
- Features |= 1 << FEATURE_CMOV;
+ setFeature(FEATURE_CMOV);
if ((EDX >> 23) & 1)
- Features |= 1 << FEATURE_MMX;
+ setFeature(FEATURE_MMX);
if ((EDX >> 25) & 1)
- Features |= 1 << FEATURE_SSE;
+ setFeature(FEATURE_SSE);
if ((EDX >> 26) & 1)
- Features |= 1 << FEATURE_SSE2;
+ setFeature(FEATURE_SSE2);
if ((ECX >> 0) & 1)
- Features |= 1 << FEATURE_SSE3;
+ setFeature(FEATURE_SSE3);
if ((ECX >> 1) & 1)
- Features |= 1 << FEATURE_PCLMUL;
+ setFeature(FEATURE_PCLMUL);
if ((ECX >> 9) & 1)
- Features |= 1 << FEATURE_SSSE3;
+ setFeature(FEATURE_SSSE3);
if ((ECX >> 12) & 1)
- Features |= 1 << FEATURE_FMA;
+ setFeature(FEATURE_FMA);
if ((ECX >> 19) & 1)
- Features |= 1 << FEATURE_SSE4_1;
+ setFeature(FEATURE_SSE4_1);
if ((ECX >> 20) & 1)
- Features |= 1 << FEATURE_SSE4_2;
+ setFeature(FEATURE_SSE4_2);
if ((ECX >> 23) & 1)
- Features |= 1 << FEATURE_POPCNT;
+ setFeature(FEATURE_POPCNT);
if ((ECX >> 25) & 1)
- Features |= 1 << FEATURE_AES;
+ setFeature(FEATURE_AES);
// If CPUID indicates support for XSAVE, XRESTORE and AVX, and XGETBV
// indicates that the AVX registers will be saved and restored on context
@@ -477,43 +505,53 @@ static void getAvailableFeatures(unsigned ECX, unsigne
bool HasAVX512Save = HasAVX && ((EAX & 0xe0) == 0xe0);
if (HasAVX)
- Features |= 1 << FEATURE_AVX;
+ setFeature(FEATURE_AVX);
bool HasLeaf7 =
MaxLeaf >= 0x7 && !getX86CpuIDAndInfoEx(0x7, 0x0, &EAX, &EBX, &ECX, &EDX);
if (HasLeaf7 && ((EBX >> 3) & 1))
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-src-projects
mailing list