diff --git a/Makefile.inc1 b/Makefile.inc1 index 55f9fe7dd48..6c744d8ab7f 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -1503,11 +1503,11 @@ _gensnmptree= usr.sbin/bsnmpd/gensnmptree _clang_tblgen= \ lib/clang/libllvmsupport \ lib/clang/libllvmtablegen \ - usr.bin/clang/tblgen \ + usr.bin/clang/llvm-tblgen \ usr.bin/clang/clang-tblgen ${_bt}-usr.bin/clang/clang-tblgen: ${_bt}-lib/clang/libllvmtablegen ${_bt}-lib/clang/libllvmsupport -${_bt}-usr.bin/clang/tblgen: ${_bt}-lib/clang/libllvmtablegen ${_bt}-lib/clang/libllvmsupport +${_bt}-usr.bin/clang/llvm-tblgen: ${_bt}-lib/clang/libllvmtablegen ${_bt}-lib/clang/libllvmsupport .endif # Default to building the GPL DTC, but build the BSDL one if users explicitly @@ -1714,7 +1714,7 @@ NXBENV= MAKEOBJDIRPREFIX=${OBJTREE}/nxb \ INSTALL="sh ${.CURDIR}/tools/install.sh" \ PATH=${PATH}:${OBJTREE}/gperf_for_gcc/usr/bin NXBMAKE= ${NXBENV} ${MAKE} \ - TBLGEN=${NXBDESTDIR}/usr/bin/tblgen \ + LLVM_TBLGEN=${NXBDESTDIR}/usr/bin/llvm-tblgen \ CLANG_TBLGEN=${NXBDESTDIR}/usr/bin/clang-tblgen \ MACHINE=${TARGET} MACHINE_ARCH=${TARGET_ARCH} \ MK_GDB=no MK_TESTS=no \ diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 5784747923f..21c62008edd 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -38,6 +38,89 @@ # xargs -n1 | sort | uniq -d; # done +# 20160305: new clang import which bumps version from 3.7.1 to 3.8.0. +OLD_FILES+=usr/bin/macho-dump +OLD_FILES+=usr/lib/clang/3.7.1/include/sanitizer/allocator_interface.h +OLD_FILES+=usr/lib/clang/3.7.1/include/sanitizer/asan_interface.h +OLD_FILES+=usr/lib/clang/3.7.1/include/sanitizer/common_interface_defs.h +OLD_FILES+=usr/lib/clang/3.7.1/include/sanitizer/coverage_interface.h +OLD_FILES+=usr/lib/clang/3.7.1/include/sanitizer/dfsan_interface.h +OLD_FILES+=usr/lib/clang/3.7.1/include/sanitizer/linux_syscall_hooks.h +OLD_FILES+=usr/lib/clang/3.7.1/include/sanitizer/lsan_interface.h +OLD_FILES+=usr/lib/clang/3.7.1/include/sanitizer/msan_interface.h +OLD_FILES+=usr/lib/clang/3.7.1/include/sanitizer/tsan_interface_atomic.h +OLD_DIRS+=usr/lib/clang/3.7.1/include/sanitizer +OLD_FILES+=usr/lib/clang/3.7.1/include/__stddef_max_align_t.h +OLD_FILES+=usr/lib/clang/3.7.1/include/__wmmintrin_aes.h +OLD_FILES+=usr/lib/clang/3.7.1/include/__wmmintrin_pclmul.h +OLD_FILES+=usr/lib/clang/3.7.1/include/adxintrin.h +OLD_FILES+=usr/lib/clang/3.7.1/include/altivec.h +OLD_FILES+=usr/lib/clang/3.7.1/include/ammintrin.h +OLD_FILES+=usr/lib/clang/3.7.1/include/arm_acle.h +OLD_FILES+=usr/lib/clang/3.7.1/include/arm_neon.h +OLD_FILES+=usr/lib/clang/3.7.1/include/avx2intrin.h +OLD_FILES+=usr/lib/clang/3.7.1/include/avx512bwintrin.h +OLD_FILES+=usr/lib/clang/3.7.1/include/avx512cdintrin.h +OLD_FILES+=usr/lib/clang/3.7.1/include/avx512dqintrin.h +OLD_FILES+=usr/lib/clang/3.7.1/include/avx512erintrin.h +OLD_FILES+=usr/lib/clang/3.7.1/include/avx512fintrin.h +OLD_FILES+=usr/lib/clang/3.7.1/include/avx512vlbwintrin.h +OLD_FILES+=usr/lib/clang/3.7.1/include/avx512vldqintrin.h +OLD_FILES+=usr/lib/clang/3.7.1/include/avx512vlintrin.h +OLD_FILES+=usr/lib/clang/3.7.1/include/avxintrin.h +OLD_FILES+=usr/lib/clang/3.7.1/include/bmi2intrin.h +OLD_FILES+=usr/lib/clang/3.7.1/include/bmiintrin.h +OLD_FILES+=usr/lib/clang/3.7.1/include/cpuid.h +OLD_FILES+=usr/lib/clang/3.7.1/include/cuda_builtin_vars.h +OLD_FILES+=usr/lib/clang/3.7.1/include/emmintrin.h +OLD_FILES+=usr/lib/clang/3.7.1/include/f16cintrin.h +OLD_FILES+=usr/lib/clang/3.7.1/include/fma4intrin.h +OLD_FILES+=usr/lib/clang/3.7.1/include/fmaintrin.h +OLD_FILES+=usr/lib/clang/3.7.1/include/fxsrintrin.h +OLD_FILES+=usr/lib/clang/3.7.1/include/htmintrin.h +OLD_FILES+=usr/lib/clang/3.7.1/include/htmxlintrin.h +OLD_FILES+=usr/lib/clang/3.7.1/include/ia32intrin.h +OLD_FILES+=usr/lib/clang/3.7.1/include/immintrin.h +OLD_FILES+=usr/lib/clang/3.7.1/include/lzcntintrin.h +OLD_FILES+=usr/lib/clang/3.7.1/include/mm3dnow.h +OLD_FILES+=usr/lib/clang/3.7.1/include/mm_malloc.h +OLD_FILES+=usr/lib/clang/3.7.1/include/mmintrin.h +OLD_FILES+=usr/lib/clang/3.7.1/include/module.modulemap +OLD_FILES+=usr/lib/clang/3.7.1/include/nmmintrin.h +OLD_FILES+=usr/lib/clang/3.7.1/include/pmmintrin.h +OLD_FILES+=usr/lib/clang/3.7.1/include/popcntintrin.h +OLD_FILES+=usr/lib/clang/3.7.1/include/prfchwintrin.h +OLD_FILES+=usr/lib/clang/3.7.1/include/rdseedintrin.h +OLD_FILES+=usr/lib/clang/3.7.1/include/rtmintrin.h +OLD_FILES+=usr/lib/clang/3.7.1/include/s390intrin.h +OLD_FILES+=usr/lib/clang/3.7.1/include/shaintrin.h +OLD_FILES+=usr/lib/clang/3.7.1/include/smmintrin.h +OLD_FILES+=usr/lib/clang/3.7.1/include/tbmintrin.h +OLD_FILES+=usr/lib/clang/3.7.1/include/tmmintrin.h +OLD_FILES+=usr/lib/clang/3.7.1/include/vadefs.h +OLD_FILES+=usr/lib/clang/3.7.1/include/vecintrin.h +OLD_FILES+=usr/lib/clang/3.7.1/include/wmmintrin.h +OLD_FILES+=usr/lib/clang/3.7.1/include/x86intrin.h +OLD_FILES+=usr/lib/clang/3.7.1/include/xmmintrin.h +OLD_FILES+=usr/lib/clang/3.7.1/include/xopintrin.h +OLD_FILES+=usr/lib/clang/3.7.1/include/xtestintrin.h +OLD_DIRS+=usr/lib/clang/3.7.1/include +OLD_FILES+=usr/lib/clang/3.7.1/lib/freebsd/libclang_rt.asan-i386.a +OLD_FILES+=usr/lib/clang/3.7.1/lib/freebsd/libclang_rt.asan-x86_64.a +OLD_FILES+=usr/lib/clang/3.7.1/lib/freebsd/libclang_rt.asan_cxx-i386.a +OLD_FILES+=usr/lib/clang/3.7.1/lib/freebsd/libclang_rt.asan_cxx-x86_64.a +OLD_FILES+=usr/lib/clang/3.7.1/lib/freebsd/libclang_rt.profile-arm.a +OLD_FILES+=usr/lib/clang/3.7.1/lib/freebsd/libclang_rt.profile-i386.a +OLD_FILES+=usr/lib/clang/3.7.1/lib/freebsd/libclang_rt.profile-x86_64.a +OLD_FILES+=usr/lib/clang/3.7.1/lib/freebsd/libclang_rt.safestack-i386.a +OLD_FILES+=usr/lib/clang/3.7.1/lib/freebsd/libclang_rt.safestack-x86_64.a +OLD_FILES+=usr/lib/clang/3.7.1/lib/freebsd/libclang_rt.ubsan_standalone-i386.a +OLD_FILES+=usr/lib/clang/3.7.1/lib/freebsd/libclang_rt.ubsan_standalone-x86_64.a +OLD_FILES+=usr/lib/clang/3.7.1/lib/freebsd/libclang_rt.ubsan_standalone_cxx-i386.a +OLD_FILES+=usr/lib/clang/3.7.1/lib/freebsd/libclang_rt.ubsan_standalone_cxx-x86_64.a +OLD_DIRS+=usr/lib/clang/3.7.1/lib/freebsd +OLD_DIRS+=usr/lib/clang/3.7.1/lib +OLD_DIRS+=usr/lib/clang/3.7.1 # 20160301: Remove taskqueue_enqueue_fast OLD_FILES+=usr/share/man/man9/taskqueue_enqueue_fast.9.gz # 20160225: Remove casperd and libcapsicum. diff --git a/UPDATING b/UPDATING index dd09e81a240..ff4c1845f91 100644 --- a/UPDATING +++ b/UPDATING @@ -31,6 +31,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11.x IS SLOW: disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20160305: + Clang, llvm, lldb and compiler-rt have been upgraded to 3.8.0. Please + see the 20141231 entry below for information about prerequisites and + upgrading, if you are not already using clang 3.5.0 or higher. + 20160301: The AIO subsystem is now a standard part of the kernel. The VFS_AIO kernel option and aio.ko kernel module have been removed. diff --git a/contrib/compiler-rt/include/sanitizer/asan_interface.h b/contrib/compiler-rt/include/sanitizer/asan_interface.h index 7763389ab25..97ba0ceb0b2 100644 --- a/contrib/compiler-rt/include/sanitizer/asan_interface.h +++ b/contrib/compiler-rt/include/sanitizer/asan_interface.h @@ -110,10 +110,6 @@ extern "C" { void __asan_report_error(void *pc, void *bp, void *sp, void *addr, int is_write, size_t access_size); - // Sets the exit code to use when reporting an error. - // Returns the old value. - int __asan_set_error_exit_code(int exit_code); - // Deprecated. Call __sanitizer_set_death_callback instead. void __asan_set_death_callback(void (*callback)(void)); diff --git a/contrib/compiler-rt/include/sanitizer/common_interface_defs.h b/contrib/compiler-rt/include/sanitizer/common_interface_defs.h index ef645e52711..b2a4bb7b89e 100644 --- a/contrib/compiler-rt/include/sanitizer/common_interface_defs.h +++ b/contrib/compiler-rt/include/sanitizer/common_interface_defs.h @@ -105,12 +105,31 @@ extern "C" { int __sanitizer_verify_contiguous_container(const void *beg, const void *mid, const void *end); + // Similar to __sanitizer_verify_contiguous_container but returns the address + // of the first improperly poisoned byte otherwise. Returns null if the area + // is poisoned properly. + const void *__sanitizer_contiguous_container_find_bad_address( + const void *beg, const void *mid, const void *end); + // Print the stack trace leading to this call. Useful for debugging user code. void __sanitizer_print_stack_trace(); // Sets the callback to be called right before death on error. // Passing 0 will unset the callback. void __sanitizer_set_death_callback(void (*callback)(void)); + + // Interceptor hooks. + // Whenever a libc function interceptor is called it checks if the + // corresponding weak hook is defined, and it so -- calls it. + // The primary use case is data-flow-guided fuzzing, where the fuzzer needs + // to know what is being passed to libc functions, e.g. memcmp. + // FIXME: implement more hooks. + void __sanitizer_weak_hook_memcmp(void *called_pc, const void *s1, + const void *s2, size_t n, int result); + void __sanitizer_weak_hook_strncmp(void *called_pc, const char *s1, + const char *s2, size_t n, int result); + void __sanitizer_weak_hook_strcmp(void *called_pc, const char *s1, + const char *s2, int result); #ifdef __cplusplus } // extern "C" #endif diff --git a/contrib/compiler-rt/include/sanitizer/coverage_interface.h b/contrib/compiler-rt/include/sanitizer/coverage_interface.h index 404b71e3086..2dcc09fc849 100644 --- a/contrib/compiler-rt/include/sanitizer/coverage_interface.h +++ b/contrib/compiler-rt/include/sanitizer/coverage_interface.h @@ -27,9 +27,11 @@ extern "C" { // descriptor. Returns -1 on failure, or if coverage dumping is disabled. // This is intended for use by sandboxing code. intptr_t __sanitizer_maybe_open_cov_file(const char *name); - // Get the number of total unique covered entities (blocks, edges, calls). + // Get the number of unique covered blocks (or edges). // This can be useful for coverage-directed in-process fuzzers. uintptr_t __sanitizer_get_total_unique_coverage(); + // Get the number of unique indirect caller-callee pairs. + uintptr_t __sanitizer_get_total_unique_caller_callee_pairs(); // Reset the basic-block (edge) coverage to the initial state. // Useful for in-process fuzzing to start collecting coverage from scratch. @@ -39,6 +41,13 @@ extern "C" { // Some of the entries in *data will be zero. uintptr_t __sanitizer_get_coverage_guards(uintptr_t **data); + // Set *data to the growing buffer with covered PCs and return the size + // of the buffer. The entries are never zero. + // When only unique pcs are collected, the size is equal to + // __sanitizer_get_total_unique_coverage. + // WARNING: EXPERIMENTAL API. + uintptr_t __sanitizer_get_coverage_pc_buffer(uintptr_t **data); + // The coverage instrumentation may optionally provide imprecise counters. // Rather than exposing the counter values to the user we instead map // the counters to a bitset. diff --git a/contrib/compiler-rt/include/sanitizer/dfsan_interface.h b/contrib/compiler-rt/include/sanitizer/dfsan_interface.h index 84ffd49f8af..05666f73671 100644 --- a/contrib/compiler-rt/include/sanitizer/dfsan_interface.h +++ b/contrib/compiler-rt/include/sanitizer/dfsan_interface.h @@ -91,16 +91,18 @@ void dfsan_set_write_callback(dfsan_write_callback_t labeled_write_callback); ///