aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2018-07-28 11:06:48 +0000
committerDimitry Andric <dim@FreeBSD.org>2018-07-28 11:06:48 +0000
commit93c1b73a09a52d4a265f683bf1954b08bb430049 (patch)
tree5543464d74945196cc890e9d9099e5d0660df7eb
parent0d8e7490d6e8a13a8f0977d9b7771803b9f64ea0 (diff)
downloadsrc-93c1b73a09a52d4a265f683bf1954b08bb430049.tar.gz
src-93c1b73a09a52d4a265f683bf1954b08bb430049.zip
Vendor import of compiler-rt trunk r338150:vendor/compiler-rt/compiler-rt-trunk-r338150
Notes
Notes: svn path=/vendor/compiler-rt/dist/; revision=336817 svn path=/vendor/compiler-rt/compiler-rt-trunk-r338150/; revision=336818; tag=vendor/compiler-rt/compiler-rt-trunk-r338150
-rw-r--r--CMakeLists.txt99
-rw-r--r--LICENSE.TXT2
-rw-r--r--cmake/Modules/AddCompilerRT.cmake197
-rw-r--r--cmake/Modules/CompilerRTDarwinUtils.cmake4
-rw-r--r--cmake/Modules/CompilerRTUtils.cmake75
-rw-r--r--cmake/Modules/HandleCompilerRT.cmake5
-rw-r--r--cmake/Modules/SanitizerUtils.cmake14
-rw-r--r--cmake/base-config-ix.cmake40
-rw-r--r--cmake/builtin-config-ix.cmake5
-rw-r--r--cmake/config-ix.cmake60
-rw-r--r--include/CMakeLists.txt1
-rw-r--r--include/sanitizer/common_interface_defs.h5
-rw-r--r--include/sanitizer/msan_interface.h8
-rw-r--r--include/sanitizer/netbsd_syscall_hooks.h4734
-rw-r--r--include/sanitizer/scudo_interface.h7
-rw-r--r--include/xray/xray_interface.h14
-rw-r--r--include/xray/xray_log_interface.h146
-rw-r--r--include/xray/xray_records.h11
-rw-r--r--lib/asan/.clang-format1
-rw-r--r--lib/asan/CMakeLists.txt62
-rw-r--r--lib/asan/asan_allocator.cc94
-rw-r--r--lib/asan/asan_allocator.h6
-rw-r--r--lib/asan/asan_debugging.cc3
-rw-r--r--lib/asan/asan_descriptions.cc70
-rw-r--r--lib/asan/asan_descriptions.h17
-rw-r--r--lib/asan/asan_errors.cc163
-rw-r--r--lib/asan/asan_errors.h271
-rw-r--r--lib/asan/asan_flags.cc9
-rw-r--r--lib/asan/asan_flags.inc9
-rw-r--r--lib/asan/asan_globals.cc11
-rw-r--r--lib/asan/asan_globals_win.cc4
-rw-r--r--lib/asan/asan_interceptors.cc67
-rw-r--r--lib/asan/asan_interceptors.h21
-rw-r--r--lib/asan/asan_interceptors_memintrinsics.cc16
-rw-r--r--lib/asan/asan_interceptors_memintrinsics.h25
-rw-r--r--lib/asan/asan_internal.h7
-rw-r--r--lib/asan/asan_linux.cc3
-rw-r--r--lib/asan/asan_mac.cc28
-rw-r--r--lib/asan/asan_malloc_linux.cc79
-rw-r--r--lib/asan/asan_malloc_local.h44
-rw-r--r--lib/asan/asan_malloc_mac.cc3
-rw-r--r--lib/asan/asan_mapping.h123
-rw-r--r--lib/asan/asan_mapping_myriad.h86
-rw-r--r--lib/asan/asan_memory_profile.cc12
-rw-r--r--lib/asan/asan_new_delete.cc24
-rw-r--r--lib/asan/asan_poisoning.cc14
-rw-r--r--lib/asan/asan_poisoning.h5
-rw-r--r--lib/asan/asan_report.cc72
-rw-r--r--lib/asan/asan_report.h12
-rw-r--r--lib/asan/asan_rtems.cc253
-rw-r--r--lib/asan/asan_rtl.cc42
-rw-r--r--lib/asan/asan_shadow_setup.cc10
-rw-r--r--lib/asan/asan_thread.cc30
-rw-r--r--lib/asan/asan_win.cc9
-rw-r--r--lib/asan/asan_win_dll_thunk.cc2
-rwxr-xr-xlib/asan/scripts/asan_device_setup9
-rw-r--r--lib/asan/tests/CMakeLists.txt9
-rw-r--r--lib/asan/tests/asan_test.cc5
-rw-r--r--lib/builtins/CMakeLists.txt52
-rw-r--r--lib/builtins/arm/chkstk.S34
-rw-r--r--lib/builtins/clear_cache.c17
-rw-r--r--lib/builtins/clzdi2.c6
-rw-r--r--lib/builtins/cpu_model.c4
-rw-r--r--lib/builtins/ctzdi2.c6
-rw-r--r--lib/builtins/emutls.c65
-rw-r--r--lib/builtins/hexagon/common_entry_exit_abi1.S103
-rw-r--r--lib/builtins/hexagon/common_entry_exit_abi2.S268
-rw-r--r--lib/builtins/hexagon/common_entry_exit_legacy.S157
-rw-r--r--lib/builtins/hexagon/dfaddsub.S398
-rw-r--r--lib/builtins/hexagon/dfdiv.S492
-rw-r--r--lib/builtins/hexagon/dffma.S705
-rw-r--r--lib/builtins/hexagon/dfminmax.S79
-rw-r--r--lib/builtins/hexagon/dfmul.S418
-rw-r--r--lib/builtins/hexagon/dfsqrt.S406
-rw-r--r--lib/builtins/hexagon/divdi3.S85
-rw-r--r--lib/builtins/hexagon/divsi3.S84
-rw-r--r--lib/builtins/hexagon/fabs_opt.S37
-rw-r--r--lib/builtins/hexagon/fastmath2_dlib_asm.S491
-rw-r--r--lib/builtins/hexagon/fastmath2_ldlib_asm.S345
-rw-r--r--lib/builtins/hexagon/fastmath_dlib_asm.S400
-rw-r--r--lib/builtins/hexagon/fma_opt.S31
-rw-r--r--lib/builtins/hexagon/fmax_opt.S30
-rw-r--r--lib/builtins/hexagon/fmin_opt.S30
-rw-r--r--lib/builtins/hexagon/memcpy_forward_vp4cp4n2.S125
-rw-r--r--lib/builtins/hexagon/memcpy_likely_aligned.S64
-rw-r--r--lib/builtins/hexagon/moddi3.S83
-rw-r--r--lib/builtins/hexagon/modsi3.S66
-rw-r--r--lib/builtins/hexagon/sfdiv_opt.S66
-rw-r--r--lib/builtins/hexagon/sfsqrt_opt.S82
-rw-r--r--lib/builtins/hexagon/udivdi3.S71
-rw-r--r--lib/builtins/hexagon/udivmoddi4.S71
-rw-r--r--lib/builtins/hexagon/udivmodsi4.S60
-rw-r--r--lib/builtins/hexagon/udivsi3.S56
-rw-r--r--lib/builtins/hexagon/umoddi3.S74
-rw-r--r--lib/builtins/hexagon/umodsi3.S55
-rw-r--r--lib/builtins/int_types.h2
-rw-r--r--lib/builtins/os_version_check.c77
-rw-r--r--lib/builtins/riscv/mulsi3.S28
-rw-r--r--lib/cfi/CMakeLists.txt2
-rw-r--r--lib/cfi/cfi.cc27
-rw-r--r--lib/cfi/cfi_blacklist.txt4
-rw-r--r--lib/dfsan/.clang-format1
-rw-r--r--lib/dfsan/CMakeLists.txt14
-rw-r--r--lib/dfsan/dfsan.cc3
-rw-r--r--lib/dfsan/dfsan_custom.cc24
-rw-r--r--lib/dfsan/done_abilist.txt17
-rwxr-xr-xlib/dfsan/scripts/check_custom_wrappers.sh2
-rw-r--r--lib/esan/CMakeLists.txt14
-rw-r--r--lib/esan/esan.cpp6
-rw-r--r--lib/esan/esan_interceptors.cpp61
-rw-r--r--lib/esan/esan_sideline_linux.cpp2
-rw-r--r--lib/fuzzer/CMakeLists.txt81
-rw-r--r--lib/fuzzer/FuzzerClangCounters.cpp49
-rw-r--r--lib/fuzzer/FuzzerCommand.h3
-rw-r--r--lib/fuzzer/FuzzerCorpus.h59
-rw-r--r--lib/fuzzer/FuzzerDataFlowTrace.cpp91
-rw-r--r--lib/fuzzer/FuzzerDataFlowTrace.h56
-rw-r--r--lib/fuzzer/FuzzerDefs.h45
-rw-r--r--lib/fuzzer/FuzzerDictionary.h12
-rw-r--r--lib/fuzzer/FuzzerDriver.cpp19
-rw-r--r--lib/fuzzer/FuzzerExtFunctions.def4
-rw-r--r--lib/fuzzer/FuzzerExtFunctionsWeak.cpp5
-rw-r--r--lib/fuzzer/FuzzerExtraCounters.cpp3
-rw-r--r--lib/fuzzer/FuzzerFlags.def27
-rw-r--r--lib/fuzzer/FuzzerIO.cpp8
-rw-r--r--lib/fuzzer/FuzzerIO.h2
-rw-r--r--lib/fuzzer/FuzzerIOPosix.cpp2
-rw-r--r--lib/fuzzer/FuzzerInterface.h22
-rw-r--r--lib/fuzzer/FuzzerInternal.h26
-rw-r--r--lib/fuzzer/FuzzerLoop.cpp153
-rw-r--r--lib/fuzzer/FuzzerMain.cpp2
-rw-r--r--lib/fuzzer/FuzzerMutate.cpp93
-rw-r--r--lib/fuzzer/FuzzerMutate.h21
-rw-r--r--lib/fuzzer/FuzzerOptions.h11
-rw-r--r--lib/fuzzer/FuzzerShmemPosix.cpp9
-rw-r--r--lib/fuzzer/FuzzerTracePC.cpp240
-rw-r--r--lib/fuzzer/FuzzerTracePC.h53
-rw-r--r--lib/fuzzer/FuzzerUtil.cpp19
-rw-r--r--lib/fuzzer/FuzzerUtil.h4
-rw-r--r--lib/fuzzer/FuzzerUtilFuchsia.cpp395
-rw-r--r--lib/fuzzer/FuzzerUtilLinux.cpp5
-rw-r--r--lib/fuzzer/FuzzerUtilPosix.cpp3
-rw-r--r--lib/fuzzer/afl/afl_driver.cpp39
-rwxr-xr-xlib/fuzzer/build.sh2
-rw-r--r--lib/fuzzer/dataflow/DataFlow.cpp217
-rwxr-xr-xlib/fuzzer/scripts/collect_data_flow.py79
-rwxr-xr-xlib/fuzzer/scripts/merge_data_flow.py36
-rwxr-xr-xlib/fuzzer/scripts/unbalanced_allocs.py10
-rw-r--r--lib/fuzzer/tests/CMakeLists.txt32
-rw-r--r--lib/fuzzer/tests/FuzzerUnittest.cpp29
-rw-r--r--lib/hwasan/.clang-format1
-rw-r--r--lib/hwasan/CMakeLists.txt52
-rw-r--r--lib/hwasan/hwasan.cc89
-rw-r--r--lib/hwasan/hwasan.h30
-rw-r--r--lib/hwasan/hwasan_allocator.cc84
-rw-r--r--lib/hwasan/hwasan_dynamic_shadow.cc132
-rw-r--r--lib/hwasan/hwasan_dynamic_shadow.h27
-rw-r--r--lib/hwasan/hwasan_flags.inc4
-rw-r--r--lib/hwasan/hwasan_interceptors.cc55
-rw-r--r--lib/hwasan/hwasan_interface_internal.h18
-rw-r--r--lib/hwasan/hwasan_linux.cc294
-rw-r--r--lib/hwasan/hwasan_mapping.h85
-rw-r--r--lib/hwasan/hwasan_new_delete.cc5
-rw-r--r--lib/hwasan/hwasan_poisoning.cc3
-rw-r--r--lib/hwasan/hwasan_report.cc10
-rw-r--r--lib/hwasan/hwasan_report.h36
-rw-r--r--lib/hwasan/hwasan_thread.cc39
-rw-r--r--lib/hwasan/hwasan_thread.h5
-rw-r--r--lib/interception/.clang-format1
-rw-r--r--lib/interception/CMakeLists.txt10
-rw-r--r--lib/interception/interception.h19
-rw-r--r--lib/interception/interception_linux.cc6
-rw-r--r--lib/interception/interception_linux.h8
-rw-r--r--lib/interception/interception_win.cc1
-rw-r--r--lib/lsan/.clang-format1
-rw-r--r--lib/lsan/CMakeLists.txt14
-rw-r--r--lib/lsan/lsan.cc2
-rw-r--r--lib/lsan/lsan_allocator.cc74
-rw-r--r--lib/lsan/lsan_allocator.h4
-rw-r--r--lib/lsan/lsan_common.cc52
-rw-r--r--lib/lsan/lsan_common.h7
-rw-r--r--lib/lsan/lsan_common_mac.cc12
-rw-r--r--lib/lsan/lsan_interceptors.cc57
-rw-r--r--lib/lsan/lsan_malloc_mac.cc3
-rw-r--r--lib/lsan/lsan_thread.cc5
-rw-r--r--lib/msan/.clang-format1
-rw-r--r--lib/msan/CMakeLists.txt24
-rw-r--r--lib/msan/msan.cc15
-rw-r--r--lib/msan/msan.h21
-rw-r--r--lib/msan/msan_allocator.cc48
-rw-r--r--lib/msan/msan_interceptors.cc136
-rw-r--r--lib/msan/msan_interface_internal.h6
-rw-r--r--lib/msan/msan_linux.cc3
-rw-r--r--lib/msan/msan_new_delete.cc5
-rw-r--r--lib/msan/msan_poisoning.cc3
-rw-r--r--lib/msan/msan_report.cc5
-rw-r--r--lib/msan/msan_report.h34
-rw-r--r--lib/msan/tests/CMakeLists.txt8
-rw-r--r--lib/msan/tests/msan_test.cc145
-rw-r--r--lib/profile/CMakeLists.txt13
-rw-r--r--lib/profile/GCDAProfiling.c187
-rw-r--r--lib/profile/InstrProfData.inc2
-rw-r--r--lib/profile/InstrProfiling.h12
-rw-r--r--lib/profile/InstrProfilingFile.c73
-rw-r--r--lib/profile/InstrProfilingMerge.c5
-rw-r--r--lib/profile/InstrProfilingMergeFile.c16
-rw-r--r--lib/profile/InstrProfilingPlatformFuchsia.c183
-rw-r--r--lib/profile/InstrProfilingPlatformLinux.c2
-rw-r--r--lib/profile/InstrProfilingPort.h2
-rw-r--r--lib/profile/InstrProfilingUtil.c18
-rw-r--r--lib/profile/InstrProfilingValue.c33
-rw-r--r--lib/safestack/.clang-format1
-rw-r--r--lib/safestack/safestack.cc30
-rw-r--r--lib/sanitizer_common/.clang-format1
-rw-r--r--lib/sanitizer_common/CMakeLists.txt103
-rw-r--r--lib/sanitizer_common/sanitizer_allocator.cc64
-rw-r--r--lib/sanitizer_common/sanitizer_allocator.h27
-rw-r--r--lib/sanitizer_common/sanitizer_allocator_bytemap.h4
-rw-r--r--lib/sanitizer_common/sanitizer_allocator_checks.h8
-rw-r--r--lib/sanitizer_common/sanitizer_allocator_combined.h12
-rw-r--r--lib/sanitizer_common/sanitizer_allocator_internal.h16
-rw-r--r--lib/sanitizer_common/sanitizer_allocator_local_cache.h94
-rw-r--r--lib/sanitizer_common/sanitizer_allocator_primary32.h72
-rw-r--r--lib/sanitizer_common/sanitizer_allocator_primary64.h27
-rw-r--r--lib/sanitizer_common/sanitizer_allocator_report.cc125
-rw-r--r--lib/sanitizer_common/sanitizer_allocator_report.h38
-rw-r--r--lib/sanitizer_common/sanitizer_allocator_secondary.h85
-rw-r--r--lib/sanitizer_common/sanitizer_allocator_size_class_map.h31
-rw-r--r--lib/sanitizer_common/sanitizer_allocator_stats.h2
-rw-r--r--lib/sanitizer_common/sanitizer_atomic_clang_other.h2
-rw-r--r--lib/sanitizer_common/sanitizer_common.cc41
-rw-r--r--lib/sanitizer_common/sanitizer_common.h214
-rw-r--r--lib/sanitizer_common/sanitizer_common_interceptors.inc915
-rwxr-xr-xlib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc6
-rw-r--r--lib/sanitizer_common/sanitizer_common_interface.inc1
-rw-r--r--lib/sanitizer_common/sanitizer_common_libcdep.cc258
-rw-r--r--lib/sanitizer_common/sanitizer_common_nolibc.cc1
-rw-r--r--lib/sanitizer_common/sanitizer_coverage_fuchsia.cc22
-rw-r--r--lib/sanitizer_common/sanitizer_coverage_libcdep_new.cc3
-rw-r--r--lib/sanitizer_common/sanitizer_deadlock_detector2.cc8
-rw-r--r--lib/sanitizer_common/sanitizer_errno.h3
-rw-r--r--lib/sanitizer_common/sanitizer_file.cc59
-rw-r--r--lib/sanitizer_common/sanitizer_flag_parser.h4
-rw-r--r--lib/sanitizer_common/sanitizer_flags.cc8
-rw-r--r--lib/sanitizer_common/sanitizer_flags.inc12
-rw-r--r--lib/sanitizer_common/sanitizer_fuchsia.cc163
-rw-r--r--lib/sanitizer_common/sanitizer_getauxval.h7
-rw-r--r--lib/sanitizer_common/sanitizer_interceptors_ioctl_netbsd.inc1489
-rw-r--r--lib/sanitizer_common/sanitizer_interface_internal.h6
-rw-r--r--lib/sanitizer_common/sanitizer_internal_defs.h49
-rw-r--r--lib/sanitizer_common/sanitizer_libc.cc27
-rw-r--r--lib/sanitizer_common/sanitizer_libc.h7
-rw-r--r--lib/sanitizer_common/sanitizer_libignore.cc7
-rw-r--r--lib/sanitizer_common/sanitizer_libignore.h8
-rw-r--r--lib/sanitizer_common/sanitizer_linux.cc395
-rw-r--r--lib/sanitizer_common/sanitizer_linux.h34
-rw-r--r--lib/sanitizer_common/sanitizer_linux_libcdep.cc232
-rw-r--r--lib/sanitizer_common/sanitizer_linux_s390.cc2
-rw-r--r--lib/sanitizer_common/sanitizer_mac.cc69
-rw-r--r--lib/sanitizer_common/sanitizer_malloc_mac.inc35
-rw-r--r--lib/sanitizer_common/sanitizer_openbsd.cc101
-rw-r--r--lib/sanitizer_common/sanitizer_platform.h41
-rw-r--r--lib/sanitizer_common/sanitizer_platform_interceptors.h197
-rw-r--r--lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc1942
-rw-r--r--lib/sanitizer_common/sanitizer_platform_limits_netbsd.h1970
-rw-r--r--lib/sanitizer_common/sanitizer_platform_limits_openbsd.cc279
-rw-r--r--lib/sanitizer_common/sanitizer_platform_limits_openbsd.h382
-rw-r--r--lib/sanitizer_common/sanitizer_platform_limits_posix.cc21
-rw-r--r--lib/sanitizer_common/sanitizer_platform_limits_posix.h27
-rw-r--r--lib/sanitizer_common/sanitizer_platform_limits_solaris.h12
-rw-r--r--lib/sanitizer_common/sanitizer_posix.cc7
-rw-r--r--lib/sanitizer_common/sanitizer_posix.h1
-rw-r--r--lib/sanitizer_common/sanitizer_posix_libcdep.cc62
-rw-r--r--lib/sanitizer_common/sanitizer_printf.cc38
-rw-r--r--lib/sanitizer_common/sanitizer_procmaps.h7
-rw-r--r--lib/sanitizer_common/sanitizer_procmaps_bsd.cc (renamed from lib/sanitizer_common/sanitizer_procmaps_freebsd.cc)64
-rw-r--r--lib/sanitizer_common/sanitizer_procmaps_common.cc7
-rw-r--r--lib/sanitizer_common/sanitizer_quarantine.h7
-rw-r--r--lib/sanitizer_common/sanitizer_report_decorator.h5
-rw-r--r--lib/sanitizer_common/sanitizer_rtems.cc282
-rw-r--r--lib/sanitizer_common/sanitizer_rtems.h21
-rw-r--r--lib/sanitizer_common/sanitizer_stackdepot.cc6
-rw-r--r--lib/sanitizer_common/sanitizer_stacktrace.cc8
-rw-r--r--lib/sanitizer_common/sanitizer_stacktrace.h13
-rw-r--r--lib/sanitizer_common/sanitizer_stacktrace_printer.cc6
-rw-r--r--lib/sanitizer_common/sanitizer_stacktrace_sparc.cc58
-rw-r--r--lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc42
-rw-r--r--lib/sanitizer_common/sanitizer_suppressions.cc2
-rw-r--r--lib/sanitizer_common/sanitizer_symbolizer.h7
-rw-r--r--lib/sanitizer_common/sanitizer_symbolizer_fuchsia.h40
-rw-r--r--lib/sanitizer_common/sanitizer_symbolizer_libcdep.cc11
-rw-r--r--lib/sanitizer_common/sanitizer_symbolizer_markup.cc (renamed from lib/sanitizer_common/sanitizer_symbolizer_fuchsia.cc)78
-rw-r--r--lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc7
-rw-r--r--lib/sanitizer_common/sanitizer_symbolizer_report.cc282
-rw-r--r--lib/sanitizer_common/sanitizer_symbolizer_rtems.h41
-rw-r--r--lib/sanitizer_common/sanitizer_symbolizer_win.cc4
-rw-r--r--lib/sanitizer_common/sanitizer_syscall_generic.inc3
-rw-r--r--lib/sanitizer_common/sanitizer_syscalls_netbsd.inc3786
-rw-r--r--lib/sanitizer_common/sanitizer_tls_get_addr.cc3
-rw-r--r--lib/sanitizer_common/sanitizer_unwind_linux_libcdep.cc2
-rw-r--r--lib/sanitizer_common/sanitizer_unwind_win.cc75
-rw-r--r--lib/sanitizer_common/sanitizer_vector.h4
-rw-r--r--lib/sanitizer_common/sanitizer_win.cc121
-rwxr-xr-xlib/sanitizer_common/symbolizer/scripts/build_symbolizer.sh7
-rw-r--r--lib/sanitizer_common/symbolizer/scripts/global_symbols.txt9
-rw-r--r--lib/sanitizer_common/tests/CMakeLists.txt14
-rw-r--r--lib/sanitizer_common/tests/sanitizer_allocator_test.cc27
-rw-r--r--lib/sanitizer_common/tests/sanitizer_common_test.cc97
-rw-r--r--lib/sanitizer_common/tests/sanitizer_libc_test.cc89
-rw-r--r--lib/sanitizer_common/tests/sanitizer_linux_test.cc56
-rw-r--r--lib/sanitizer_common/tests/sanitizer_printf_test.cc8
-rw-r--r--lib/sanitizer_common/tests/sanitizer_procmaps_test.cc6
-rw-r--r--lib/sanitizer_common/tests/sanitizer_test_utils.h8
-rw-r--r--lib/sanitizer_common/tests/sanitizer_vector_test.cc17
-rw-r--r--lib/scudo/CMakeLists.txt96
-rw-r--r--lib/scudo/scudo_allocator.cpp495
-rw-r--r--lib/scudo/scudo_allocator.h36
-rw-r--r--lib/scudo/scudo_allocator_combined.h15
-rw-r--r--lib/scudo/scudo_allocator_secondary.h173
-rw-r--r--lib/scudo/scudo_errors.cpp77
-rw-r--r--lib/scudo/scudo_errors.h35
-rw-r--r--lib/scudo/scudo_flags.cpp20
-rw-r--r--lib/scudo/scudo_interceptors.cpp75
-rw-r--r--lib/scudo/scudo_interface_internal.h13
-rw-r--r--lib/scudo/scudo_malloc.cpp85
-rw-r--r--lib/scudo/scudo_new_delete.cpp108
-rw-r--r--lib/scudo/scudo_platform.h16
-rw-r--r--lib/scudo/scudo_termination.cpp2
-rw-r--r--lib/scudo/scudo_tsd.h24
-rw-r--r--lib/scudo/scudo_tsd_exclusive.cpp4
-rw-r--r--lib/scudo/scudo_tsd_exclusive.inc4
-rw-r--r--lib/scudo/scudo_tsd_shared.cpp67
-rw-r--r--lib/scudo/scudo_tsd_shared.inc16
-rw-r--r--lib/scudo/scudo_utils.cpp21
-rw-r--r--lib/stats/CMakeLists.txt6
-rw-r--r--lib/stats/stats.cc2
-rw-r--r--lib/tsan/.clang-format1
-rw-r--r--lib/tsan/CMakeLists.txt34
-rw-r--r--lib/tsan/dd/CMakeLists.txt3
-rwxr-xr-xlib/tsan/go/buildgo.sh25
-rw-r--r--lib/tsan/go/test.c19
-rw-r--r--lib/tsan/go/tsan_go.cc8
-rw-r--r--lib/tsan/rtl/tsan_debugging.cc7
-rw-r--r--lib/tsan/rtl/tsan_interceptors.cc125
-rw-r--r--lib/tsan/rtl/tsan_interceptors_mac.cc37
-rw-r--r--lib/tsan/rtl/tsan_interface.h13
-rw-r--r--lib/tsan/rtl/tsan_malloc_mac.cc10
-rw-r--r--lib/tsan/rtl/tsan_mman.cc50
-rw-r--r--lib/tsan/rtl/tsan_new_delete.cc12
-rw-r--r--lib/tsan/rtl/tsan_platform.h105
-rw-r--r--lib/tsan/rtl/tsan_platform_linux.cc21
-rw-r--r--lib/tsan/rtl/tsan_platform_posix.cc59
-rw-r--r--lib/tsan/rtl/tsan_rtl.cc28
-rw-r--r--lib/tsan/rtl/tsan_rtl.h6
-rw-r--r--lib/tsan/rtl/tsan_rtl_mutex.cc6
-rw-r--r--lib/tsan/rtl/tsan_rtl_report.cc4
-rw-r--r--lib/tsan/rtl/tsan_stack_trace.cc5
-rw-r--r--lib/tsan/rtl/tsan_stack_trace.h4
-rw-r--r--lib/tsan/rtl/tsan_suppressions.cc2
-rw-r--r--lib/tsan/rtl/tsan_symbolize.cc41
-rw-r--r--lib/tsan/rtl/tsan_sync.cc3
-rw-r--r--lib/tsan/tests/CMakeLists.txt3
-rw-r--r--lib/tsan/tests/unit/tsan_mman_test.cc45
-rw-r--r--lib/ubsan/CMakeLists.txt49
-rw-r--r--lib/ubsan/ubsan_diag.cc8
-rw-r--r--lib/ubsan/ubsan_diag.h20
-rw-r--r--lib/ubsan/ubsan_flags.cc13
-rw-r--r--lib/ubsan/ubsan_flags.inc3
-rw-r--r--lib/ubsan/ubsan_handlers.cc122
-rw-r--r--lib/ubsan/ubsan_handlers.h2
-rw-r--r--lib/ubsan/ubsan_handlers_cxx.cc47
-rw-r--r--lib/ubsan/ubsan_init_standalone_preinit.cc36
-rw-r--r--lib/ubsan/ubsan_interface.inc2
-rw-r--r--lib/ubsan/ubsan_monitor.cc76
-rw-r--r--lib/ubsan/ubsan_monitor.h49
-rw-r--r--lib/ubsan/ubsan_platform.h11
-rw-r--r--lib/ubsan/ubsan_signals_standalone.cc23
-rw-r--r--lib/ubsan/ubsan_win_weak_interception.cc1
-rw-r--r--lib/ubsan_minimal/CMakeLists.txt2
-rw-r--r--lib/ubsan_minimal/ubsan_minimal_handlers.cc13
-rw-r--r--lib/xray/CMakeLists.txt225
-rw-r--r--lib/xray/tests/CMakeLists.txt74
-rw-r--r--lib/xray/tests/unit/CMakeLists.txt8
-rw-r--r--lib/xray/tests/unit/allocator_test.cc42
-rw-r--r--lib/xray/tests/unit/buffer_queue_test.cc8
-rw-r--r--lib/xray/tests/unit/fdr_logging_test.cc17
-rw-r--r--lib/xray/tests/unit/function_call_trie_test.cc286
-rw-r--r--lib/xray/tests/unit/profile_collector_test.cc179
-rw-r--r--lib/xray/tests/unit/segmented_array_test.cc200
-rw-r--r--lib/xray/xray_AArch64.cc6
-rw-r--r--lib/xray/xray_allocator.h129
-rw-r--r--lib/xray/xray_arm.cc6
-rw-r--r--lib/xray/xray_basic_flags.cc50
-rw-r--r--lib/xray/xray_basic_flags.h38
-rw-r--r--lib/xray/xray_basic_flags.inc24
-rw-r--r--lib/xray/xray_basic_logging.cc (renamed from lib/xray/xray_inmemory_log.cc)292
-rw-r--r--lib/xray/xray_basic_logging.h (renamed from lib/xray/xray_inmemory_log.h)3
-rw-r--r--lib/xray/xray_buffer_queue.cc52
-rw-r--r--lib/xray/xray_buffer_queue.h127
-rw-r--r--lib/xray/xray_fdr_flags.cc48
-rw-r--r--lib/xray/xray_fdr_flags.h38
-rw-r--r--lib/xray/xray_fdr_flags.inc29
-rw-r--r--lib/xray/xray_fdr_log_records.h2
-rw-r--r--lib/xray/xray_fdr_logging.cc1108
-rw-r--r--lib/xray/xray_fdr_logging_impl.h705
-rw-r--r--lib/xray/xray_flags.cc17
-rw-r--r--lib/xray/xray_flags.h2
-rw-r--r--lib/xray/xray_flags.inc23
-rw-r--r--lib/xray/xray_function_call_trie.h455
-rw-r--r--lib/xray/xray_init.cc32
-rw-r--r--lib/xray/xray_interface.cc131
-rw-r--r--lib/xray/xray_interface_internal.h10
-rw-r--r--lib/xray/xray_log_interface.cc128
-rw-r--r--lib/xray/xray_mips.cc6
-rw-r--r--lib/xray/xray_mips64.cc6
-rw-r--r--lib/xray/xray_powerpc64.cc6
-rw-r--r--lib/xray/xray_profile_collector.cc318
-rw-r--r--lib/xray/xray_profile_collector.h88
-rw-r--r--lib/xray/xray_profiling.cc372
-rw-r--r--lib/xray/xray_profiling_flags.cc40
-rw-r--r--lib/xray/xray_profiling_flags.h39
-rw-r--r--lib/xray/xray_profiling_flags.inc29
-rw-r--r--lib/xray/xray_recursion_guard.h57
-rw-r--r--lib/xray/xray_segmented_array.h375
-rw-r--r--lib/xray/xray_trampoline_x86_64.S127
-rw-r--r--lib/xray/xray_utils.cc16
-rw-r--r--lib/xray/xray_utils.h30
-rw-r--r--lib/xray/xray_x86_64.cc75
-rw-r--r--lib/xray/xray_x86_64.inc5
-rw-r--r--test/CMakeLists.txt6
-rw-r--r--test/asan/CMakeLists.txt28
-rw-r--r--test/asan/TestCases/Darwin/asan_gen_prefixes.cc10
-rw-r--r--test/asan/TestCases/Darwin/odr-lto.cc12
-rw-r--r--test/asan/TestCases/Linux/activation-options.cc1
-rw-r--r--test/asan/TestCases/Linux/allocator_oom_test.cc4
-rw-r--r--test/asan/TestCases/Linux/clang_gcc_abi.cc3
-rw-r--r--test/asan/TestCases/Linux/clone_test.cc1
-rw-r--r--test/asan/TestCases/Linux/coverage-missing.cc24
-rw-r--r--test/asan/TestCases/Linux/interception_readdir_r_test.cc19
-rw-r--r--test/asan/TestCases/Linux/local_alias.cc4
-rw-r--r--test/asan/TestCases/Linux/long-object-path.cc7
-rw-r--r--test/asan/TestCases/Linux/odr-violation.cc4
-rw-r--r--test/asan/TestCases/Linux/pvalloc-overflow.cc41
-rw-r--r--test/asan/TestCases/Linux/quarantine_size_mb.cc4
-rw-r--r--test/asan/TestCases/Linux/stack-trace-dlclose.cc6
-rw-r--r--test/asan/TestCases/Linux/syscalls.cc3
-rw-r--r--test/asan/TestCases/Posix/asan-sigbus.cpp6
-rw-r--r--test/asan/TestCases/Posix/asan-symbolize-bad-path.cc2
-rw-r--r--test/asan/TestCases/Posix/concurrent_overflow.cc7
-rw-r--r--test/asan/TestCases/Posix/coverage-fork.cc4
-rw-r--r--test/asan/TestCases/Posix/coverage-reset.cc2
-rw-r--r--test/asan/TestCases/Posix/coverage.cc4
-rw-r--r--test/asan/TestCases/Posix/fgets_fputs.cc54
-rw-r--r--test/asan/TestCases/Posix/fread_fwrite.cc3
-rw-r--r--test/asan/TestCases/Posix/glob.cc1
-rw-r--r--test/asan/TestCases/Posix/invalid-pointer-pairs-threads.cc4
-rw-r--r--test/asan/TestCases/Posix/ioctl.cc4
-rw-r--r--test/asan/TestCases/Posix/lto-constmerge-odr.cc14
-rw-r--r--test/asan/TestCases/Posix/mmap_limit_mb.cc2
-rw-r--r--test/asan/TestCases/Posix/no_asan_gen_globals.c6
-rw-r--r--test/asan/TestCases/Posix/shared-lib-test.cc1
-rw-r--r--test/asan/TestCases/Posix/stack-use-after-return.cc8
-rw-r--r--test/asan/TestCases/Posix/start-deactivated.cc1
-rw-r--r--test/asan/TestCases/Posix/strndup_oob_test.cc2
-rw-r--r--test/asan/TestCases/Posix/strndup_oob_test2.cc4
-rw-r--r--test/asan/TestCases/Windows/coverage-basic.cc4
-rw-r--r--test/asan/TestCases/Windows/fuse-lld-globals.cc18
-rw-r--r--test/asan/TestCases/Windows/oom.cc2
-rw-r--r--test/asan/TestCases/Windows/user-exception.cc36
-rw-r--r--test/asan/TestCases/alloca_constant_size.cc7
-rw-r--r--test/asan/TestCases/alloca_loop_unpoisoning.cc4
-rw-r--r--test/asan/TestCases/alloca_vla_interact.cc4
-rw-r--r--test/asan/TestCases/allocator_returns_null.cc131
-rw-r--r--test/asan/TestCases/calloc-overflow.cc21
-rw-r--r--test/asan/TestCases/coverage-and-lsan.cc8
-rw-r--r--test/asan/TestCases/coverage-disabled.cc10
-rw-r--r--test/asan/TestCases/debug_double_free.cc3
-rw-r--r--test/asan/TestCases/debug_ppc64_mapping.cc18
-rw-r--r--test/asan/TestCases/debug_report.cc3
-rw-r--r--test/asan/TestCases/handle_noreturn_bug.cc13
-rw-r--r--test/asan/TestCases/heavy_uar_test.cc6
-rw-r--r--test/asan/TestCases/intercept-rethrow-exception.cc64
-rw-r--r--test/asan/TestCases/invalid-pointer-pairs-compare-errors.cc6
-rw-r--r--test/asan/TestCases/invalid-pointer-pairs-compare-null.cc42
-rw-r--r--test/asan/TestCases/invalid-pointer-pairs-compare-success.cc2
-rw-r--r--test/asan/TestCases/invalid-pointer-pairs-subtract-errors.cc2
-rw-r--r--test/asan/TestCases/invalid-pointer-pairs-subtract-success.cc4
-rw-r--r--test/asan/TestCases/malloc-no-intercept.c5
-rw-r--r--test/asan/TestCases/malloc-size-too-big.cc28
-rw-r--r--test/asan/TestCases/non-executable-pc.cpp11
-rw-r--r--test/asan/TestCases/null_deref.cc4
-rw-r--r--test/asan/TestCases/printf-4.c5
-rw-r--r--test/asan/TestCases/scariness_score_test.cc2
-rw-r--r--test/asan/TestCases/strcat-overlap.cc54
-rw-r--r--test/asan/TestCases/strcpy-overlap.cc48
-rw-r--r--test/asan/TestCases/strdup_oob_test.cc2
-rw-r--r--test/asan/TestCases/strncat-overlap.cc48
-rw-r--r--test/asan/TestCases/strncpy-overlap.cc48
-rw-r--r--test/asan/TestCases/suppressions-exec-relative-location.cc12
-rw-r--r--test/asan/TestCases/suppressions-library.cc2
-rw-r--r--test/asan/TestCases/throw_invoke_test.cc2
-rw-r--r--test/asan/TestCases/verbose-log-path_test.cc9
-rw-r--r--test/asan/lit.cfg18
-rw-r--r--test/asan/lit.site.cfg.in3
-rw-r--r--test/builtins/CMakeLists.txt5
-rw-r--r--test/builtins/TestCases/Darwin/os_version_check_test.c2
-rw-r--r--test/builtins/TestCases/Darwin/os_version_check_test_no_core_foundation.c2
-rw-r--r--test/builtins/Unit/lit.cfg8
-rw-r--r--test/builtins/Unit/riscv/mulsi3_test.c119
-rw-r--r--test/cfi/CMakeLists.txt22
-rw-r--r--test/cfi/create-derivers.test6
-rw-r--r--test/cfi/cross-dso-diagnostic.cpp47
-rw-r--r--test/cfi/cross-dso/icall/dlopen.cpp6
-rw-r--r--test/cfi/lit.site.cfg.in1
-rw-r--r--test/cfi/mfcall.cpp96
-rw-r--r--test/cfi/simple-pass.cpp5
-rw-r--r--test/cfi/target_uninstrumented.cpp6
-rw-r--r--test/dfsan/custom.cc2
-rw-r--r--test/dfsan/trace-cmp.c50
-rw-r--r--test/fuzzer/AbsNegAndConstant64Test.cpp3
-rw-r--r--test/fuzzer/AbsNegAndConstantTest.cpp3
-rw-r--r--test/fuzzer/AcquireCrashStateTest.cpp18
-rw-r--r--test/fuzzer/Bingo.h1
-rw-r--r--test/fuzzer/CMakeLists.txt108
-rw-r--r--test/fuzzer/CleanseTest.cpp2
-rw-r--r--test/fuzzer/ExplodeDFSanLabelsTest.cpp23
-rw-r--r--test/fuzzer/LeakTest.cpp2
-rw-r--r--test/fuzzer/MultipleConstraintsOnSmallInputTest.cpp4129
-rw-r--r--test/fuzzer/NullDerefTest.cpp4
-rw-r--r--test/fuzzer/OnlySomeBytesTest.cpp40
-rw-r--r--test/fuzzer/PrintUnstableStatsTest.cpp69
-rw-r--r--test/fuzzer/ShrinkValueProfileTest.cpp2
-rw-r--r--test/fuzzer/SimpleCmpTest.cpp6
-rw-r--r--test/fuzzer/SimpleTestStdio.cpp26
-rw-r--r--test/fuzzer/SwapCmpTest.cpp6
-rw-r--r--test/fuzzer/SymbolizeDeadlock.cpp35
-rw-r--r--test/fuzzer/ThreadedLeakTest.cpp2
-rw-r--r--test/fuzzer/ThreeBytes.cpp14
-rw-r--r--test/fuzzer/ThreeFunctionsTest.cpp36
-rw-r--r--test/fuzzer/TraceMallocThreadedTest.cpp3
-rw-r--r--test/fuzzer/UninitializedStrlen.cpp14
-rw-r--r--test/fuzzer/UseAfterDtor.cpp27
-rw-r--r--test/fuzzer/acquire-crash-state.test3
-rw-r--r--test/fuzzer/afl-driver-extra-stats.test5
-rw-r--r--test/fuzzer/afl-driver-stderr.test10
-rw-r--r--test/fuzzer/afl-driver.test12
-rw-r--r--test/fuzzer/bad-strcmp.test2
-rw-r--r--test/fuzzer/bogus-initialize.test4
-rw-r--r--test/fuzzer/buffer-overflow-on-input.test5
-rw-r--r--test/fuzzer/caller-callee.test3
-rw-r--r--test/fuzzer/cleanse.test2
-rw-r--r--test/fuzzer/counters.test9
-rw-r--r--test/fuzzer/coverage.test29
-rw-r--r--test/fuzzer/cxxstring.test4
-rw-r--r--test/fuzzer/dataflow.test84
-rw-r--r--test/fuzzer/deep-recursion.test2
-rw-r--r--test/fuzzer/disable-leaks.test3
-rw-r--r--test/fuzzer/dso.test7
-rw-r--r--test/fuzzer/dump_coverage.test17
-rw-r--r--test/fuzzer/equivalence-signals.test9
-rw-r--r--test/fuzzer/equivalence.test6
-rw-r--r--test/fuzzer/exit-report.test2
-rw-r--r--test/fuzzer/exit_on_src_pos.test9
-rw-r--r--test/fuzzer/extra-counters.test4
-rw-r--r--test/fuzzer/fprofile-instr-generate.test7
-rw-r--r--test/fuzzer/full-coverage-set.test3
-rw-r--r--test/fuzzer/fuzzer-customcrossover.test4
-rw-r--r--test/fuzzer/fuzzer-customcrossoverandmutate.test2
-rw-r--r--test/fuzzer/fuzzer-custommutator.test2
-rw-r--r--test/fuzzer/fuzzer-dict.test4
-rw-r--r--test/fuzzer/fuzzer-dirs.test8
-rw-r--r--test/fuzzer/fuzzer-fdmask.test34
-rw-r--r--test/fuzzer/fuzzer-finalstats.test4
-rw-r--r--test/fuzzer/fuzzer-flags.test10
-rw-r--r--test/fuzzer/fuzzer-leak.test23
-rw-r--r--test/fuzzer/fuzzer-mutationstats.test5
-rw-r--r--test/fuzzer/fuzzer-oom-with-profile.test2
-rw-r--r--test/fuzzer/fuzzer-oom.test11
-rw-r--r--test/fuzzer/fuzzer-printcovpcs.test4
-rw-r--r--test/fuzzer/fuzzer-runs.test6
-rw-r--r--test/fuzzer/fuzzer-seed.test2
-rw-r--r--test/fuzzer/fuzzer-segv.test4
-rw-r--r--test/fuzzer/fuzzer-singleinputs.test6
-rw-r--r--test/fuzzer/fuzzer-threaded.test8
-rw-r--r--test/fuzzer/fuzzer-timeout.test8
-rw-r--r--test/fuzzer/fuzzer-ubsan.test2
-rw-r--r--test/fuzzer/fuzzer.test70
-rw-r--r--test/fuzzer/gc-sections.test10
-rw-r--r--test/fuzzer/handle-unstable.test42
-rw-r--r--test/fuzzer/initialize.test3
-rw-r--r--test/fuzzer/inline-8bit-counters.test4
-rw-r--r--test/fuzzer/lit.cfg58
-rw-r--r--test/fuzzer/lit.site.cfg.in11
-rw-r--r--test/fuzzer/max-number-of-runs.test6
-rw-r--r--test/fuzzer/memcmp.test3
-rw-r--r--test/fuzzer/memcmp64.test3
-rw-r--r--test/fuzzer/merge-control-file.test15
-rw-r--r--test/fuzzer/merge-posix.test5
-rw-r--r--test/fuzzer/merge-sigusr.test3
-rw-r--r--test/fuzzer/merge-summary.test4
-rw-r--r--test/fuzzer/merge.test17
-rw-r--r--test/fuzzer/minimize_crash.test23
-rw-r--r--test/fuzzer/minimize_two_crashes.test8
-rw-r--r--test/fuzzer/msan.test24
-rw-r--r--test/fuzzer/not-instrumented.test4
-rw-r--r--test/fuzzer/null-deref-on-empty.test4
-rw-r--r--test/fuzzer/null-deref.test10
-rw-r--r--test/fuzzer/only-some-bytes.test38
-rw-r--r--test/fuzzer/overwrite-input.test2
-rw-r--r--test/fuzzer/print-func.test5
-rw-r--r--test/fuzzer/print_unstable_stats.test3
-rw-r--r--test/fuzzer/recommended-dictionary.test3
-rw-r--r--test/fuzzer/reduce_inputs.test6
-rw-r--r--test/fuzzer/repeated-bytes.test2
-rw-r--r--test/fuzzer/shrink.test6
-rw-r--r--test/fuzzer/sigusr.test3
-rw-r--r--test/fuzzer/simple-cmp.test6
-rw-r--r--test/fuzzer/simple.test7
-rw-r--r--test/fuzzer/standalone.test2
-rw-r--r--test/fuzzer/strcmp.test3
-rw-r--r--test/fuzzer/strncmp-oob.test6
-rw-r--r--test/fuzzer/strncmp.test3
-rw-r--r--test/fuzzer/strstr.test3
-rw-r--r--test/fuzzer/swap-cmp.test2
-rw-r--r--test/fuzzer/symbolize-deadlock.test2
-rw-r--r--test/fuzzer/target-function.test30
-rw-r--r--test/fuzzer/three-bytes.test8
-rw-r--r--test/fuzzer/trace-malloc-2.test2
-rw-r--r--test/fuzzer/trace-malloc-threaded.test7
-rw-r--r--test/fuzzer/trace-malloc-unbalanced.test4
-rw-r--r--test/fuzzer/trace-malloc.test2
-rw-r--r--test/fuzzer/trace-pc.test4
-rw-r--r--test/fuzzer/ulimit.test2
-rw-r--r--test/fuzzer/value-profile-cmp.test2
-rw-r--r--test/fuzzer/value-profile-cmp2.test2
-rw-r--r--test/fuzzer/value-profile-cmp3.test2
-rw-r--r--test/fuzzer/value-profile-cmp4.test2
-rw-r--r--test/fuzzer/value-profile-div.test4
-rw-r--r--test/fuzzer/value-profile-load.test4
-rw-r--r--test/fuzzer/value-profile-mem.test3
-rw-r--r--test/fuzzer/value-profile-set.test2
-rw-r--r--test/fuzzer/value-profile-strcmp.test3
-rw-r--r--test/fuzzer/value-profile-strncmp.test3
-rw-r--r--test/fuzzer/value-profile-switch.test5
-rw-r--r--test/hwasan/TestCases/Linux/aligned_alloc-alignment.cc25
-rw-r--r--test/hwasan/TestCases/Linux/lit.local.cfg9
-rw-r--r--test/hwasan/TestCases/Linux/pvalloc-overflow.cc46
-rw-r--r--test/hwasan/TestCases/Posix/lit.local.cfg9
-rw-r--r--test/hwasan/TestCases/Posix/posix_memalign-alignment.cc22
-rw-r--r--test/hwasan/TestCases/allocator_returns_null.cc (renamed from test/msan/allocator_returns_null.cc)87
-rw-r--r--test/hwasan/TestCases/check-interface.cc22
-rw-r--r--test/hwasan/TestCases/stack-oob.cc25
-rw-r--r--test/hwasan/TestCases/stack-uar.cc23
-rw-r--r--test/hwasan/TestCases/use-after-free.c39
-rw-r--r--test/hwasan/TestCases/use-after-free.cc39
-rw-r--r--test/hwasan/lit.cfg4
-rw-r--r--test/lit.common.cfg118
-rw-r--r--test/lit.common.configured.in10
-rw-r--r--test/lsan/TestCases/Linux/fork_with_threads.cc35
-rw-r--r--test/lsan/TestCases/Linux/log-path_test.cc26
-rw-r--r--test/lsan/TestCases/Linux/use_tls_dynamic.cc2
-rw-r--r--test/lsan/TestCases/Posix/lit.local.cfg9
-rw-r--r--test/lsan/TestCases/allocator_returns_null.cc131
-rw-r--r--test/msan/Linux/name_to_handle_at.cc28
-rw-r--r--test/msan/Linux/sendmsg.cc137
-rw-r--r--test/msan/check-handler.cc16
-rw-r--r--test/msan/coverage-levels.cc10
-rw-r--r--test/msan/dtls_test.c3
-rw-r--r--test/msan/dtor-member.cc2
-rw-r--r--test/msan/fgets_fputs.cc47
-rw-r--r--test/msan/fstat.cc15
-rw-r--r--test/msan/getutent.cc4
-rw-r--r--test/msan/iconv.cc2
-rw-r--r--test/msan/lit.cfg2
-rw-r--r--test/msan/mmap.cc6
-rw-r--r--test/msan/pthread_getattr_np_deadlock.cc10
-rw-r--r--test/msan/pthread_getname_np.cc16
-rw-r--r--test/msan/pvalloc.cc43
-rw-r--r--test/msan/scoped-interceptors.cc52
-rw-r--r--test/msan/strlen_of_shadow.cc2
-rw-r--r--test/msan/textdomain.cc2
-rw-r--r--test/msan/tls_reuse.cc1
-rw-r--r--test/msan/tsearch.cc2
-rw-r--r--test/msan/tzset.cc1
-rw-r--r--test/msan/use-after-dtor.cc19
-rw-r--r--test/msan/vector_div.cc17
-rw-r--r--test/msan/wcsxfrm.cc30
-rw-r--r--test/profile/Inputs/instrprof-dlopen-dlclose-main.c86
-rw-r--r--test/profile/Inputs/instrprof-dlopen-dlclose-main.c.gcov91
-rw-r--r--test/profile/Inputs/instrprof-dlopen-dlclose-main_three-libs.c.gcov91
-rw-r--r--test/profile/Inputs/instrprof-dlopen-func.c2
-rw-r--r--test/profile/Inputs/instrprof-dlopen-func.c.gcov6
-rw-r--r--test/profile/Inputs/instrprof-dlopen-func2.c2
-rw-r--r--test/profile/Inputs/instrprof-dlopen-func2.c.gcov6
-rw-r--r--test/profile/Inputs/instrprof-dlopen-func3.c1
-rw-r--r--test/profile/Inputs/instrprof-dlopen-func3.c.gcov6
-rw-r--r--test/profile/Inputs/instrprof-gcov-__gcov_flush-terminate.c13
-rw-r--r--test/profile/Inputs/instrprof-gcov-__gcov_flush-terminate.c.gcov18
-rw-r--r--test/profile/Inputs/instrprof-gcov-exceptions.cpp11
-rw-r--r--test/profile/Inputs/instrprof-gcov-exceptions.cpp.gcov16
-rw-r--r--test/profile/Inputs/instrprof-gcov-multiple-bbs-single-line.c20
-rw-r--r--test/profile/Inputs/instrprof-gcov-multiple-bbs-single-line.c.gcov34
-rw-r--r--test/profile/Inputs/instrprof-shared-lib.c.gcov14
-rw-r--r--test/profile/Inputs/instrprof-shared-lib_called-twice.c.gcov14
-rw-r--r--test/profile/Inputs/instrprof-shared-lib_in-loop.c.gcov14
-rw-r--r--test/profile/Inputs/instrprof-shared-main-gcov-flush.c36
-rw-r--r--test/profile/Inputs/instrprof-shared-main-gcov-flush_no-writeout.c.gcov41
-rw-r--r--test/profile/Inputs/instrprof-shared-main-gcov-flush_shared-call-after.c.gcov41
-rw-r--r--test/profile/Inputs/instrprof-shared-main-gcov-flush_shared-call-before-after.c.gcov41
-rw-r--r--test/profile/Inputs/instrprof-shared-main-gcov-flush_shared-call-before.c.gcov41
-rw-r--r--test/profile/Inputs/instrprof-shared-main.c.gcov18
-rw-r--r--test/profile/Linux/counter_promo_nest.c3
-rw-r--r--test/profile/Linux/instrprof-value-merge.c79
-rw-r--r--test/profile/instrprof-darwin-dead-strip.c16
-rw-r--r--test/profile/instrprof-darwin-exports.c11
-rw-r--r--test/profile/instrprof-dlopen-dlclose-gcov.test30
-rw-r--r--test/profile/instrprof-gcov-__gcov_flush-terminate.test12
-rw-r--r--test/profile/instrprof-gcov-exceptions.test21
-rw-r--r--test/profile/instrprof-gcov-multiple-bbs-single-line.test13
-rw-r--r--test/profile/instrprof-gcov-two-objects.test18
-rw-r--r--test/profile/instrprof-get-filename.c39
-rw-r--r--test/profile/instrprof-path.c2
-rw-r--r--test/profile/instrprof-reset-counters.c2
-rw-r--r--test/profile/instrprof-shared-gcov-flush.test52
-rw-r--r--test/profile/instrprof-visibility.cpp4
-rw-r--r--test/sanitizer_common/CMakeLists.txt8
-rw-r--r--test/sanitizer_common/TestCases/Linux/aligned_alloc-alignment.cc43
-rw-r--r--test/sanitizer_common/TestCases/Linux/hard_rss_limit_mb_test.cc3
-rw-r--r--test/sanitizer_common/TestCases/Linux/mmap64_test.c13
-rw-r--r--test/sanitizer_common/TestCases/Linux/mmap_write_exec.cpp37
-rw-r--r--test/sanitizer_common/TestCases/Linux/name_to_handle_at.cc21
-rw-r--r--test/sanitizer_common/TestCases/Linux/pthread_mutex.cc34
-rw-r--r--test/sanitizer_common/TestCases/Linux/pvalloc-overflow.cc47
-rw-r--r--test/sanitizer_common/TestCases/Linux/soft_rss_limit_mb_test.cc6
-rw-r--r--test/sanitizer_common/TestCases/Linux/sysconf_interceptor_bypass_test.cc8
-rw-r--r--test/sanitizer_common/TestCases/NetBSD/faccessat.cc6
-rw-r--r--test/sanitizer_common/TestCases/NetBSD/getgrouplist.cc29
-rw-r--r--test/sanitizer_common/TestCases/NetBSD/getgroupmembership.cc30
-rw-r--r--test/sanitizer_common/TestCases/NetBSD/gid_from_group.cc16
-rw-r--r--test/sanitizer_common/TestCases/NetBSD/group_from_gid.cc17
-rw-r--r--test/sanitizer_common/TestCases/NetBSD/lit.local.cfg9
-rw-r--r--test/sanitizer_common/TestCases/NetBSD/netent.cc84
-rw-r--r--test/sanitizer_common/TestCases/NetBSD/paccept.cc74
-rw-r--r--test/sanitizer_common/TestCases/NetBSD/protoent.cc89
-rw-r--r--test/sanitizer_common/TestCases/NetBSD/strmode.cc20
-rw-r--r--test/sanitizer_common/TestCases/NetBSD/ttyent.cc70
-rw-r--r--test/sanitizer_common/TestCases/NetBSD/uid_from_user.cc16
-rw-r--r--test/sanitizer_common/TestCases/NetBSD/user_from_uid.cc17
-rw-r--r--test/sanitizer_common/TestCases/Posix/access.cc5
-rw-r--r--test/sanitizer_common/TestCases/Posix/devname.cc23
-rw-r--r--test/sanitizer_common/TestCases/Posix/devname_r.cc28
-rw-r--r--test/sanitizer_common/TestCases/Posix/fgetln.cc24
-rw-r--r--test/sanitizer_common/TestCases/Posix/fgets.cc20
-rw-r--r--test/sanitizer_common/TestCases/Posix/fputs_puts.cc18
-rw-r--r--test/sanitizer_common/TestCases/Posix/getpass.cc8
-rw-r--r--test/sanitizer_common/TestCases/Posix/illegal_read_test.cc15
-rw-r--r--test/sanitizer_common/TestCases/Posix/illegal_write_test.cc14
-rw-r--r--test/sanitizer_common/TestCases/Posix/lstat.cc16
-rw-r--r--test/sanitizer_common/TestCases/Posix/mmap_test.c11
-rw-r--r--test/sanitizer_common/TestCases/Posix/posix_memalign-alignment.cc47
-rw-r--r--test/sanitizer_common/TestCases/Posix/readlink.c26
-rw-r--r--test/sanitizer_common/TestCases/Posix/readlinkat.c26
-rw-r--r--test/sanitizer_common/TestCases/Posix/sanitizer_set_death_callback_test.cc11
-rw-r--r--test/sanitizer_common/TestCases/Posix/strlcat.cc54
-rw-r--r--test/sanitizer_common/TestCases/Posix/strlcpy.cc54
-rw-r--r--test/sanitizer_common/TestCases/Posix/strxfrm.c20
-rw-r--r--test/sanitizer_common/TestCases/Posix/wcsxfrm.c20
-rw-r--r--test/sanitizer_common/TestCases/allocator_returns_null.cc114
-rw-r--r--test/sanitizer_common/TestCases/ctype.c89
-rw-r--r--test/sanitizer_common/TestCases/get_module_and_offset_for_pc.cc5
-rwxr-xr-xtest/sanitizer_common/ios_commands/iossim_prepare.py5
-rw-r--r--test/sanitizer_common/lit.common.cfg5
-rw-r--r--test/scudo/aligned-new.cpp86
-rw-r--r--test/scudo/alignment.c2
-rw-r--r--test/scudo/double-free.cpp8
-rw-r--r--test/scudo/fsanitize.c28
-rw-r--r--test/scudo/interface.cpp15
-rw-r--r--test/scudo/lit.cfg23
-rw-r--r--test/scudo/memalign.c28
-rw-r--r--test/scudo/mismatch.cpp24
-rw-r--r--test/scudo/preload.cpp3
-rw-r--r--test/scudo/random_shuffle.cpp16
-rw-r--r--test/scudo/realloc.cpp10
-rw-r--r--test/scudo/sized-delete.cpp2
-rw-r--r--test/scudo/sizes.cpp32
-rw-r--r--test/scudo/stats.c21
-rw-r--r--test/scudo/symbols.test8
-rw-r--r--test/scudo/valloc.c5
-rw-r--r--test/shadowcallstack/CMakeLists.txt21
-rw-r--r--test/shadowcallstack/init.c12
-rw-r--r--test/shadowcallstack/libc_support.h41
-rw-r--r--test/shadowcallstack/lit.cfg23
-rw-r--r--test/shadowcallstack/lit.site.cfg.in12
-rw-r--r--test/shadowcallstack/minimal_runtime.h43
-rw-r--r--test/shadowcallstack/overflow-aarch64.c5
-rw-r--r--test/shadowcallstack/overflow-x86_64.c5
-rw-r--r--test/shadowcallstack/overflow.c39
-rw-r--r--test/tsan/CMakeLists.txt17
-rw-r--r--test/tsan/Darwin/external-swift-debugging.cc68
-rw-r--r--test/tsan/Darwin/gcd-after-null.mm23
-rw-r--r--test/tsan/Darwin/norace-objcxx-run-time.mm2
-rw-r--r--test/tsan/Darwin/objc-synchronize-tagged.mm62
-rw-r--r--test/tsan/Darwin/objc-synchronize.mm57
-rw-r--r--test/tsan/allocator_returns_null.cc124
-rw-r--r--test/tsan/global_race.cc9
-rw-r--r--test/tsan/ignore_lib0.cc11
-rw-r--r--test/tsan/ignore_lib1.cc11
-rw-r--r--test/tsan/ignore_lib2.cc11
-rw-r--r--test/tsan/ignore_lib3.cc9
-rw-r--r--test/tsan/ignore_lib4.cc11
-rw-r--r--test/tsan/ignore_lib5.cc11
-rw-r--r--test/tsan/ignored-interceptors-mmap.cc1
-rw-r--r--test/tsan/java_symbolization.cc18
-rw-r--r--test/tsan/java_symbolization_legacy.cc44
-rw-r--r--test/tsan/lit.cfg9
-rw-r--r--test/tsan/lit.site.cfg.in3
-rw-r--r--test/tsan/mutex_destroy_locked2.cc29
-rw-r--r--test/tsan/race_on_fputs.cc29
-rw-r--r--test/tsan/simple_stack2.cc14
-rw-r--r--test/tsan/static_init6.cc3
-rw-r--r--test/tsan/strerror_r.cc18
-rw-r--r--test/tsan/suppressions_mutex.cc19
-rw-r--r--test/tsan/suppressions_mutex.cc.supp2
-rw-r--r--test/tsan/test.h2
-rw-r--r--test/tsan/thread_name.cc2
-rw-r--r--test/tsan/tls_race2.cc3
-rw-r--r--test/ubsan/CMakeLists.txt3
-rw-r--r--test/ubsan/TestCases/Float/cast-overflow.cpp10
-rw-r--r--test/ubsan/TestCases/Integer/negate-overflow.cpp4
-rw-r--r--test/ubsan/TestCases/Integer/no-recover.cpp2
-rw-r--r--test/ubsan/TestCases/Integer/suppressions.cpp2
-rw-r--r--test/ubsan/TestCases/Misc/coverage-levels.cc16
-rw-r--r--test/ubsan/TestCases/Misc/missing_return.cpp2
-rw-r--r--test/ubsan/TestCases/Misc/monitor.cpp44
-rw-r--r--test/ubsan/TestCases/TypeCheck/Function/function.cpp44
-rw-r--r--test/ubsan/TestCases/TypeCheck/misaligned.cpp2
-rw-r--r--test/ubsan/TestCases/TypeCheck/vptr.cpp2
-rw-r--r--test/ubsan/lit.common.cfg2
-rw-r--r--test/ubsan_minimal/CMakeLists.txt3
-rw-r--r--test/ubsan_minimal/lit.common.cfg2
-rw-r--r--test/xray/CMakeLists.txt12
-rw-r--r--test/xray/TestCases/Posix/always-never-instrument.cc (renamed from test/xray/TestCases/Linux/always-never-instrument.cc)2
-rw-r--r--test/xray/TestCases/Posix/arg1-arg0-logging.cc (renamed from test/xray/TestCases/Linux/arg1-arg0-logging.cc)2
-rw-r--r--test/xray/TestCases/Posix/arg1-logger.cc (renamed from test/xray/TestCases/Linux/arg1-logger.cc)4
-rw-r--r--test/xray/TestCases/Posix/arg1-logging-implicit-this.cc (renamed from test/xray/TestCases/Linux/arg1-logging-implicit-this.cc)4
-rw-r--r--test/xray/TestCases/Posix/argv0-log-file-name.cc (renamed from test/xray/TestCases/Linux/argv0-log-file-name.cc)0
-rw-r--r--test/xray/TestCases/Posix/basic-filtering.cc (renamed from test/xray/TestCases/Linux/basic-filtering.cc)18
-rw-r--r--test/xray/TestCases/Posix/c-test.cc15
-rw-r--r--test/xray/TestCases/Posix/common-trampoline-alignment.cc (renamed from test/xray/TestCases/Linux/common-trampoline-alignment.cc)2
-rw-r--r--test/xray/TestCases/Posix/coverage-sample.cc (renamed from test/xray/TestCases/Linux/coverage-sample.cc)0
-rw-r--r--test/xray/TestCases/Posix/custom-event-handler-alignment.cc (renamed from test/xray/TestCases/Linux/custom-event-handler-alignment.cc)2
-rw-r--r--test/xray/TestCases/Posix/custom-event-logging.cc (renamed from test/xray/TestCases/Linux/custom-event-logging.cc)0
-rw-r--r--test/xray/TestCases/Posix/fdr-mode-inmemory.cc50
-rw-r--r--test/xray/TestCases/Posix/fdr-mode-multiple.cc76
-rw-r--r--test/xray/TestCases/Posix/fdr-mode.cc (renamed from test/xray/TestCases/Linux/fdr-mode.cc)67
-rw-r--r--test/xray/TestCases/Posix/fdr-single-thread.cc (renamed from test/xray/TestCases/Linux/fdr-single-thread.cc)8
-rw-r--r--test/xray/TestCases/Posix/fdr-thread-order.cc (renamed from test/xray/TestCases/Linux/fdr-thread-order.cc)10
-rw-r--r--test/xray/TestCases/Posix/fixedsize-logging.cc (renamed from test/xray/TestCases/Linux/fixedsize-logging.cc)0
-rw-r--r--test/xray/TestCases/Posix/fork_basic_logging.cc100
-rw-r--r--test/xray/TestCases/Posix/func-id-utils.cc (renamed from test/xray/TestCases/Linux/func-id-utils.cc)0
-rw-r--r--test/xray/TestCases/Posix/logging-modes.cc (renamed from test/xray/TestCases/Linux/logging-modes.cc)52
-rw-r--r--test/xray/TestCases/Posix/optional-inmemory-log.cc (renamed from test/xray/TestCases/Linux/optional-inmemory-log.cc)0
-rw-r--r--test/xray/TestCases/Posix/patching-unpatching.cc (renamed from test/xray/TestCases/Linux/patching-unpatching.cc)0
-rw-r--r--test/xray/TestCases/Posix/pic_test.cc (renamed from test/xray/TestCases/Linux/pic_test.cc)4
-rw-r--r--test/xray/TestCases/Posix/profiling-multi-threaded.cc57
-rw-r--r--test/xray/TestCases/Posix/profiling-single-threaded.cc65
-rw-r--r--test/xray/TestCases/Posix/quiet-start.cc (renamed from test/xray/TestCases/Linux/quiet-start.cc)2
-rw-r--r--test/xray/lit.cfg13
-rwxr-xr-xutils/generate_netbsd_ioctls.awk759
-rwxr-xr-xutils/generate_netbsd_syscalls.awk2986
870 files changed, 50314 insertions, 6742 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4b953b212829..86ca2b3ef74b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -9,6 +9,7 @@ cmake_minimum_required(VERSION 3.4.3)
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR COMPILER_RT_STANDALONE_BUILD)
project(CompilerRT C CXX ASM)
set(COMPILER_RT_STANDALONE_BUILD TRUE)
+ set_property(GLOBAL PROPERTY USE_FOLDERS ON)
endif()
# Add path for custom compiler-rt modules.
@@ -63,6 +64,11 @@ set(COMPILER_RT_BAREMETAL_BUILD OFF CACHE BOOLEAN
if (COMPILER_RT_STANDALONE_BUILD)
load_llvm_config()
+ if (TARGET intrinsics_gen)
+ # Loading the llvm config causes this target to be imported so place it
+ # under the appropriate folder in an IDE.
+ set_target_properties(intrinsics_gen PROPERTIES FOLDER "Compiler-RT Misc")
+ endif()
# Find Python interpreter.
set(Python_ADDITIONAL_VERSIONS 2.7 2.6 2.5)
@@ -96,6 +102,8 @@ pythonize_bool(ANDROID)
set(COMPILER_RT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
set(COMPILER_RT_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
+pythonize_bool(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR)
+
# We support running instrumented tests when we're not cross compiling
# and target a UNIX-like system or Windows.
# We can run tests on Android even when we are cross-compiling.
@@ -112,9 +120,6 @@ option(COMPILER_RT_EXTERNALIZE_DEBUGINFO
# COMPILER_RT_DEBUG_PYBOOL is used by lit.common.configured.in.
pythonize_bool(COMPILER_RT_DEBUG)
-include(HandleCompilerRT)
-include(config-ix)
-
if(APPLE AND SANITIZER_MIN_OSX_VERSION AND SANITIZER_MIN_OSX_VERSION VERSION_LESS "10.9")
# Mac OS X prior to 10.9 had problems with exporting symbols from
# libc++/libc++abi.
@@ -133,41 +138,34 @@ pythonize_bool(SANITIZER_CAN_USE_CXXABI)
set(SANITIZER_CXX_ABI "default" CACHE STRING
"Specify C++ ABI library to use.")
-set(CXXABIS none default libcxxabi libstdc++ libc++)
+set(CXXABIS none default libstdc++ libc++)
set_property(CACHE SANITIZER_CXX_ABI PROPERTY STRINGS ;${CXXABIS})
if (SANITIZER_CXX_ABI STREQUAL "default")
- if (HAVE_LIBCXXABI AND COMPILER_RT_DEFAULT_TARGET_ONLY)
- set(SANITIZER_CXX_ABI_LIBNAME "libcxxabi")
- set(SANITIZER_CXX_ABI_INTREE 1)
- elseif (APPLE)
- set(SANITIZER_CXX_ABI_LIBNAME "libcxxabi")
+ if (APPLE)
+ set(SANITIZER_CXX_ABI_LIBNAME "libc++")
set(SANITIZER_CXX_ABI_SYSTEM 1)
+ elseif (FUCHSIA)
+ set(SANITIZER_CXX_ABI_LIBNAME "libc++")
+ set(SANITIZER_CXX_ABI_INTREE 1)
else()
set(SANITIZER_CXX_ABI_LIBNAME "libstdc++")
+ set(SANITIZER_CXX_ABI_SYSTEM 1)
endif()
else()
set(SANITIZER_CXX_ABI_LIBNAME "${SANITIZER_CXX_ABI}")
+ set(SANITIZER_CXX_ABI_SYSTEM 1)
endif()
-if (SANITIZER_CXX_ABI_LIBNAME STREQUAL "libcxxabi")
- if (SANITIZER_CXX_ABI_INTREE)
- if (TARGET unwind_shared OR HAVE_LIBUNWIND)
- list(APPEND SANITIZER_CXX_ABI_LIBRARY unwind_shared)
- endif()
- if (TARGET cxxabi_shared OR HAVE_LIBCXXABI)
- list(APPEND SANITIZER_CXX_ABI_LIBRARY cxxabi_shared)
- endif()
- else()
- list(APPEND SANITIZER_CXX_ABI_LIBRARY "c++abi")
- endif()
-elseif (SANITIZER_CXX_ABI_LIBNAME STREQUAL "libc++")
- list(APPEND SANITIZER_CXX_ABI_LIBRARY "c++")
-elseif (SANITIZER_CXX_ABI_LIBNAME STREQUAL "libstdc++")
- append_list_if(COMPILER_RT_HAS_LIBSTDCXX stdc++ SANITIZER_CXX_ABI_LIBRARY)
+set(DEFAULT_COMPILER_RT_USE_BUILTINS_LIBRARY OFF)
+if (FUCHSIA)
+ set(DEFAULT_COMPILER_RT_USE_BUILTINS_LIBRARY ON)
endif()
-option(SANITIZER_USE_COMPILER_RT "Use compiler-rt builtins instead of libgcc" OFF)
+option(COMPILER_RT_USE_BUILTINS_LIBRARY
+ "Use compiler-rt builtins instead of libgcc" ${DEFAULT_COMPILER_RT_USE_BUILTINS_LIBRARY})
+
+include(config-ix)
#================================
# Setup Compiler Flags
@@ -274,12 +272,14 @@ else()
set(SANITIZER_LIMIT_FRAME_SIZE FALSE)
endif()
+if(FUCHSIA OR UNIX)
+ set(SANITIZER_USE_SYMBOLS TRUE)
+else()
+ set(SANITIZER_USE_SYMBOLS FALSE)
+endif()
+
# Build sanitizer runtimes with debug info.
-if(COMPILER_RT_HAS_GLINE_TABLES_ONLY_FLAG AND NOT COMPILER_RT_DEBUG)
- list(APPEND SANITIZER_COMMON_CFLAGS -gline-tables-only)
-elseif(COMPILER_RT_HAS_G_FLAG)
- list(APPEND SANITIZER_COMMON_CFLAGS -g)
-elseif(MSVC)
+if(MSVC)
# Use /Z7 instead of /Zi for the asan runtime. This avoids the LNK4099
# warning from the MS linker complaining that it can't find the 'vc140.pdb'
# file used by our object library compilations.
@@ -287,6 +287,10 @@ elseif(MSVC)
llvm_replace_compiler_option(CMAKE_CXX_FLAGS "/Z[i7I]" "/Z7")
llvm_replace_compiler_option(CMAKE_CXX_FLAGS_DEBUG "/Z[i7I]" "/Z7")
llvm_replace_compiler_option(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/Z[i7I]" "/Z7")
+elseif(COMPILER_RT_HAS_GLINE_TABLES_ONLY_FLAG AND NOT COMPILER_RT_DEBUG)
+ list(APPEND SANITIZER_COMMON_CFLAGS -gline-tables-only)
+elseif(COMPILER_RT_HAS_G_FLAG)
+ list(APPEND SANITIZER_COMMON_CFLAGS -g)
endif()
if(LLVM_ENABLE_MODULES)
@@ -309,9 +313,7 @@ append_list_if(COMPILER_RT_HAS_WD4800_FLAG /wd4800 SANITIZER_COMMON_CFLAGS)
# Set common link flags.
append_list_if(COMPILER_RT_HAS_NODEFAULTLIBS_FLAG -nodefaultlibs SANITIZER_COMMON_LINK_FLAGS)
-if (SANITIZER_USE_COMPILER_RT)
- list(APPEND SANITIZER_COMMON_LINK_FLAGS -rtlib=compiler-rt)
- find_compiler_rt_library(builtins COMPILER_RT_BUILTINS_LIBRARY)
+if (COMPILER_RT_USE_BUILTINS_LIBRARY)
list(APPEND SANITIZER_COMMON_LINK_LIBS ${COMPILER_RT_BUILTINS_LIBRARY})
else()
if (ANDROID)
@@ -323,11 +325,40 @@ endif()
append_list_if(COMPILER_RT_HAS_LIBC c SANITIZER_COMMON_LINK_LIBS)
+if(ANDROID)
+# Put the Sanitizer shared libraries in the global group. For more details, see
+# android-changes-for-ndk-developers.md#changes-to-library-search-order
+ if (COMPILER_RT_HAS_Z_GLOBAL)
+ list(APPEND SANITIZER_COMMON_LINK_FLAGS -Wl,-z,global)
+ endif()
+endif()
+
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Fuchsia")
list(APPEND SANITIZER_COMMON_LINK_FLAGS -Wl,-z,defs,-z,now,-z,relro)
list(APPEND SANITIZER_COMMON_LINK_LIBS zircon)
endif()
+if (SANITIZER_CXX_ABI_LIBNAME STREQUAL "libc++")
+ if (SANITIZER_CXX_ABI_INTREE)
+ if (NOT LIBCXXABI_ENABLE_STATIC_UNWINDER AND (TARGET unwind_shared OR HAVE_LIBUNWIND))
+ list(APPEND SANITIZER_CXX_ABI_LIBRARY unwind_shared)
+ elseif (LIBCXXABI_ENABLE_STATIC_UNWINDER AND (TARGET unwind_static OR HAVE_LIBUNWIND))
+ list(APPEND SANITIZER_CXX_ABI_LIBRARY unwind_static)
+ endif()
+ if (NOT LIBCXX_ENABLE_STATIC_ABI_LIBRARY AND (TARGET cxxabi_shared OR HAVE_LIBCXXABI))
+ list(APPEND SANITIZER_CXX_ABI_LIBRARY cxxabi_shared)
+ elseif (LIBCXX_ENABLE_STATIC_ABI_LIBRARY AND (TARGET cxxabi_static OR HAVE_LIBCXXABI))
+ list(APPEND SANITIZER_CXX_ABI_LIBRARY cxxabi_static)
+ endif()
+ else()
+ append_list_if(COMPILER_RT_HAS_LIBCXX c++ SANITIZER_CXX_ABI_LIBRARY)
+ endif()
+elseif (SANITIZER_CXX_ABI_LIBNAME STREQUAL "libcxxabi")
+ list(APPEND SANITIZER_CXX_ABI_LIBRARY "c++abi")
+elseif (SANITIZER_CXX_ABI_LIBNAME STREQUAL "libstdc++")
+ append_list_if(COMPILER_RT_HAS_LIBSTDCXX stdc++ SANITIZER_CXX_ABI_LIBRARY)
+endif()
+
# Warnings to turn off for all libraries, not just sanitizers.
append_string_if(COMPILER_RT_HAS_WUNUSED_PARAMETER_FLAG -Wno-unused-parameter CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
@@ -339,7 +370,7 @@ if (CMAKE_LINKER MATCHES "link.exe$")
# it, but CMake doesn't seem to have a way to set linker flags for
# individual static libraries, so we enable the suppression flag for
# the whole compiler-rt project.
- append("/IGNORE:4221" CMAKE_STATIC_LINKER_FLAGS)
+ set(CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS} /IGNORE:4221")
endif()
add_subdirectory(include)
diff --git a/LICENSE.TXT b/LICENSE.TXT
index a17dc12b272f..0134694e4e5f 100644
--- a/LICENSE.TXT
+++ b/LICENSE.TXT
@@ -14,7 +14,7 @@ Full text of the relevant licenses is included below.
University of Illinois/NCSA
Open Source License
-Copyright (c) 2009-2016 by the contributors listed in CREDITS.TXT
+Copyright (c) 2009-2018 by the contributors listed in CREDITS.TXT
All rights reserved.
diff --git a/cmake/Modules/AddCompilerRT.cmake b/cmake/Modules/AddCompilerRT.cmake
index 139b6140011c..cd4c704fc824 100644
--- a/cmake/Modules/AddCompilerRT.cmake
+++ b/cmake/Modules/AddCompilerRT.cmake
@@ -31,9 +31,12 @@ endfunction()
# ARCHS <architectures>
# SOURCES <source files>
# CFLAGS <compile flags>
-# DEFS <compile definitions>)
+# DEFS <compile definitions>
+# DEPS <dependencies>
+# ADDITIONAL_HEADERS <header files>)
function(add_compiler_rt_object_libraries name)
- cmake_parse_arguments(LIB "" "" "OS;ARCHS;SOURCES;CFLAGS;DEFS" ${ARGN})
+ cmake_parse_arguments(LIB "" "" "OS;ARCHS;SOURCES;CFLAGS;DEFS;DEPS;ADDITIONAL_HEADERS"
+ ${ARGN})
set(libnames)
if(APPLE)
foreach(os ${LIB_OS})
@@ -54,8 +57,18 @@ function(add_compiler_rt_object_libraries name)
endforeach()
endif()
+ # Add headers to LIB_SOURCES for IDEs
+ compiler_rt_process_sources(LIB_SOURCES
+ ${LIB_SOURCES}
+ ADDITIONAL_HEADERS
+ ${LIB_ADDITIONAL_HEADERS}
+ )
+
foreach(libname ${libnames})
add_library(${libname} OBJECT ${LIB_SOURCES})
+ if(LIB_DEPS)
+ add_dependencies(${libname} ${LIB_DEPS})
+ endif()
# Strip out -msse3 if this isn't macOS.
set(target_flags ${LIB_CFLAGS})
@@ -105,10 +118,14 @@ function(add_asm_sources output)
endfunction()
macro(set_output_name output name arch)
- if(ANDROID AND ${arch} STREQUAL "i386")
- set(${output} "${name}-i686${COMPILER_RT_OS_SUFFIX}")
+ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR)
+ set(${output} ${name})
else()
- set(${output} "${name}-${arch}${COMPILER_RT_OS_SUFFIX}")
+ if(ANDROID AND ${arch} STREQUAL "i386")
+ set(${output} "${name}-i686${COMPILER_RT_OS_SUFFIX}")
+ else()
+ set(${output} "${name}-${arch}${COMPILER_RT_OS_SUFFIX}")
+ endif()
endif()
endmacro()
@@ -124,7 +141,8 @@ endmacro()
# DEFS <compile definitions>
# LINK_LIBS <linked libraries> (only for shared library)
# OBJECT_LIBS <object libraries to use as sources>
-# PARENT_TARGET <convenience parent target>)
+# PARENT_TARGET <convenience parent target>
+# ADDITIONAL_HEADERS <header files>)
function(add_compiler_rt_runtime name type)
if(NOT type MATCHES "^(STATIC|SHARED)$")
message(FATAL_ERROR "type argument must be STATIC or SHARED")
@@ -133,7 +151,7 @@ function(add_compiler_rt_runtime name type)
cmake_parse_arguments(LIB
""
"PARENT_TARGET"
- "OS;ARCHS;SOURCES;CFLAGS;LINK_FLAGS;DEFS;LINK_LIBS;OBJECT_LIBS"
+ "OS;ARCHS;SOURCES;CFLAGS;LINK_FLAGS;DEFS;LINK_LIBS;OBJECT_LIBS;ADDITIONAL_HEADERS"
${ARGN})
set(libnames)
# Until we support this some other way, build compiler-rt runtime without LTO
@@ -144,6 +162,18 @@ function(add_compiler_rt_runtime name type)
set(NO_LTO_FLAGS "")
endif()
+ list(LENGTH LIB_SOURCES LIB_SOURCES_LENGTH)
+ if (${LIB_SOURCES_LENGTH} GREATER 0)
+ # Add headers to LIB_SOURCES for IDEs. It doesn't make sense to
+ # do this for a runtime library that only consists of OBJECT
+ # libraries, so only add the headers when source files are present.
+ compiler_rt_process_sources(LIB_SOURCES
+ ${LIB_SOURCES}
+ ADDITIONAL_HEADERS
+ ${LIB_ADDITIONAL_HEADERS}
+ )
+ endif()
+
if(APPLE)
foreach(os ${LIB_OS})
# Strip out -msse3 if this isn't macOS.
@@ -164,6 +194,8 @@ function(add_compiler_rt_runtime name type)
set(output_name_${libname} ${libname}${COMPILER_RT_OS_SUFFIX})
set(sources_${libname} ${LIB_SOURCES})
format_object_libs(sources_${libname} ${os} ${LIB_OBJECT_LIBS})
+ get_compiler_rt_output_dir(${COMPILER_RT_DEFAULT_TARGET_ARCH} output_dir_${libname})
+ get_compiler_rt_install_dir(${COMPILER_RT_DEFAULT_TARGET_ARCH} install_dir_${libname})
endif()
endforeach()
else()
@@ -189,6 +221,8 @@ function(add_compiler_rt_runtime name type)
format_object_libs(sources_${libname} ${arch} ${LIB_OBJECT_LIBS})
set(libnames ${libnames} ${libname})
set(extra_cflags_${libname} ${TARGET_${arch}_CFLAGS} ${NO_LTO_FLAGS} ${LIB_CFLAGS})
+ get_compiler_rt_output_dir(${arch} output_dir_${libname})
+ get_compiler_rt_install_dir(${arch} install_dir_${libname})
endforeach()
endif()
@@ -200,6 +234,8 @@ function(add_compiler_rt_runtime name type)
# If the parent targets aren't created we should create them
if(NOT TARGET ${LIB_PARENT_TARGET})
add_custom_target(${LIB_PARENT_TARGET})
+ set_target_properties(${LIB_PARENT_TARGET} PROPERTIES
+ FOLDER "Compiler-RT Misc")
endif()
if(NOT TARGET install-${LIB_PARENT_TARGET})
# The parent install target specifies the parent component to scrape up
@@ -239,7 +275,7 @@ function(add_compiler_rt_runtime name type)
set_target_link_flags(${libname} ${extra_link_flags_${libname}})
set_property(TARGET ${libname} APPEND PROPERTY
COMPILE_DEFINITIONS ${LIB_DEFS})
- set_target_output_directories(${libname} ${COMPILER_RT_LIBRARY_OUTPUT_DIR})
+ set_target_output_directories(${libname} ${output_dir_${libname}})
set_target_properties(${libname} PROPERTIES
OUTPUT_NAME ${output_name_${libname}})
set_target_properties(${libname} PROPERTIES FOLDER "Compiler-RT Runtime")
@@ -247,6 +283,9 @@ function(add_compiler_rt_runtime name type)
target_link_libraries(${libname} ${LIB_LINK_LIBS})
endif()
if(${type} STREQUAL "SHARED")
+ if(COMMAND llvm_setup_rpath)
+ llvm_setup_rpath(${libname})
+ endif()
if(WIN32 AND NOT CYGWIN AND NOT MINGW)
set_target_properties(${libname} PROPERTIES IMPORT_PREFIX "")
set_target_properties(${libname} PROPERTIES IMPORT_SUFFIX ".lib")
@@ -261,11 +300,11 @@ function(add_compiler_rt_runtime name type)
endif()
endif()
install(TARGETS ${libname}
- ARCHIVE DESTINATION ${COMPILER_RT_LIBRARY_INSTALL_DIR}
+ ARCHIVE DESTINATION ${install_dir_${libname}}
${COMPONENT_OPTION}
- LIBRARY DESTINATION ${COMPILER_RT_LIBRARY_INSTALL_DIR}
+ LIBRARY DESTINATION ${install_dir_${libname}}
${COMPONENT_OPTION}
- RUNTIME DESTINATION ${COMPILER_RT_LIBRARY_INSTALL_DIR}
+ RUNTIME DESTINATION ${install_dir_${libname}}
${COMPONENT_OPTION})
# We only want to generate per-library install targets if you aren't using
@@ -431,7 +470,7 @@ endfunction()
macro(add_compiler_rt_resource_file target_name file_name component)
set(src_file "${CMAKE_CURRENT_SOURCE_DIR}/${file_name}")
- set(dst_file "${COMPILER_RT_OUTPUT_DIR}/${file_name}")
+ set(dst_file "${COMPILER_RT_OUTPUT_DIR}/share/${file_name}")
add_custom_command(OUTPUT ${dst_file}
DEPENDS ${src_file}
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${src_file} ${dst_file}
@@ -439,7 +478,7 @@ macro(add_compiler_rt_resource_file target_name file_name component)
add_custom_target(${target_name} DEPENDS ${dst_file})
# Install in Clang resource directory.
install(FILES ${file_name}
- DESTINATION ${COMPILER_RT_INSTALL_PATH}
+ DESTINATION ${COMPILER_RT_INSTALL_PATH}/share
COMPONENT ${component})
add_dependencies(${component} ${target_name})
@@ -463,53 +502,123 @@ endmacro(add_compiler_rt_script src name)
# Can be used to build sanitized versions of libc++ for running unit tests.
# add_custom_libcxx(<name> <prefix>
# DEPS <list of build deps>
-# CFLAGS <list of compile flags>)
+# CFLAGS <list of compile flags>
+# USE_TOOLCHAIN)
macro(add_custom_libcxx name prefix)
if(NOT COMPILER_RT_LIBCXX_PATH)
message(FATAL_ERROR "libcxx not found!")
endif()
- cmake_parse_arguments(LIBCXX "" "" "DEPS;CFLAGS;CMAKE_ARGS" ${ARGN})
- foreach(flag ${LIBCXX_CFLAGS})
- set(flagstr "${flagstr} ${flag}")
- endforeach()
- set(LIBCXX_CFLAGS ${flagstr})
+ cmake_parse_arguments(LIBCXX "USE_TOOLCHAIN" "" "DEPS;CFLAGS;CMAKE_ARGS" ${ARGN})
- if(NOT COMPILER_RT_STANDALONE_BUILD)
- list(APPEND LIBCXX_DEPS clang)
+ if(LIBCXX_USE_TOOLCHAIN)
+ set(compiler_args -DCMAKE_C_COMPILER=${COMPILER_RT_TEST_COMPILER}
+ -DCMAKE_CXX_COMPILER=${COMPILER_RT_TEST_CXX_COMPILER})
+ if(NOT COMPILER_RT_STANDALONE_BUILD)
+ set(toolchain_deps $<TARGET_FILE:clang>)
+ set(force_deps DEPENDS $<TARGET_FILE:clang>)
+ endif()
+ else()
+ set(compiler_args -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
+ -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER})
endif()
+ set(STAMP_DIR ${prefix}-stamps/)
+ set(BINARY_DIR ${prefix}-bins/)
+
+ add_custom_target(${name}-clear
+ COMMAND ${CMAKE_COMMAND} -E remove_directory ${BINARY_DIR}
+ COMMAND ${CMAKE_COMMAND} -E remove_directory ${STAMP_DIR}
+ COMMENT "Clobbering ${name} build and stamp directories"
+ USES_TERMINAL
+ )
+ set_target_properties(${name}-clear PROPERTIES FOLDER "Compiler-RT Misc")
+
+ add_custom_command(
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${name}-clobber-stamp
+ DEPENDS ${LIBCXX_DEPS} ${toolchain_deps}
+ COMMAND ${CMAKE_COMMAND} -E touch ${BINARY_DIR}/CMakeCache.txt
+ COMMAND ${CMAKE_COMMAND} -E touch ${STAMP_DIR}/${name}-mkdir
+ COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/${name}-clobber-stamp
+ COMMENT "Clobbering bootstrap build and stamp directories"
+ )
+
+ add_custom_target(${name}-clobber
+ DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${name}-clobber-stamp)
+ set_target_properties(${name}-clobber PROPERTIES FOLDER "Compiler-RT Misc")
+
+ set(PASSTHROUGH_VARIABLES
+ CMAKE_C_COMPILER_TARGET
+ CMAKE_CXX_COMPILER_TARGET
+ CMAKE_INSTALL_PREFIX
+ CMAKE_MAKE_PROGRAM
+ CMAKE_LINKER
+ CMAKE_AR
+ CMAKE_RANLIB
+ CMAKE_NM
+ CMAKE_OBJCOPY
+ CMAKE_OBJDUMP
+ CMAKE_STRIP
+ CMAKE_SYSROOT
+ CMAKE_SYSTEM_NAME)
+ foreach(variable ${PASSTHROUGH_VARIABLES})
+ if(${variable})
+ list(APPEND CMAKE_PASSTHROUGH_VARIABLES -D${variable}=${${variable}})
+ endif()
+ endforeach()
+
+ string(REPLACE ";" " " FLAGS_STRING "${LIBCXX_CFLAGS}")
+ set(LIBCXX_C_FLAGS "${FLAGS_STRING}")
+ set(LIBCXX_CXX_FLAGS "${FLAGS_STRING}")
+
ExternalProject_Add(${name}
+ DEPENDS ${name}-clobber ${LIBCXX_DEPS}
PREFIX ${prefix}
SOURCE_DIR ${COMPILER_RT_LIBCXX_PATH}
- CMAKE_ARGS -DCMAKE_MAKE_PROGRAM:STRING=${CMAKE_MAKE_PROGRAM}
- -DCMAKE_C_COMPILER=${COMPILER_RT_TEST_COMPILER}
- -DCMAKE_CXX_COMPILER=${COMPILER_RT_TEST_CXX_COMPILER}
- -DCMAKE_C_FLAGS=${LIBCXX_CFLAGS}
- -DCMAKE_CXX_FLAGS=${LIBCXX_CFLAGS}
+ STAMP_DIR ${STAMP_DIR}
+ BINARY_DIR ${BINARY_DIR}
+ CMAKE_ARGS ${CMAKE_PASSTHROUGH_VARIABLES}
+ ${compiler_args}
+ -DCMAKE_C_FLAGS=${LIBCXX_C_FLAGS}
+ -DCMAKE_CXX_FLAGS=${LIBCXX_CXX_FLAGS}
-DCMAKE_BUILD_TYPE=Release
- -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
-DLLVM_PATH=${LLVM_MAIN_SRC_DIR}
- -DLIBCXX_STANDALONE_BUILD=On
+ -DLLVM_BINARY_DIR=${prefix}
+ -DLLVM_LIBRARY_OUTPUT_INTDIR=${prefix}/lib
+ -DLIBCXX_STANDALONE_BUILD=ON
${LIBCXX_CMAKE_ARGS}
- LOG_BUILD 1
- LOG_CONFIGURE 1
- LOG_INSTALL 1
+ INSTALL_COMMAND ""
+ STEP_TARGETS configure build
+ BUILD_ALWAYS 1
+ USES_TERMINAL_CONFIGURE 1
+ USES_TERMINAL_BUILD 1
+ USES_TERMINAL_INSTALL 1
+ EXCLUDE_FROM_ALL TRUE
)
- set_target_properties(${name} PROPERTIES EXCLUDE_FROM_ALL TRUE)
- ExternalProject_Add_Step(${name} force-reconfigure
- DEPENDERS configure
- ALWAYS 1
- )
+ if (CMAKE_GENERATOR MATCHES "Make")
+ set(run_clean "$(MAKE)" "-C" "${BINARY_DIR}" "clean")
+ else()
+ set(run_clean ${CMAKE_COMMAND} --build ${BINARY_DIR} --target clean
+ --config "$<CONFIGURATION>")
+ endif()
- ExternalProject_Add_Step(${name} clobber
- COMMAND ${CMAKE_COMMAND} -E remove_directory <BINARY_DIR>
- COMMAND ${CMAKE_COMMAND} -E make_directory <BINARY_DIR>
- COMMENT "Clobberring ${name} build directory..."
- DEPENDERS configure
- DEPENDS ${LIBCXX_DEPS}
+ ExternalProject_Add_Step(${name} clean
+ COMMAND ${run_clean}
+ COMMENT "Cleaning ${name}..."
+ DEPENDEES configure
+ ${force_deps}
+ WORKING_DIRECTORY ${BINARY_DIR}
+ EXCLUDE_FROM_MAIN 1
+ USES_TERMINAL 1
)
+ ExternalProject_Add_StepTargets(${name} clean)
+
+ if(LIBCXX_USE_TOOLCHAIN)
+ add_dependencies(${name}-clean ${name}-clobber)
+ set_target_properties(${name}-clean PROPERTIES
+ SOURCES ${CMAKE_CURRENT_BINARY_DIR}/${name}-clobber-stamp)
+ endif()
endmacro()
function(rt_externalize_debuginfo name)
@@ -542,8 +651,10 @@ endfunction()
function(configure_compiler_rt_lit_site_cfg input output)
set_llvm_build_mode()
+ get_compiler_rt_output_dir(${COMPILER_RT_DEFAULT_TARGET_ARCH} output_dir)
+
string(REPLACE ${CMAKE_CFG_INTDIR} ${LLVM_BUILD_MODE} COMPILER_RT_RESOLVED_TEST_COMPILER ${COMPILER_RT_TEST_COMPILER})
- string(REPLACE ${CMAKE_CFG_INTDIR} ${LLVM_BUILD_MODE} COMPILER_RT_RESOLVED_LIBRARY_OUTPUT_DIR ${COMPILER_RT_LIBRARY_OUTPUT_DIR})
+ string(REPLACE ${CMAKE_CFG_INTDIR} ${LLVM_BUILD_MODE} COMPILER_RT_RESOLVED_LIBRARY_OUTPUT_DIR ${output_dir})
configure_lit_site_cfg(${input} ${output})
endfunction()
diff --git a/cmake/Modules/CompilerRTDarwinUtils.cmake b/cmake/Modules/CompilerRTDarwinUtils.cmake
index a25540bf46d1..04cc955980fa 100644
--- a/cmake/Modules/CompilerRTDarwinUtils.cmake
+++ b/cmake/Modules/CompilerRTDarwinUtils.cmake
@@ -43,7 +43,7 @@ endfunction()
# link for.
function(darwin_get_toolchain_supported_archs output_var)
execute_process(
- COMMAND ld -v
+ COMMAND "${CMAKE_LINKER}" -v
ERROR_VARIABLE LINKER_VERSION)
string(REGEX MATCH "configured to support archs: ([^\n]+)"
@@ -230,6 +230,7 @@ macro(darwin_add_builtin_library name suffix)
list(APPEND ${LIB_OS}_${suffix}_libs ${libname})
list(APPEND ${LIB_OS}_${suffix}_lipo_flags -arch ${arch} $<TARGET_FILE:${libname}>)
+ set_target_properties(${libname} PROPERTIES FOLDER "Compiler-RT Libraries")
endmacro()
function(darwin_lipo_libs name)
@@ -251,6 +252,7 @@ function(darwin_lipo_libs name)
add_dependencies(${LIB_PARENT_TARGET} ${name})
install(FILES ${LIB_OUTPUT_DIR}/lib${name}.a
DESTINATION ${LIB_INSTALL_DIR})
+ set_target_properties(${name} PROPERTIES FOLDER "Compiler-RT Misc")
else()
message(WARNING "Not generating lipo target for ${name} because no input libraries exist.")
endif()
diff --git a/cmake/Modules/CompilerRTUtils.cmake b/cmake/Modules/CompilerRTUtils.cmake
index 9f79a9b920db..e5651718fa34 100644
--- a/cmake/Modules/CompilerRTUtils.cmake
+++ b/cmake/Modules/CompilerRTUtils.cmake
@@ -168,6 +168,7 @@ macro(detect_target_arch)
check_symbol_exists(__mips64__ "" __MIPS64)
check_symbol_exists(__powerpc64__ "" __PPC64)
check_symbol_exists(__powerpc64le__ "" __PPC64LE)
+ check_symbol_exists(__riscv "" __RISCV)
check_symbol_exists(__s390x__ "" __S390X)
check_symbol_exists(__wasm32__ "" __WEBASSEMBLY32)
check_symbol_exists(__wasm64__ "" __WEBASSEMBLY64)
@@ -187,6 +188,14 @@ macro(detect_target_arch)
add_default_target_arch(powerpc64)
elseif(__PPC64LE)
add_default_target_arch(powerpc64le)
+ elseif(__RISCV)
+ if(CMAKE_SIZEOF_VOID_P EQUAL "4")
+ add_default_target_arch(riscv32)
+ elseif(CMAKE_SIZEOF_VOID_P EQUAL "8")
+ add_default_target_arch(riscv64)
+ else()
+ message(FATAL_ERROR "Unsupport XLEN for RISC-V")
+ endif()
elseif(__S390X)
add_default_target_arch(s390x)
elseif(__WEBASSEMBLY32)
@@ -305,3 +314,69 @@ function(filter_builtin_sources output_var exclude_or_include excluded_list)
endforeach ()
set(${output_var} ${intermediate} PARENT_SCOPE)
endfunction()
+
+function(get_compiler_rt_target arch variable)
+ if(ANDROID AND ${arch} STREQUAL "i386")
+ set(target "i686${COMPILER_RT_OS_SUFFIX}-${COMPILER_RT_DEFAULT_TARGET_OS}")
+ else()
+ set(target "${arch}-${COMPILER_RT_DEFAULT_TARGET_OS}")
+ endif()
+ if(COMPILER_RT_DEFAULT_TARGET_ABI)
+ set(target "${target}-${COMPILER_RT_DEFAULT_TARGET_ABI}")
+ endif()
+ set(${variable} ${target} PARENT_SCOPE)
+endfunction()
+
+function(get_compiler_rt_install_dir arch install_dir)
+ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
+ get_compiler_rt_target(${arch} target)
+ set(${install_dir} ${COMPILER_RT_INSTALL_PATH}/${target}/lib PARENT_SCOPE)
+ else()
+ set(${install_dir} ${COMPILER_RT_LIBRARY_INSTALL_DIR} PARENT_SCOPE)
+ endif()
+endfunction()
+
+function(get_compiler_rt_output_dir arch output_dir)
+ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
+ get_compiler_rt_target(${arch} target)
+ set(${output_dir} ${COMPILER_RT_OUTPUT_DIR}/${target}/lib PARENT_SCOPE)
+ else()
+ set(${output_dir} ${COMPILER_RT_LIBRARY_OUTPUT_DIR} PARENT_SCOPE)
+ endif()
+endfunction()
+
+# compiler_rt_process_sources(
+# <OUTPUT_VAR>
+# <SOURCE_FILE> ...
+# [ADDITIONAL_HEADERS <header> ...]
+# )
+#
+# Process the provided sources and write the list of new sources
+# into `<OUTPUT_VAR>`.
+#
+# ADDITIONAL_HEADERS - Adds the supplied header to list of sources for IDEs.
+#
+# This function is very similar to `llvm_process_sources()` but exists here
+# because we need to support standalone builds of compiler-rt.
+function(compiler_rt_process_sources OUTPUT_VAR)
+ cmake_parse_arguments(
+ ARG
+ ""
+ ""
+ "ADDITIONAL_HEADERS"
+ ${ARGN}
+ )
+ set(sources ${ARG_UNPARSED_ARGUMENTS})
+ set(headers "")
+ if (XCODE OR MSVC_IDE OR CMAKE_EXTRA_GENERATOR)
+ # For IDEs we need to tell CMake about header files.
+ # Otherwise they won't show up in UI.
+ set(headers ${ARG_ADDITIONAL_HEADERS})
+ list(LENGTH headers headers_length)
+ if (${headers_length} GREATER 0)
+ set_source_files_properties(${headers}
+ PROPERTIES HEADER_FILE_ONLY ON)
+ endif()
+ endif()
+ set("${OUTPUT_VAR}" ${sources} ${headers} PARENT_SCOPE)
+endfunction()
diff --git a/cmake/Modules/HandleCompilerRT.cmake b/cmake/Modules/HandleCompilerRT.cmake
index cff5031ec9b2..855d0ff9df1c 100644
--- a/cmake/Modules/HandleCompilerRT.cmake
+++ b/cmake/Modules/HandleCompilerRT.cmake
@@ -1,5 +1,4 @@
-function(find_compiler_rt_library name dest)
- set(dest "" PARENT_SCOPE)
+function(find_compiler_rt_library name variable)
set(CLANG_COMMAND ${CMAKE_CXX_COMPILER} ${SANITIZER_COMMON_CFLAGS}
"--rtlib=compiler-rt" "--print-libgcc-file-name")
if (CMAKE_CXX_COMPILER_ID MATCHES Clang AND CMAKE_CXX_COMPILER_TARGET)
@@ -14,7 +13,7 @@ function(find_compiler_rt_library name dest)
string(REPLACE "builtins" "${name}" LIBRARY_FILE "${LIBRARY_FILE}")
if (NOT HAD_ERROR AND EXISTS "${LIBRARY_FILE}")
message(STATUS "Found compiler-rt ${name} library: ${LIBRARY_FILE}")
- set(${dest} "${LIBRARY_FILE}" PARENT_SCOPE)
+ set(${variable} "${LIBRARY_FILE}" PARENT_SCOPE)
else()
message(STATUS "Failed to find compiler-rt ${name} library")
endif()
diff --git a/cmake/Modules/SanitizerUtils.cmake b/cmake/Modules/SanitizerUtils.cmake
index c80fc3b1eefc..b6312426cacb 100644
--- a/cmake/Modules/SanitizerUtils.cmake
+++ b/cmake/Modules/SanitizerUtils.cmake
@@ -1,3 +1,5 @@
+include(CompilerRTUtils)
+
set(SANITIZER_GEN_DYNAMIC_LIST
${COMPILER_RT_SOURCE_DIR}/lib/sanitizer_common/scripts/gen_dynamic_list.py)
@@ -37,9 +39,9 @@ macro(add_sanitizer_rt_symbols name)
add_custom_target(${target_name}-symbols ALL
DEPENDS ${stamp}
SOURCES ${SANITIZER_GEN_DYNAMIC_LIST} ${ARG_EXTRA})
-
+ get_compiler_rt_install_dir(${arch} install_dir)
install(FILES $<TARGET_FILE:${target_name}>.syms
- DESTINATION ${COMPILER_RT_LIBRARY_INSTALL_DIR})
+ DESTINATION ${install_dir})
if(ARG_PARENT_TARGET)
add_dependencies(${ARG_PARENT_TARGET} ${target_name}-symbols)
endif()
@@ -81,7 +83,7 @@ macro(add_sanitizer_rt_version_list name)
endmacro()
# Add target to check code style for sanitizer runtimes.
-if(CMAKE_HOST_UNIX)
+if(CMAKE_HOST_UNIX AND NOT OS_NAME MATCHES "OpenBSD")
add_custom_target(SanitizerLintCheck
COMMAND env LLVM_CHECKOUT=${LLVM_MAIN_SRC_DIR} SILENT=1 TMPDIR=
PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}
@@ -90,5 +92,9 @@ if(CMAKE_HOST_UNIX)
DEPENDS ${SANITIZER_LINT_SCRIPT}
COMMENT "Running lint check for sanitizer sources..."
VERBATIM)
+else()
+ add_custom_target(SanitizerLintCheck
+ COMMAND echo "No lint check")
endif()
-
+set_target_properties(SanitizerLintCheck
+ PROPERTIES FOLDER "Compiler-RT Misc")
diff --git a/cmake/base-config-ix.cmake b/cmake/base-config-ix.cmake
index b208f0852408..91fe2494b476 100644
--- a/cmake/base-config-ix.cmake
+++ b/cmake/base-config-ix.cmake
@@ -12,7 +12,14 @@ check_include_file(unwind.h HAVE_UNWIND_H)
add_custom_target(compiler-rt ALL)
add_custom_target(install-compiler-rt)
add_custom_target(install-compiler-rt-stripped)
-set_target_properties(compiler-rt PROPERTIES FOLDER "Compiler-RT Misc")
+set_property(
+ TARGET
+ compiler-rt
+ install-compiler-rt
+ install-compiler-rt-stripped
+ PROPERTY
+ FOLDER "Compiler-RT Misc"
+)
# Setting these variables from an LLVM build is sufficient that compiler-rt can
# construct the output paths, so it can behave as if it were in-tree here.
@@ -69,10 +76,17 @@ endif()
if(NOT DEFINED COMPILER_RT_OS_DIR)
string(TOLOWER ${CMAKE_SYSTEM_NAME} COMPILER_RT_OS_DIR)
endif()
-set(COMPILER_RT_LIBRARY_OUTPUT_DIR
- ${COMPILER_RT_OUTPUT_DIR}/lib/${COMPILER_RT_OS_DIR})
-set(COMPILER_RT_LIBRARY_INSTALL_DIR
- ${COMPILER_RT_INSTALL_PATH}/lib/${COMPILER_RT_OS_DIR})
+if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
+ set(COMPILER_RT_LIBRARY_OUTPUT_DIR
+ ${COMPILER_RT_OUTPUT_DIR})
+ set(COMPILER_RT_LIBRARY_INSTALL_DIR
+ ${COMPILER_RT_INSTALL_PATH})
+else(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR)
+ set(COMPILER_RT_LIBRARY_OUTPUT_DIR
+ ${COMPILER_RT_OUTPUT_DIR}/lib/${COMPILER_RT_OS_DIR})
+ set(COMPILER_RT_LIBRARY_INSTALL_DIR
+ ${COMPILER_RT_INSTALL_PATH}/lib/${COMPILER_RT_OS_DIR})
+endif()
if(APPLE)
# On Darwin if /usr/include doesn't exist, the user probably has Xcode but not
@@ -139,8 +153,16 @@ macro(test_targets)
add_default_target_arch(${COMPILER_RT_DEFAULT_TARGET_ARCH})
elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "i[2-6]86|x86|amd64")
if(NOT MSVC)
- test_target_arch(x86_64 "" "-m64")
- test_target_arch(i386 __i386__ "-m32")
+ if(CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
+ if (CMAKE_SIZEOF_VOID_P EQUAL 4)
+ test_target_arch(i386 __i386__ "-m32")
+ else()
+ test_target_arch(x86_64 "" "-m64")
+ endif()
+ else()
+ test_target_arch(x86_64 "" "-m64")
+ test_target_arch(i386 __i386__ "-m32")
+ endif()
else()
if (CMAKE_SIZEOF_VOID_P EQUAL 4)
test_target_arch(i386 "" "")
@@ -186,6 +208,10 @@ macro(test_targets)
test_target_arch(aarch32 "" "-march=armv8-a")
elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "aarch64")
test_target_arch(aarch64 "" "-march=armv8-a")
+ elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "riscv32")
+ test_target_arch(riscv32 "" "")
+ elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "riscv64")
+ test_target_arch(riscv64 "" "")
elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "wasm32")
test_target_arch(wasm32 "" "--target=wasm32-unknown-unknown")
elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "wasm64")
diff --git a/cmake/builtin-config-ix.cmake b/cmake/builtin-config-ix.cmake
index bdb2529b5ee2..a5704e5fed53 100644
--- a/cmake/builtin-config-ix.cmake
+++ b/cmake/builtin-config-ix.cmake
@@ -25,11 +25,14 @@ int foo(int x, int y) {
set(ARM64 aarch64)
set(ARM32 arm armhf armv6m armv7m armv7em armv7 armv7s armv7k)
+set(HEXAGON hexagon)
set(X86 i386)
set(X86_64 x86_64)
set(MIPS32 mips mipsel)
set(MIPS64 mips64 mips64el)
set(PPC64 powerpc64 powerpc64le)
+set(RISCV32 riscv32)
+set(RISCV64 riscv64)
set(WASM32 wasm32)
set(WASM64 wasm64)
@@ -40,7 +43,7 @@ if(APPLE)
endif()
set(ALL_BUILTIN_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM32} ${ARM64}
- ${MIPS32} ${MIPS64} ${PPC64} ${WASM32} ${WASM64})
+ ${HEXAGON} ${MIPS32} ${MIPS64} ${PPC64} ${RISCV32} ${RISCV64} ${WASM32} ${WASM64})
include(CompilerRTUtils)
include(CompilerRTDarwinUtils)
diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake
index 9e0c4774829f..f3935ffd6fd2 100644
--- a/cmake/config-ix.cmake
+++ b/cmake/config-ix.cmake
@@ -13,7 +13,10 @@ function(check_linker_flag flag out_var)
endfunction()
check_library_exists(c fopen "" COMPILER_RT_HAS_LIBC)
-if (NOT SANITIZER_USE_COMPILER_RT)
+if (COMPILER_RT_USE_BUILTINS_LIBRARY)
+ include(HandleCompilerRT)
+ find_compiler_rt_library(builtins COMPILER_RT_BUILTINS_LIBRARY)
+else()
if (ANDROID)
check_library_exists(gcc __gcc_personality_v0 "" COMPILER_RT_HAS_GCC_LIB)
else()
@@ -27,9 +30,7 @@ if (COMPILER_RT_HAS_NODEFAULTLIBS_FLAG)
if (COMPILER_RT_HAS_LIBC)
list(APPEND CMAKE_REQUIRED_LIBRARIES c)
endif ()
- if (SANITIZER_USE_COMPILER_RT)
- list(APPEND CMAKE_REQUIRED_FLAGS -rtlib=compiler-rt)
- find_compiler_rt_library(builtins COMPILER_RT_BUILTINS_LIBRARY)
+ if (COMPILER_RT_USE_BUILTINS_LIBRARY)
list(APPEND CMAKE_REQUIRED_LIBRARIES "${COMPILER_RT_BUILTINS_LIBRARY}")
elseif (COMPILER_RT_HAS_GCC_S_LIB)
list(APPEND CMAKE_REQUIRED_LIBRARIES gcc_s)
@@ -108,6 +109,7 @@ if (ANDROID AND COMPILER_RT_HAS_LIBDL)
# Android's libstdc++ has a dependency on libdl.
list(APPEND CMAKE_REQUIRED_LIBRARIES dl)
endif()
+check_library_exists(c++ __cxa_throw "" COMPILER_RT_HAS_LIBCXX)
check_library_exists(stdc++ __cxa_throw "" COMPILER_RT_HAS_LIBSTDCXX)
# Linker flags.
@@ -174,11 +176,14 @@ endmacro()
set(ARM64 aarch64)
set(ARM32 arm armhf)
+set(HEXAGON hexagon)
set(X86 i386)
set(X86_64 x86_64)
set(MIPS32 mips mipsel)
set(MIPS64 mips64 mips64el)
set(PPC64 powerpc64 powerpc64le)
+set(RISCV32 riscv32)
+set(RISCV64 riscv64)
set(S390X s390x)
set(WASM32 wasm32)
set(WASM64 wasm64)
@@ -194,7 +199,7 @@ set(ALL_SANITIZER_COMMON_SUPPORTED_ARCH ${X86} ${X86_64} ${PPC64}
set(ALL_ASAN_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM32} ${ARM64}
${MIPS32} ${MIPS64} ${PPC64} ${S390X})
set(ALL_DFSAN_SUPPORTED_ARCH ${X86_64} ${MIPS64} ${ARM64})
-set(ALL_FUZZER_SUPPORTED_ARCH x86_64)
+set(ALL_FUZZER_SUPPORTED_ARCH ${X86_64} ${ARM64})
if(APPLE)
set(ALL_LSAN_SUPPORTED_ARCH ${X86} ${X86_64} ${MIPS64} ${ARM64})
@@ -202,7 +207,7 @@ else()
set(ALL_LSAN_SUPPORTED_ARCH ${X86} ${X86_64} ${MIPS64} ${ARM64} ${ARM32} ${PPC64})
endif()
set(ALL_MSAN_SUPPORTED_ARCH ${X86_64} ${MIPS64} ${ARM64} ${PPC64})
-set(ALL_HWASAN_SUPPORTED_ARCH ${ARM64})
+set(ALL_HWASAN_SUPPORTED_ARCH ${X86_64} ${ARM64})
set(ALL_PROFILE_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM32} ${ARM64} ${PPC64}
${MIPS32} ${MIPS64} ${S390X})
set(ALL_TSAN_SUPPORTED_ARCH ${X86_64} ${MIPS64} ${ARM64} ${PPC64})
@@ -211,12 +216,13 @@ set(ALL_UBSAN_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM32} ${ARM64}
set(ALL_SAFESTACK_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM64} ${MIPS32} ${MIPS64})
set(ALL_CFI_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM32} ${ARM64} ${MIPS64})
set(ALL_ESAN_SUPPORTED_ARCH ${X86_64} ${MIPS64})
-set(ALL_SCUDO_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM32} ${ARM64} ${MIPS32} ${MIPS64})
+set(ALL_SCUDO_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM32} ${ARM64} ${MIPS32} ${MIPS64} ${PPC64})
if(APPLE)
set(ALL_XRAY_SUPPORTED_ARCH ${X86_64})
else()
set(ALL_XRAY_SUPPORTED_ARCH ${X86_64} ${ARM32} ${ARM64} ${MIPS32} ${MIPS64} powerpc64le)
endif()
+set(ALL_SHADOWCALLSTACK_SUPPORTED_ARCH ${X86_64} ${ARM64})
if(APPLE)
include(CompilerRTDarwinUtils)
@@ -365,7 +371,11 @@ if(APPLE)
if(DARWIN_${platform}_ARCHS)
list(APPEND SANITIZER_COMMON_SUPPORTED_OS ${platform})
list(APPEND PROFILE_SUPPORTED_OS ${platform})
- list(APPEND TSAN_SUPPORTED_OS ${platform})
+
+ list_intersect(DARWIN_${platform}_TSAN_ARCHS DARWIN_${platform}_ARCHS ALL_TSAN_SUPPORTED_ARCH)
+ if(DARWIN_${platform}_TSAN_ARCHS)
+ list(APPEND TSAN_SUPPORTED_OS ${platform})
+ endif()
endif()
foreach(arch ${DARWIN_${platform}_ARCHS})
list(APPEND COMPILER_RT_SUPPORTED_ARCH ${arch})
@@ -378,7 +388,6 @@ if(APPLE)
# for list_intersect
include(CompilerRTUtils)
-
list_intersect(SANITIZER_COMMON_SUPPORTED_ARCH
ALL_SANITIZER_COMMON_SUPPORTED_ARCH
COMPILER_RT_SUPPORTED_ARCH
@@ -423,10 +432,13 @@ if(APPLE)
SANITIZER_COMMON_SUPPORTED_ARCH)
list_intersect(FUZZER_SUPPORTED_ARCH
ALL_FUZZER_SUPPORTED_ARCH
- ALL_SANITIZER_COMMON_SUPPORTED_ARCH)
+ SANITIZER_COMMON_SUPPORTED_ARCH)
list_intersect(XRAY_SUPPORTED_ARCH
ALL_XRAY_SUPPORTED_ARCH
SANITIZER_COMMON_SUPPORTED_ARCH)
+ list_intersect(SHADOWCALLSTACK_SUPPORTED_ARCH
+ ALL_SHADOWCALLSTACK_SUPPORTED_ARCH
+ SANITIZER_COMMON_SUPPORTED_ARCH)
else()
# Architectures supported by compiler-rt libraries.
@@ -453,6 +465,8 @@ else()
filter_available_targets(ESAN_SUPPORTED_ARCH ${ALL_ESAN_SUPPORTED_ARCH})
filter_available_targets(SCUDO_SUPPORTED_ARCH ${ALL_SCUDO_SUPPORTED_ARCH})
filter_available_targets(XRAY_SUPPORTED_ARCH ${ALL_XRAY_SUPPORTED_ARCH})
+ filter_available_targets(SHADOWCALLSTACK_SUPPORTED_ARCH
+ ${ALL_SHADOWCALLSTACK_SUPPORTED_ARCH})
endif()
if (MSVC)
@@ -486,7 +500,7 @@ set(COMPILER_RT_SANITIZERS_TO_BUILD all CACHE STRING
list_replace(COMPILER_RT_SANITIZERS_TO_BUILD all "${ALL_SANITIZERS}")
if (SANITIZER_COMMON_SUPPORTED_ARCH AND NOT LLVM_USE_SANITIZER AND
- (OS_NAME MATCHES "Android|Darwin|Linux|FreeBSD|NetBSD|Fuchsia|SunOS" OR
+ (OS_NAME MATCHES "Android|Darwin|Linux|FreeBSD|NetBSD|OpenBSD|Fuchsia|SunOS" OR
(OS_NAME MATCHES "Windows" AND (NOT MINGW AND NOT CYGWIN))))
set(COMPILER_RT_HAS_SANITIZER_COMMON TRUE)
else()
@@ -499,7 +513,8 @@ else()
set(COMPILER_RT_HAS_INTERCEPTION FALSE)
endif()
-if (COMPILER_RT_HAS_SANITIZER_COMMON AND ASAN_SUPPORTED_ARCH)
+if (COMPILER_RT_HAS_SANITIZER_COMMON AND ASAN_SUPPORTED_ARCH AND
+ NOT OS_NAME MATCHES "OpenBSD")
set(COMPILER_RT_HAS_ASAN TRUE)
else()
set(COMPILER_RT_HAS_ASAN FALSE)
@@ -528,7 +543,7 @@ else()
endif()
if (COMPILER_RT_HAS_SANITIZER_COMMON AND MSAN_SUPPORTED_ARCH AND
- OS_NAME MATCHES "Linux|NetBSD")
+ OS_NAME MATCHES "Linux|FreeBSD|NetBSD")
set(COMPILER_RT_HAS_MSAN TRUE)
else()
set(COMPILER_RT_HAS_MSAN FALSE)
@@ -542,7 +557,7 @@ else()
endif()
if (PROFILE_SUPPORTED_ARCH AND NOT LLVM_USE_SANITIZER AND
- OS_NAME MATCHES "Darwin|Linux|FreeBSD|Windows|Android|SunOS")
+ OS_NAME MATCHES "Darwin|Linux|FreeBSD|Windows|Android|Fuchsia|SunOS")
set(COMPILER_RT_HAS_PROFILE TRUE)
else()
set(COMPILER_RT_HAS_PROFILE FALSE)
@@ -556,14 +571,14 @@ else()
endif()
if (COMPILER_RT_HAS_SANITIZER_COMMON AND UBSAN_SUPPORTED_ARCH AND
- OS_NAME MATCHES "Darwin|Linux|FreeBSD|NetBSD|Windows|Android|Fuchsia|SunOS")
+ OS_NAME MATCHES "Darwin|Linux|FreeBSD|NetBSD|OpenBSD|Windows|Android|Fuchsia|SunOS")
set(COMPILER_RT_HAS_UBSAN TRUE)
else()
set(COMPILER_RT_HAS_UBSAN FALSE)
endif()
if (COMPILER_RT_HAS_SANITIZER_COMMON AND UBSAN_SUPPORTED_ARCH AND
- OS_NAME MATCHES "Linux|FreeBSD|NetBSD|Android|Darwin")
+ OS_NAME MATCHES "Linux|FreeBSD|NetBSD|OpenBSD|Android|Darwin")
set(COMPILER_RT_HAS_UBSAN_MINIMAL TRUE)
else()
set(COMPILER_RT_HAS_UBSAN_MINIMAL FALSE)
@@ -590,22 +605,29 @@ else()
endif()
if (COMPILER_RT_HAS_SANITIZER_COMMON AND SCUDO_SUPPORTED_ARCH AND
- OS_NAME MATCHES "Linux|Android")
+ OS_NAME MATCHES "Linux|Android|Fuchsia")
set(COMPILER_RT_HAS_SCUDO TRUE)
else()
set(COMPILER_RT_HAS_SCUDO FALSE)
endif()
if (COMPILER_RT_HAS_SANITIZER_COMMON AND XRAY_SUPPORTED_ARCH AND
- OS_NAME MATCHES "Darwin|Linux")
+ OS_NAME MATCHES "Darwin|Linux|FreeBSD|NetBSD|OpenBSD")
set(COMPILER_RT_HAS_XRAY TRUE)
else()
set(COMPILER_RT_HAS_XRAY FALSE)
endif()
if (COMPILER_RT_HAS_SANITIZER_COMMON AND FUZZER_SUPPORTED_ARCH AND
- OS_NAME MATCHES "Android|Darwin|Linux|NetBSD")
+ OS_NAME MATCHES "Android|Darwin|Linux|NetBSD|FreeBSD|OpenBSD|Fuchsia")
set(COMPILER_RT_HAS_FUZZER TRUE)
else()
set(COMPILER_RT_HAS_FUZZER FALSE)
endif()
+
+if (COMPILER_RT_HAS_SANITIZER_COMMON AND SHADOWCALLSTACK_SUPPORTED_ARCH AND
+ OS_NAME MATCHES "Linux|Android")
+ set(COMPILER_RT_HAS_SHADOWCALLSTACK TRUE)
+else()
+ set(COMPILER_RT_HAS_SHADOWCALLSTACK FALSE)
+endif()
diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt
index f7efb102ab63..c4b93b89a30c 100644
--- a/include/CMakeLists.txt
+++ b/include/CMakeLists.txt
@@ -10,6 +10,7 @@ if (COMPILER_RT_BUILD_SANITIZERS)
sanitizer/linux_syscall_hooks.h
sanitizer/lsan_interface.h
sanitizer/msan_interface.h
+ sanitizer/netbsd_syscall_hooks.h
sanitizer/scudo_interface.h
sanitizer/tsan_interface.h
sanitizer/tsan_interface_atomic.h)
diff --git a/include/sanitizer/common_interface_defs.h b/include/sanitizer/common_interface_defs.h
index 6d4326f74021..d11cb1addc27 100644
--- a/include/sanitizer/common_interface_defs.h
+++ b/include/sanitizer/common_interface_defs.h
@@ -65,6 +65,11 @@ extern "C" {
void __sanitizer_unaligned_store32(void *p, uint32_t x);
void __sanitizer_unaligned_store64(void *p, uint64_t x);
+ // Returns 1 on the first call, then returns 0 thereafter. Called by the tool
+ // to ensure only one report is printed when multiple errors occur
+ // simultaneously.
+ int __sanitizer_acquire_crash_state();
+
// Annotate the current state of a contiguous container, such as
// std::vector, std::string or similar.
// A contiguous container is a container that keeps all of its elements
diff --git a/include/sanitizer/msan_interface.h b/include/sanitizer/msan_interface.h
index a87c954c15ec..0509551bbd17 100644
--- a/include/sanitizer/msan_interface.h
+++ b/include/sanitizer/msan_interface.h
@@ -104,6 +104,14 @@ extern "C" {
copy. Source and destination regions can overlap. */
void __msan_copy_shadow(const volatile void *dst, const volatile void *src,
size_t size);
+
+ /* Disables uninitialized memory checks in interceptors. */
+ void __msan_scoped_disable_interceptor_checks(void);
+
+ /* Re-enables uninitialized memory checks in interceptors after a previous
+ call to __msan_scoped_disable_interceptor_checks. */
+ void __msan_scoped_enable_interceptor_checks(void);
+
#ifdef __cplusplus
} // extern "C"
#endif
diff --git a/include/sanitizer/netbsd_syscall_hooks.h b/include/sanitizer/netbsd_syscall_hooks.h
new file mode 100644
index 000000000000..4c6c6a88af29
--- /dev/null
+++ b/include/sanitizer/netbsd_syscall_hooks.h
@@ -0,0 +1,4734 @@
+//===-- netbsd_syscall_hooks.h --------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file is a part of public sanitizer interface.
+//
+// System call handlers.
+//
+// Interface methods declared in this header implement pre- and post- syscall
+// actions for the active sanitizer.
+// Usage:
+// __sanitizer_syscall_pre_getfoo(...args...);
+// long long res = syscall(SYS_getfoo, ...args...);
+// __sanitizer_syscall_post_getfoo(res, ...args...);
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+#ifndef SANITIZER_NETBSD_SYSCALL_HOOKS_H
+#define SANITIZER_NETBSD_SYSCALL_HOOKS_H
+
+#define __sanitizer_syscall_pre_syscall(code, arg0, arg1, arg2, arg3, arg4, \
+ arg5, arg6, arg7) \
+ __sanitizer_syscall_pre_impl_syscall( \
+ (long long)(code), (long long)(arg0), (long long)(arg1), \
+ (long long)(arg2), (long long)(arg3), (long long)(arg4), \
+ (long long)(arg5), (long long)(arg6), (long long)(arg7))
+#define __sanitizer_syscall_post_syscall(res, code, arg0, arg1, arg2, arg3, \
+ arg4, arg5, arg6, arg7) \
+ __sanitizer_syscall_post_impl_syscall( \
+ res, (long long)(code), (long long)(arg0), (long long)(arg1), \
+ (long long)(arg2), (long long)(arg3), (long long)(arg4), \
+ (long long)(arg5), (long long)(arg6), (long long)(arg7))
+#define __sanitizer_syscall_pre_exit(rval) \
+ __sanitizer_syscall_pre_impl_exit((long long)(rval))
+#define __sanitizer_syscall_post_exit(res, rval) \
+ __sanitizer_syscall_post_impl_exit(res, (long long)(rval))
+#define __sanitizer_syscall_pre_fork() __sanitizer_syscall_pre_impl_fork()
+#define __sanitizer_syscall_post_fork(res) \
+ __sanitizer_syscall_post_impl_fork(res)
+#define __sanitizer_syscall_pre_read(fd, buf, nbyte) \
+ __sanitizer_syscall_pre_impl_read((long long)(fd), (long long)(buf), \
+ (long long)(nbyte))
+#define __sanitizer_syscall_post_read(res, fd, buf, nbyte) \
+ __sanitizer_syscall_post_impl_read(res, (long long)(fd), (long long)(buf), \
+ (long long)(nbyte))
+#define __sanitizer_syscall_pre_write(fd, buf, nbyte) \
+ __sanitizer_syscall_pre_impl_write((long long)(fd), (long long)(buf), \
+ (long long)(nbyte))
+#define __sanitizer_syscall_post_write(res, fd, buf, nbyte) \
+ __sanitizer_syscall_post_impl_write(res, (long long)(fd), (long long)(buf), \
+ (long long)(nbyte))
+#define __sanitizer_syscall_pre_open(path, flags, mode) \
+ __sanitizer_syscall_pre_impl_open((long long)(path), (long long)(flags), \
+ (long long)(mode))
+#define __sanitizer_syscall_post_open(res, path, flags, mode) \
+ __sanitizer_syscall_post_impl_open(res, (long long)(path), \
+ (long long)(flags), (long long)(mode))
+#define __sanitizer_syscall_pre_close(fd) \
+ __sanitizer_syscall_pre_impl_close((long long)(fd))
+#define __sanitizer_syscall_post_close(res, fd) \
+ __sanitizer_syscall_post_impl_close(res, (long long)(fd))
+#define __sanitizer_syscall_pre_compat_50_wait4(pid, status, options, rusage) \
+ __sanitizer_syscall_pre_impl_compat_50_wait4( \
+ (long long)(pid), (long long)(status), (long long)(options), \
+ (long long)(rusage))
+#define __sanitizer_syscall_post_compat_50_wait4(res, pid, status, options, \
+ rusage) \
+ __sanitizer_syscall_post_impl_compat_50_wait4( \
+ res, (long long)(pid), (long long)(status), (long long)(options), \
+ (long long)(rusage))
+#define __sanitizer_syscall_pre_compat_43_ocreat(path, mode) \
+ __sanitizer_syscall_pre_impl_compat_43_ocreat((long long)(path), \
+ (long long)(mode))
+#define __sanitizer_syscall_post_compat_43_ocreat(res, path, mode) \
+ __sanitizer_syscall_post_impl_compat_43_ocreat(res, (long long)(path), \
+ (long long)(mode))
+#define __sanitizer_syscall_pre_link(path, link) \
+ __sanitizer_syscall_pre_impl_link((long long)(path), (long long)(link))
+#define __sanitizer_syscall_post_link(res, path, link) \
+ __sanitizer_syscall_post_impl_link(res, (long long)(path), (long long)(link))
+#define __sanitizer_syscall_pre_unlink(path) \
+ __sanitizer_syscall_pre_impl_unlink((long long)(path))
+#define __sanitizer_syscall_post_unlink(res, path) \
+ __sanitizer_syscall_post_impl_unlink(res, (long long)(path))
+/* syscall 11 has been skipped */
+#define __sanitizer_syscall_pre_chdir(path) \
+ __sanitizer_syscall_pre_impl_chdir((long long)(path))
+#define __sanitizer_syscall_post_chdir(res, path) \
+ __sanitizer_syscall_post_impl_chdir(res, (long long)(path))
+#define __sanitizer_syscall_pre_fchdir(fd) \
+ __sanitizer_syscall_pre_impl_fchdir((long long)(fd))
+#define __sanitizer_syscall_post_fchdir(res, fd) \
+ __sanitizer_syscall_post_impl_fchdir(res, (long long)(fd))
+#define __sanitizer_syscall_pre_compat_50_mknod(path, mode, dev) \
+ __sanitizer_syscall_pre_impl_compat_50_mknod( \
+ (long long)(path), (long long)(mode), (long long)(dev))
+#define __sanitizer_syscall_post_compat_50_mknod(res, path, mode, dev) \
+ __sanitizer_syscall_post_impl_compat_50_mknod( \
+ res, (long long)(path), (long long)(mode), (long long)(dev))
+#define __sanitizer_syscall_pre_chmod(path, mode) \
+ __sanitizer_syscall_pre_impl_chmod((long long)(path), (long long)(mode))
+#define __sanitizer_syscall_post_chmod(res, path, mode) \
+ __sanitizer_syscall_post_impl_chmod(res, (long long)(path), (long long)(mode))
+#define __sanitizer_syscall_pre_chown(path, uid, gid) \
+ __sanitizer_syscall_pre_impl_chown((long long)(path), (long long)(uid), \
+ (long long)(gid))
+#define __sanitizer_syscall_post_chown(res, path, uid, gid) \
+ __sanitizer_syscall_post_impl_chown(res, (long long)(path), \
+ (long long)(uid), (long long)(gid))
+#define __sanitizer_syscall_pre_break(nsize) \
+ __sanitizer_syscall_pre_impl_break((long long)(nsize))
+#define __sanitizer_syscall_post_break(res, nsize) \
+ __sanitizer_syscall_post_impl_break(res, (long long)(nsize))
+#define __sanitizer_syscall_pre_compat_20_getfsstat(buf, bufsize, flags) \
+ __sanitizer_syscall_pre_impl_compat_20_getfsstat( \
+ (long long)(buf), (long long)(bufsize), (long long)(flags))
+#define __sanitizer_syscall_post_compat_20_getfsstat(res, buf, bufsize, flags) \
+ __sanitizer_syscall_post_impl_compat_20_getfsstat( \
+ res, (long long)(buf), (long long)(bufsize), (long long)(flags))
+#define __sanitizer_syscall_pre_compat_43_olseek(fd, offset, whence) \
+ __sanitizer_syscall_pre_impl_compat_43_olseek( \
+ (long long)(fd), (long long)(offset), (long long)(whence))
+#define __sanitizer_syscall_post_compat_43_olseek(res, fd, offset, whence) \
+ __sanitizer_syscall_post_impl_compat_43_olseek( \
+ res, (long long)(fd), (long long)(offset), (long long)(whence))
+#define __sanitizer_syscall_pre_getpid() __sanitizer_syscall_pre_impl_getpid()
+#define __sanitizer_syscall_post_getpid(res) \
+ __sanitizer_syscall_post_impl_getpid(res)
+#define __sanitizer_syscall_pre_compat_40_mount(type, path, flags, data) \
+ __sanitizer_syscall_pre_impl_compat_40_mount( \
+ (long long)(type), (long long)(path), (long long)(flags), \
+ (long long)(data))
+#define __sanitizer_syscall_post_compat_40_mount(res, type, path, flags, data) \
+ __sanitizer_syscall_post_impl_compat_40_mount( \
+ res, (long long)(type), (long long)(path), (long long)(flags), \
+ (long long)(data))
+#define __sanitizer_syscall_pre_unmount(path, flags) \
+ __sanitizer_syscall_pre_impl_unmount((long long)(path), (long long)(flags))
+#define __sanitizer_syscall_post_unmount(res, path, flags) \
+ __sanitizer_syscall_post_impl_unmount(res, (long long)(path), \
+ (long long)(flags))
+#define __sanitizer_syscall_pre_setuid(uid) \
+ __sanitizer_syscall_pre_impl_setuid((long long)(uid))
+#define __sanitizer_syscall_post_setuid(res, uid) \
+ __sanitizer_syscall_post_impl_setuid(res, (long long)(uid))
+#define __sanitizer_syscall_pre_getuid() __sanitizer_syscall_pre_impl_getuid()
+#define __sanitizer_syscall_post_getuid(res) \
+ __sanitizer_syscall_post_impl_getuid(res)
+#define __sanitizer_syscall_pre_geteuid() __sanitizer_syscall_pre_impl_geteuid()
+#define __sanitizer_syscall_post_geteuid(res) \
+ __sanitizer_syscall_post_impl_geteuid(res)
+#define __sanitizer_syscall_pre_ptrace(req, pid, addr, data) \
+ __sanitizer_syscall_pre_impl_ptrace((long long)(req), (long long)(pid), \
+ (long long)(addr), (long long)(data))
+#define __sanitizer_syscall_post_ptrace(res, req, pid, addr, data) \
+ __sanitizer_syscall_post_impl_ptrace(res, (long long)(req), \
+ (long long)(pid), (long long)(addr), \
+ (long long)(data))
+#define __sanitizer_syscall_pre_recvmsg(s, msg, flags) \
+ __sanitizer_syscall_pre_impl_recvmsg((long long)(s), (long long)(msg), \
+ (long long)(flags))
+#define __sanitizer_syscall_post_recvmsg(res, s, msg, flags) \
+ __sanitizer_syscall_post_impl_recvmsg(res, (long long)(s), (long long)(msg), \
+ (long long)(flags))
+#define __sanitizer_syscall_pre_sendmsg(s, msg, flags) \
+ __sanitizer_syscall_pre_impl_sendmsg((long long)(s), (long long)(msg), \
+ (long long)(flags))
+#define __sanitizer_syscall_post_sendmsg(res, s, msg, flags) \
+ __sanitizer_syscall_post_impl_sendmsg(res, (long long)(s), (long long)(msg), \
+ (long long)(flags))
+#define __sanitizer_syscall_pre_recvfrom(s, buf, len, flags, from, \
+ fromlenaddr) \
+ __sanitizer_syscall_pre_impl_recvfrom( \
+ (long long)(s), (long long)(buf), (long long)(len), (long long)(flags), \
+ (long long)(from), (long long)(fromlenaddr))
+#define __sanitizer_syscall_post_recvfrom(res, s, buf, len, flags, from, \
+ fromlenaddr) \
+ __sanitizer_syscall_post_impl_recvfrom( \
+ res, (long long)(s), (long long)(buf), (long long)(len), \
+ (long long)(flags), (long long)(from), (long long)(fromlenaddr))
+#define __sanitizer_syscall_pre_accept(s, name, anamelen) \
+ __sanitizer_syscall_pre_impl_accept((long long)(s), (long long)(name), \
+ (long long)(anamelen))
+#define __sanitizer_syscall_post_accept(res, s, name, anamelen) \
+ __sanitizer_syscall_post_impl_accept(res, (long long)(s), (long long)(name), \
+ (long long)(anamelen))
+#define __sanitizer_syscall_pre_getpeername(fdes, asa, alen) \
+ __sanitizer_syscall_pre_impl_getpeername( \
+ (long long)(fdes), (long long)(asa), (long long)(alen))
+#define __sanitizer_syscall_post_getpeername(res, fdes, asa, alen) \
+ __sanitizer_syscall_post_impl_getpeername( \
+ res, (long long)(fdes), (long long)(asa), (long long)(alen))
+#define __sanitizer_syscall_pre_getsockname(fdes, asa, alen) \
+ __sanitizer_syscall_pre_impl_getsockname( \
+ (long long)(fdes), (long long)(asa), (long long)(alen))
+#define __sanitizer_syscall_post_getsockname(res, fdes, asa, alen) \
+ __sanitizer_syscall_post_impl_getsockname( \
+ res, (long long)(fdes), (long long)(asa), (long long)(alen))
+#define __sanitizer_syscall_pre_access(path, flags) \
+ __sanitizer_syscall_pre_impl_access((long long)(path), (long long)(flags))
+#define __sanitizer_syscall_post_access(res, path, flags) \
+ __sanitizer_syscall_post_impl_access(res, (long long)(path), \
+ (long long)(flags))
+#define __sanitizer_syscall_pre_chflags(path, flags) \
+ __sanitizer_syscall_pre_impl_chflags((long long)(path), (long long)(flags))
+#define __sanitizer_syscall_post_chflags(res, path, flags) \
+ __sanitizer_syscall_post_impl_chflags(res, (long long)(path), \
+ (long long)(flags))
+#define __sanitizer_syscall_pre_fchflags(fd, flags) \
+ __sanitizer_syscall_pre_impl_fchflags((long long)(fd), (long long)(flags))
+#define __sanitizer_syscall_post_fchflags(res, fd, flags) \
+ __sanitizer_syscall_post_impl_fchflags(res, (long long)(fd), \
+ (long long)(flags))
+#define __sanitizer_syscall_pre_sync() __sanitizer_syscall_pre_impl_sync()
+#define __sanitizer_syscall_post_sync(res) \
+ __sanitizer_syscall_post_impl_sync(res)
+#define __sanitizer_syscall_pre_kill(pid, signum) \
+ __sanitizer_syscall_pre_impl_kill((long long)(pid), (long long)(signum))
+#define __sanitizer_syscall_post_kill(res, pid, signum) \
+ __sanitizer_syscall_post_impl_kill(res, (long long)(pid), (long long)(signum))
+#define __sanitizer_syscall_pre_compat_43_stat43(path, ub) \
+ __sanitizer_syscall_pre_impl_compat_43_stat43((long long)(path), \
+ (long long)(ub))
+#define __sanitizer_syscall_post_compat_43_stat43(res, path, ub) \
+ __sanitizer_syscall_post_impl_compat_43_stat43(res, (long long)(path), \
+ (long long)(ub))
+#define __sanitizer_syscall_pre_getppid() __sanitizer_syscall_pre_impl_getppid()
+#define __sanitizer_syscall_post_getppid(res) \
+ __sanitizer_syscall_post_impl_getppid(res)
+#define __sanitizer_syscall_pre_compat_43_lstat43(path, ub) \
+ __sanitizer_syscall_pre_impl_compat_43_lstat43((long long)(path), \
+ (long long)(ub))
+#define __sanitizer_syscall_post_compat_43_lstat43(res, path, ub) \
+ __sanitizer_syscall_post_impl_compat_43_lstat43(res, (long long)(path), \
+ (long long)(ub))
+#define __sanitizer_syscall_pre_dup(fd) \
+ __sanitizer_syscall_pre_impl_dup((long long)(fd))
+#define __sanitizer_syscall_post_dup(res, fd) \
+ __sanitizer_syscall_post_impl_dup(res, (long long)(fd))
+#define __sanitizer_syscall_pre_pipe() __sanitizer_syscall_pre_impl_pipe()
+#define __sanitizer_syscall_post_pipe(res) \
+ __sanitizer_syscall_post_impl_pipe(res)
+#define __sanitizer_syscall_pre_getegid() __sanitizer_syscall_pre_impl_getegid()
+#define __sanitizer_syscall_post_getegid(res) \
+ __sanitizer_syscall_post_impl_getegid(res)
+#define __sanitizer_syscall_pre_profil(samples, size, offset, scale) \
+ __sanitizer_syscall_pre_impl_profil((long long)(samples), (long long)(size), \
+ (long long)(offset), (long long)(scale))
+#define __sanitizer_syscall_post_profil(res, samples, size, offset, scale) \
+ __sanitizer_syscall_post_impl_profil(res, (long long)(samples), \
+ (long long)(size), (long long)(offset), \
+ (long long)(scale))
+#define __sanitizer_syscall_pre_ktrace(fname, ops, facs, pid) \
+ __sanitizer_syscall_pre_impl_ktrace((long long)(fname), (long long)(ops), \
+ (long long)(facs), (long long)(pid))
+#define __sanitizer_syscall_post_ktrace(res, fname, ops, facs, pid) \
+ __sanitizer_syscall_post_impl_ktrace(res, (long long)(fname), \
+ (long long)(ops), (long long)(facs), \
+ (long long)(pid))
+#define __sanitizer_syscall_pre_compat_13_sigaction13(signum, nsa, osa) \
+ __sanitizer_syscall_pre_impl_compat_13_sigaction13( \
+ (long long)(signum), (long long)(nsa), (long long)(osa))
+#define __sanitizer_syscall_post_compat_13_sigaction13(res, signum, nsa, osa) \
+ __sanitizer_syscall_post_impl_compat_13_sigaction13( \
+ res, (long long)(signum), (long long)(nsa), (long long)(osa))
+#define __sanitizer_syscall_pre_getgid() __sanitizer_syscall_pre_impl_getgid()
+#define __sanitizer_syscall_post_getgid(res) \
+ __sanitizer_syscall_post_impl_getgid(res)
+#define __sanitizer_syscall_pre_compat_13_sigprocmask13(how, mask) \
+ __sanitizer_syscall_pre_impl_compat_13_sigprocmask13((long long)(how), \
+ (long long)(mask))
+#define __sanitizer_syscall_post_compat_13_sigprocmask13(res, how, mask) \
+ __sanitizer_syscall_post_impl_compat_13_sigprocmask13(res, (long long)(how), \
+ (long long)(mask))
+#define __sanitizer_syscall_pre___getlogin(namebuf, namelen) \
+ __sanitizer_syscall_pre_impl___getlogin((long long)(namebuf), \
+ (long long)(namelen))
+#define __sanitizer_syscall_post___getlogin(res, namebuf, namelen) \
+ __sanitizer_syscall_post_impl___getlogin(res, (long long)(namebuf), \
+ (long long)(namelen))
+#define __sanitizer_syscall_pre___setlogin(namebuf) \
+ __sanitizer_syscall_pre_impl___setlogin((long long)(namebuf))
+#define __sanitizer_syscall_post___setlogin(res, namebuf) \
+ __sanitizer_syscall_post_impl___setlogin(res, (long long)(namebuf))
+#define __sanitizer_syscall_pre_acct(path) \
+ __sanitizer_syscall_pre_impl_acct((long long)(path))
+#define __sanitizer_syscall_post_acct(res, path) \
+ __sanitizer_syscall_post_impl_acct(res, (long long)(path))
+#define __sanitizer_syscall_pre_compat_13_sigpending13() \
+ __sanitizer_syscall_pre_impl_compat_13_sigpending13()
+#define __sanitizer_syscall_post_compat_13_sigpending13(res) \
+ __sanitizer_syscall_post_impl_compat_13_sigpending13(res)
+#define __sanitizer_syscall_pre_compat_13_sigaltstack13(nss, oss) \
+ __sanitizer_syscall_pre_impl_compat_13_sigaltstack13((long long)(nss), \
+ (long long)(oss))
+#define __sanitizer_syscall_post_compat_13_sigaltstack13(res, nss, oss) \
+ __sanitizer_syscall_post_impl_compat_13_sigaltstack13(res, (long long)(nss), \
+ (long long)(oss))
+#define __sanitizer_syscall_pre_ioctl(fd, com, data) \
+ __sanitizer_syscall_pre_impl_ioctl((long long)(fd), (long long)(com), \
+ (long long)(data))
+#define __sanitizer_syscall_post_ioctl(res, fd, com, data) \
+ __sanitizer_syscall_post_impl_ioctl(res, (long long)(fd), (long long)(com), \
+ (long long)(data))
+#define __sanitizer_syscall_pre_compat_12_oreboot(opt) \
+ __sanitizer_syscall_pre_impl_compat_12_oreboot((long long)(opt))
+#define __sanitizer_syscall_post_compat_12_oreboot(res, opt) \
+ __sanitizer_syscall_post_impl_compat_12_oreboot(res, (long long)(opt))
+#define __sanitizer_syscall_pre_revoke(path) \
+ __sanitizer_syscall_pre_impl_revoke((long long)(path))
+#define __sanitizer_syscall_post_revoke(res, path) \
+ __sanitizer_syscall_post_impl_revoke(res, (long long)(path))
+#define __sanitizer_syscall_pre_symlink(path, link) \
+ __sanitizer_syscall_pre_impl_symlink((long long)(path), (long long)(link))
+#define __sanitizer_syscall_post_symlink(res, path, link) \
+ __sanitizer_syscall_post_impl_symlink(res, (long long)(path), \
+ (long long)(link))
+#define __sanitizer_syscall_pre_readlink(path, buf, count) \
+ __sanitizer_syscall_pre_impl_readlink((long long)(path), (long long)(buf), \
+ (long long)(count))
+#define __sanitizer_syscall_post_readlink(res, path, buf, count) \
+ __sanitizer_syscall_post_impl_readlink(res, (long long)(path), \
+ (long long)(buf), (long long)(count))
+#define __sanitizer_syscall_pre_execve(path, argp, envp) \
+ __sanitizer_syscall_pre_impl_execve((long long)(path), (long long)(argp), \
+ (long long)(envp))
+#define __sanitizer_syscall_post_execve(res, path, argp, envp) \
+ __sanitizer_syscall_post_impl_execve(res, (long long)(path), \
+ (long long)(argp), (long long)(envp))
+#define __sanitizer_syscall_pre_umask(newmask) \
+ __sanitizer_syscall_pre_impl_umask((long long)(newmask))
+#define __sanitizer_syscall_post_umask(res, newmask) \
+ __sanitizer_syscall_post_impl_umask(res, (long long)(newmask))
+#define __sanitizer_syscall_pre_chroot(path) \
+ __sanitizer_syscall_pre_impl_chroot((long long)(path))
+#define __sanitizer_syscall_post_chroot(res, path) \
+ __sanitizer_syscall_post_impl_chroot(res, (long long)(path))
+#define __sanitizer_syscall_pre_compat_43_fstat43(fd, sb) \
+ __sanitizer_syscall_pre_impl_compat_43_fstat43((long long)(fd), \
+ (long long)(sb))
+#define __sanitizer_syscall_post_compat_43_fstat43(res, fd, sb) \
+ __sanitizer_syscall_post_impl_compat_43_fstat43(res, (long long)(fd), \
+ (long long)(sb))
+#define __sanitizer_syscall_pre_compat_43_ogetkerninfo(op, where, size, arg) \
+ __sanitizer_syscall_pre_impl_compat_43_ogetkerninfo( \
+ (long long)(op), (long long)(where), (long long)(size), \
+ (long long)(arg))
+#define __sanitizer_syscall_post_compat_43_ogetkerninfo(res, op, where, size, \
+ arg) \
+ __sanitizer_syscall_post_impl_compat_43_ogetkerninfo( \
+ res, (long long)(op), (long long)(where), (long long)(size), \
+ (long long)(arg))
+#define __sanitizer_syscall_pre_compat_43_ogetpagesize() \
+ __sanitizer_syscall_pre_impl_compat_43_ogetpagesize()
+#define __sanitizer_syscall_post_compat_43_ogetpagesize(res) \
+ __sanitizer_syscall_post_impl_compat_43_ogetpagesize(res)
+#define __sanitizer_syscall_pre_compat_12_msync(addr, len) \
+ __sanitizer_syscall_pre_impl_compat_12_msync((long long)(addr), \
+ (long long)(len))
+#define __sanitizer_syscall_post_compat_12_msync(res, addr, len) \
+ __sanitizer_syscall_post_impl_compat_12_msync(res, (long long)(addr), \
+ (long long)(len))
+#define __sanitizer_syscall_pre_vfork() __sanitizer_syscall_pre_impl_vfork()
+#define __sanitizer_syscall_post_vfork(res) \
+ __sanitizer_syscall_post_impl_vfork(res)
+/* syscall 67 has been skipped */
+/* syscall 68 has been skipped */
+/* syscall 69 has been skipped */
+/* syscall 70 has been skipped */
+#define __sanitizer_syscall_pre_compat_43_ommap(addr, len, prot, flags, fd, \
+ pos) \
+ __sanitizer_syscall_pre_impl_compat_43_ommap( \
+ (long long)(addr), (long long)(len), (long long)(prot), \
+ (long long)(flags), (long long)(fd), (long long)(pos))
+#define __sanitizer_syscall_post_compat_43_ommap(res, addr, len, prot, flags, \
+ fd, pos) \
+ __sanitizer_syscall_post_impl_compat_43_ommap( \
+ res, (long long)(addr), (long long)(len), (long long)(prot), \
+ (long long)(flags), (long long)(fd), (long long)(pos))
+#define __sanitizer_syscall_pre_vadvise(anom) \
+ __sanitizer_syscall_pre_impl_vadvise((long long)(anom))
+#define __sanitizer_syscall_post_vadvise(res, anom) \
+ __sanitizer_syscall_post_impl_vadvise(res, (long long)(anom))
+#define __sanitizer_syscall_pre_munmap(addr, len) \
+ __sanitizer_syscall_pre_impl_munmap((long long)(addr), (long long)(len))
+#define __sanitizer_syscall_post_munmap(res, addr, len) \
+ __sanitizer_syscall_post_impl_munmap(res, (long long)(addr), (long long)(len))
+#define __sanitizer_syscall_pre_mprotect(addr, len, prot) \
+ __sanitizer_syscall_pre_impl_mprotect((long long)(addr), (long long)(len), \
+ (long long)(prot))
+#define __sanitizer_syscall_post_mprotect(res, addr, len, prot) \
+ __sanitizer_syscall_post_impl_mprotect(res, (long long)(addr), \
+ (long long)(len), (long long)(prot))
+#define __sanitizer_syscall_pre_madvise(addr, len, behav) \
+ __sanitizer_syscall_pre_impl_madvise((long long)(addr), (long long)(len), \
+ (long long)(behav))
+#define __sanitizer_syscall_post_madvise(res, addr, len, behav) \
+ __sanitizer_syscall_post_impl_madvise(res, (long long)(addr), \
+ (long long)(len), (long long)(behav))
+/* syscall 76 has been skipped */
+/* syscall 77 has been skipped */
+#define __sanitizer_syscall_pre_mincore(addr, len, vec) \
+ __sanitizer_syscall_pre_impl_mincore((long long)(addr), (long long)(len), \
+ (long long)(vec))
+#define __sanitizer_syscall_post_mincore(res, addr, len, vec) \
+ __sanitizer_syscall_post_impl_mincore(res, (long long)(addr), \
+ (long long)(len), (long long)(vec))
+#define __sanitizer_syscall_pre_getgroups(gidsetsize, gidset) \
+ __sanitizer_syscall_pre_impl_getgroups((long long)(gidsetsize), \
+ (long long)(gidset))
+#define __sanitizer_syscall_post_getgroups(res, gidsetsize, gidset) \
+ __sanitizer_syscall_post_impl_getgroups(res, (long long)(gidsetsize), \
+ (long long)(gidset))
+#define __sanitizer_syscall_pre_setgroups(gidsetsize, gidset) \
+ __sanitizer_syscall_pre_impl_setgroups((long long)(gidsetsize), \
+ (long long)(gidset))
+#define __sanitizer_syscall_post_setgroups(res, gidsetsize, gidset) \
+ __sanitizer_syscall_post_impl_setgroups(res, (long long)(gidsetsize), \
+ (long long)(gidset))
+#define __sanitizer_syscall_pre_getpgrp() __sanitizer_syscall_pre_impl_getpgrp()
+#define __sanitizer_syscall_post_getpgrp(res) \
+ __sanitizer_syscall_post_impl_getpgrp(res)
+#define __sanitizer_syscall_pre_setpgid(pid, pgid) \
+ __sanitizer_syscall_pre_impl_setpgid((long long)(pid), (long long)(pgid))
+#define __sanitizer_syscall_post_setpgid(res, pid, pgid) \
+ __sanitizer_syscall_post_impl_setpgid(res, (long long)(pid), \
+ (long long)(pgid))
+#define __sanitizer_syscall_pre_compat_50_setitimer(which, itv, oitv) \
+ __sanitizer_syscall_pre_impl_compat_50_setitimer( \
+ (long long)(which), (long long)(itv), (long long)(oitv))
+#define __sanitizer_syscall_post_compat_50_setitimer(res, which, itv, oitv) \
+ __sanitizer_syscall_post_impl_compat_50_setitimer( \
+ res, (long long)(which), (long long)(itv), (long long)(oitv))
+#define __sanitizer_syscall_pre_compat_43_owait() \
+ __sanitizer_syscall_pre_impl_compat_43_owait()
+#define __sanitizer_syscall_post_compat_43_owait(res) \
+ __sanitizer_syscall_post_impl_compat_43_owait(res)
+#define __sanitizer_syscall_pre_compat_12_oswapon(name) \
+ __sanitizer_syscall_pre_impl_compat_12_oswapon((long long)(name))
+#define __sanitizer_syscall_post_compat_12_oswapon(res, name) \
+ __sanitizer_syscall_post_impl_compat_12_oswapon(res, (long long)(name))
+#define __sanitizer_syscall_pre_compat_50_getitimer(which, itv) \
+ __sanitizer_syscall_pre_impl_compat_50_getitimer((long long)(which), \
+ (long long)(itv))
+#define __sanitizer_syscall_post_compat_50_getitimer(res, which, itv) \
+ __sanitizer_syscall_post_impl_compat_50_getitimer(res, (long long)(which), \
+ (long long)(itv))
+#define __sanitizer_syscall_pre_compat_43_ogethostname(hostname, len) \
+ __sanitizer_syscall_pre_impl_compat_43_ogethostname((long long)(hostname), \
+ (long long)(len))
+#define __sanitizer_syscall_post_compat_43_ogethostname(res, hostname, len) \
+ __sanitizer_syscall_post_impl_compat_43_ogethostname( \
+ res, (long long)(hostname), (long long)(len))
+#define __sanitizer_syscall_pre_compat_43_osethostname(hostname, len) \
+ __sanitizer_syscall_pre_impl_compat_43_osethostname((long long)(hostname), \
+ (long long)(len))
+#define __sanitizer_syscall_post_compat_43_osethostname(res, hostname, len) \
+ __sanitizer_syscall_post_impl_compat_43_osethostname( \
+ res, (long long)(hostname), (long long)(len))
+#define __sanitizer_syscall_pre_compat_43_ogetdtablesize() \
+ __sanitizer_syscall_pre_impl_compat_43_ogetdtablesize()
+#define __sanitizer_syscall_post_compat_43_ogetdtablesize(res) \
+ __sanitizer_syscall_post_impl_compat_43_ogetdtablesize(res)
+#define __sanitizer_syscall_pre_dup2(from, to) \
+ __sanitizer_syscall_pre_impl_dup2((long long)(from), (long long)(to))
+#define __sanitizer_syscall_post_dup2(res, from, to) \
+ __sanitizer_syscall_post_impl_dup2(res, (long long)(from), (long long)(to))
+/* syscall 91 has been skipped */
+#define __sanitizer_syscall_pre_fcntl(fd, cmd, arg) \
+ __sanitizer_syscall_pre_impl_fcntl((long long)(fd), (long long)(cmd), \
+ (long long)(arg))
+#define __sanitizer_syscall_post_fcntl(res, fd, cmd, arg) \
+ __sanitizer_syscall_post_impl_fcntl(res, (long long)(fd), (long long)(cmd), \
+ (long long)(arg))
+#define __sanitizer_syscall_pre_compat_50_select(nd, in, ou, ex, tv) \
+ __sanitizer_syscall_pre_impl_compat_50_select( \
+ (long long)(nd), (long long)(in), (long long)(ou), (long long)(ex), \
+ (long long)(tv))
+#define __sanitizer_syscall_post_compat_50_select(res, nd, in, ou, ex, tv) \
+ __sanitizer_syscall_post_impl_compat_50_select( \
+ res, (long long)(nd), (long long)(in), (long long)(ou), (long long)(ex), \
+ (long long)(tv))
+/* syscall 94 has been skipped */
+#define __sanitizer_syscall_pre_fsync(fd) \
+ __sanitizer_syscall_pre_impl_fsync((long long)(fd))
+#define __sanitizer_syscall_post_fsync(res, fd) \
+ __sanitizer_syscall_post_impl_fsync(res, (long long)(fd))
+#define __sanitizer_syscall_pre_setpriority(which, who, prio) \
+ __sanitizer_syscall_pre_impl_setpriority( \
+ (long long)(which), (long long)(who), (long long)(prio))
+#define __sanitizer_syscall_post_setpriority(res, which, who, prio) \
+ __sanitizer_syscall_post_impl_setpriority( \
+ res, (long long)(which), (long long)(who), (long long)(prio))
+#define __sanitizer_syscall_pre_compat_30_socket(domain, type, protocol) \
+ __sanitizer_syscall_pre_impl_compat_30_socket( \
+ (long long)(domain), (long long)(type), (long long)(protocol))
+#define __sanitizer_syscall_post_compat_30_socket(res, domain, type, protocol) \
+ __sanitizer_syscall_post_impl_compat_30_socket( \
+ res, (long long)(domain), (long long)(type), (long long)(protocol))
+#define __sanitizer_syscall_pre_connect(s, name, namelen) \
+ __sanitizer_syscall_pre_impl_connect((long long)(s), (long long)(name), \
+ (long long)(namelen))
+#define __sanitizer_syscall_post_connect(res, s, name, namelen) \
+ __sanitizer_syscall_post_impl_connect( \
+ res, (long long)(s), (long long)(name), (long long)(namelen))
+#define __sanitizer_syscall_pre_compat_43_oaccept(s, name, anamelen) \
+ __sanitizer_syscall_pre_impl_compat_43_oaccept( \
+ (long long)(s), (long long)(name), (long long)(anamelen))
+#define __sanitizer_syscall_post_compat_43_oaccept(res, s, name, anamelen) \
+ __sanitizer_syscall_post_impl_compat_43_oaccept( \
+ res, (long long)(s), (long long)(name), (long long)(anamelen))
+#define __sanitizer_syscall_pre_getpriority(which, who) \
+ __sanitizer_syscall_pre_impl_getpriority((long long)(which), (long long)(who))
+#define __sanitizer_syscall_post_getpriority(res, which, who) \
+ __sanitizer_syscall_post_impl_getpriority(res, (long long)(which), \
+ (long long)(who))
+#define __sanitizer_syscall_pre_compat_43_osend(s, buf, len, flags) \
+ __sanitizer_syscall_pre_impl_compat_43_osend( \
+ (long long)(s), (long long)(buf), (long long)(len), (long long)(flags))
+#define __sanitizer_syscall_post_compat_43_osend(res, s, buf, len, flags) \
+ __sanitizer_syscall_post_impl_compat_43_osend( \
+ res, (long long)(s), (long long)(buf), (long long)(len), \
+ (long long)(flags))
+#define __sanitizer_syscall_pre_compat_43_orecv(s, buf, len, flags) \
+ __sanitizer_syscall_pre_impl_compat_43_orecv( \
+ (long long)(s), (long long)(buf), (long long)(len), (long long)(flags))
+#define __sanitizer_syscall_post_compat_43_orecv(res, s, buf, len, flags) \
+ __sanitizer_syscall_post_impl_compat_43_orecv( \
+ res, (long long)(s), (long long)(buf), (long long)(len), \
+ (long long)(flags))
+#define __sanitizer_syscall_pre_compat_13_sigreturn13(sigcntxp) \
+ __sanitizer_syscall_pre_impl_compat_13_sigreturn13((long long)(sigcntxp))
+#define __sanitizer_syscall_post_compat_13_sigreturn13(res, sigcntxp) \
+ __sanitizer_syscall_post_impl_compat_13_sigreturn13(res, \
+ (long long)(sigcntxp))
+#define __sanitizer_syscall_pre_bind(s, name, namelen) \
+ __sanitizer_syscall_pre_impl_bind((long long)(s), (long long)(name), \
+ (long long)(namelen))
+#define __sanitizer_syscall_post_bind(res, s, name, namelen) \
+ __sanitizer_syscall_post_impl_bind(res, (long long)(s), (long long)(name), \
+ (long long)(namelen))
+#define __sanitizer_syscall_pre_setsockopt(s, level, name, val, valsize) \
+ __sanitizer_syscall_pre_impl_setsockopt((long long)(s), (long long)(level), \
+ (long long)(name), (long long)(val), \
+ (long long)(valsize))
+#define __sanitizer_syscall_post_setsockopt(res, s, level, name, val, valsize) \
+ __sanitizer_syscall_post_impl_setsockopt( \
+ res, (long long)(s), (long long)(level), (long long)(name), \
+ (long long)(val), (long long)(valsize))
+#define __sanitizer_syscall_pre_listen(s, backlog) \
+ __sanitizer_syscall_pre_impl_listen((long long)(s), (long long)(backlog))
+#define __sanitizer_syscall_post_listen(res, s, backlog) \
+ __sanitizer_syscall_post_impl_listen(res, (long long)(s), \
+ (long long)(backlog))
+/* syscall 107 has been skipped */
+#define __sanitizer_syscall_pre_compat_43_osigvec(signum, nsv, osv) \
+ __sanitizer_syscall_pre_impl_compat_43_osigvec( \
+ (long long)(signum), (long long)(nsv), (long long)(osv))
+#define __sanitizer_syscall_post_compat_43_osigvec(res, signum, nsv, osv) \
+ __sanitizer_syscall_post_impl_compat_43_osigvec( \
+ res, (long long)(signum), (long long)(nsv), (long long)(osv))
+#define __sanitizer_syscall_pre_compat_43_osigblock(mask) \
+ __sanitizer_syscall_pre_impl_compat_43_osigblock((long long)(mask))
+#define __sanitizer_syscall_post_compat_43_osigblock(res, mask) \
+ __sanitizer_syscall_post_impl_compat_43_osigblock(res, (long long)(mask))
+#define __sanitizer_syscall_pre_compat_43_osigsetmask(mask) \
+ __sanitizer_syscall_pre_impl_compat_43_osigsetmask((long long)(mask))
+#define __sanitizer_syscall_post_compat_43_osigsetmask(res, mask) \
+ __sanitizer_syscall_post_impl_compat_43_osigsetmask(res, (long long)(mask))
+#define __sanitizer_syscall_pre_compat_13_sigsuspend13(mask) \
+ __sanitizer_syscall_pre_impl_compat_13_sigsuspend13((long long)(mask))
+#define __sanitizer_syscall_post_compat_13_sigsuspend13(res, mask) \
+ __sanitizer_syscall_post_impl_compat_13_sigsuspend13(res, (long long)(mask))
+#define __sanitizer_syscall_pre_compat_43_osigstack(nss, oss) \
+ __sanitizer_syscall_pre_impl_compat_43_osigstack((long long)(nss), \
+ (long long)(oss))
+#define __sanitizer_syscall_post_compat_43_osigstack(res, nss, oss) \
+ __sanitizer_syscall_post_impl_compat_43_osigstack(res, (long long)(nss), \
+ (long long)(oss))
+#define __sanitizer_syscall_pre_compat_43_orecvmsg(s, msg, flags) \
+ __sanitizer_syscall_pre_impl_compat_43_orecvmsg( \
+ (long long)(s), (long long)(msg), (long long)(flags))
+#define __sanitizer_syscall_post_compat_43_orecvmsg(res, s, msg, flags) \
+ __sanitizer_syscall_post_impl_compat_43_orecvmsg( \
+ res, (long long)(s), (long long)(msg), (long long)(flags))
+#define __sanitizer_syscall_pre_compat_43_osendmsg(s, msg, flags) \
+ __sanitizer_syscall_pre_impl_compat_43_osendmsg( \
+ (long long)(s), (long long)(msg), (long long)(flags))
+#define __sanitizer_syscall_post_compat_43_osendmsg(res, s, msg, flags) \
+ __sanitizer_syscall_post_impl_compat_43_osendmsg( \
+ res, (long long)(s), (long long)(msg), (long long)(flags))
+/* syscall 115 has been skipped */
+#define __sanitizer_syscall_pre_compat_50_gettimeofday(tp, tzp) \
+ __sanitizer_syscall_pre_impl_compat_50_gettimeofday((long long)(tp), \
+ (long long)(tzp))
+#define __sanitizer_syscall_post_compat_50_gettimeofday(res, tp, tzp) \
+ __sanitizer_syscall_post_impl_compat_50_gettimeofday(res, (long long)(tp), \
+ (long long)(tzp))
+#define __sanitizer_syscall_pre_compat_50_getrusage(who, rusage) \
+ __sanitizer_syscall_pre_impl_compat_50_getrusage((long long)(who), \
+ (long long)(rusage))
+#define __sanitizer_syscall_post_compat_50_getrusage(res, who, rusage) \
+ __sanitizer_syscall_post_impl_compat_50_getrusage(res, (long long)(who), \
+ (long long)(rusage))
+#define __sanitizer_syscall_pre_getsockopt(s, level, name, val, avalsize) \
+ __sanitizer_syscall_pre_impl_getsockopt((long long)(s), (long long)(level), \
+ (long long)(name), (long long)(val), \
+ (long long)(avalsize))
+#define __sanitizer_syscall_post_getsockopt(res, s, level, name, val, \
+ avalsize) \
+ __sanitizer_syscall_post_impl_getsockopt( \
+ res, (long long)(s), (long long)(level), (long long)(name), \
+ (long long)(val), (long long)(avalsize))
+/* syscall 119 has been skipped */
+#define __sanitizer_syscall_pre_readv(fd, iovp, iovcnt) \
+ __sanitizer_syscall_pre_impl_readv((long long)(fd), (long long)(iovp), \
+ (long long)(iovcnt))
+#define __sanitizer_syscall_post_readv(res, fd, iovp, iovcnt) \
+ __sanitizer_syscall_post_impl_readv(res, (long long)(fd), (long long)(iovp), \
+ (long long)(iovcnt))
+#define __sanitizer_syscall_pre_writev(fd, iovp, iovcnt) \
+ __sanitizer_syscall_pre_impl_writev((long long)(fd), (long long)(iovp), \
+ (long long)(iovcnt))
+#define __sanitizer_syscall_post_writev(res, fd, iovp, iovcnt) \
+ __sanitizer_syscall_post_impl_writev(res, (long long)(fd), \
+ (long long)(iovp), (long long)(iovcnt))
+#define __sanitizer_syscall_pre_compat_50_settimeofday(tv, tzp) \
+ __sanitizer_syscall_pre_impl_compat_50_settimeofday((long long)(tv), \
+ (long long)(tzp))
+#define __sanitizer_syscall_post_compat_50_settimeofday(res, tv, tzp) \
+ __sanitizer_syscall_post_impl_compat_50_settimeofday(res, (long long)(tv), \
+ (long long)(tzp))
+#define __sanitizer_syscall_pre_fchown(fd, uid, gid) \
+ __sanitizer_syscall_pre_impl_fchown((long long)(fd), (long long)(uid), \
+ (long long)(gid))
+#define __sanitizer_syscall_post_fchown(res, fd, uid, gid) \
+ __sanitizer_syscall_post_impl_fchown(res, (long long)(fd), (long long)(uid), \
+ (long long)(gid))
+#define __sanitizer_syscall_pre_fchmod(fd, mode) \
+ __sanitizer_syscall_pre_impl_fchmod((long long)(fd), (long long)(mode))
+#define __sanitizer_syscall_post_fchmod(res, fd, mode) \
+ __sanitizer_syscall_post_impl_fchmod(res, (long long)(fd), (long long)(mode))
+#define __sanitizer_syscall_pre_compat_43_orecvfrom(s, buf, len, flags, from, \
+ fromlenaddr) \
+ __sanitizer_syscall_pre_impl_compat_43_orecvfrom( \
+ (long long)(s), (long long)(buf), (long long)(len), (long long)(flags), \
+ (long long)(from), (long long)(fromlenaddr))
+#define __sanitizer_syscall_post_compat_43_orecvfrom(res, s, buf, len, flags, \
+ from, fromlenaddr) \
+ __sanitizer_syscall_post_impl_compat_43_orecvfrom( \
+ res, (long long)(s), (long long)(buf), (long long)(len), \
+ (long long)(flags), (long long)(from), (long long)(fromlenaddr))
+#define __sanitizer_syscall_pre_setreuid(ruid, euid) \
+ __sanitizer_syscall_pre_impl_setreuid((long long)(ruid), (long long)(euid))
+#define __sanitizer_syscall_post_setreuid(res, ruid, euid) \
+ __sanitizer_syscall_post_impl_setreuid(res, (long long)(ruid), \
+ (long long)(euid))
+#define __sanitizer_syscall_pre_setregid(rgid, egid) \
+ __sanitizer_syscall_pre_impl_setregid((long long)(rgid), (long long)(egid))
+#define __sanitizer_syscall_post_setregid(res, rgid, egid) \
+ __sanitizer_syscall_post_impl_setregid(res, (long long)(rgid), \
+ (long long)(egid))
+#define __sanitizer_syscall_pre_rename(from, to) \
+ __sanitizer_syscall_pre_impl_rename((long long)(from), (long long)(to))
+#define __sanitizer_syscall_post_rename(res, from, to) \
+ __sanitizer_syscall_post_impl_rename(res, (long long)(from), (long long)(to))
+#define __sanitizer_syscall_pre_compat_43_otruncate(path, length) \
+ __sanitizer_syscall_pre_impl_compat_43_otruncate((long long)(path), \
+ (long long)(length))
+#define __sanitizer_syscall_post_compat_43_otruncate(res, path, length) \
+ __sanitizer_syscall_post_impl_compat_43_otruncate(res, (long long)(path), \
+ (long long)(length))
+#define __sanitizer_syscall_pre_compat_43_oftruncate(fd, length) \
+ __sanitizer_syscall_pre_impl_compat_43_oftruncate((long long)(fd), \
+ (long long)(length))
+#define __sanitizer_syscall_post_compat_43_oftruncate(res, fd, length) \
+ __sanitizer_syscall_post_impl_compat_43_oftruncate(res, (long long)(fd), \
+ (long long)(length))
+#define __sanitizer_syscall_pre_flock(fd, how) \
+ __sanitizer_syscall_pre_impl_flock((long long)(fd), (long long)(how))
+#define __sanitizer_syscall_post_flock(res, fd, how) \
+ __sanitizer_syscall_post_impl_flock(res, (long long)(fd), (long long)(how))
+#define __sanitizer_syscall_pre_mkfifo(path, mode) \
+ __sanitizer_syscall_pre_impl_mkfifo((long long)(path), (long long)(mode))
+#define __sanitizer_syscall_post_mkfifo(res, path, mode) \
+ __sanitizer_syscall_post_impl_mkfifo(res, (long long)(path), \
+ (long long)(mode))
+#define __sanitizer_syscall_pre_sendto(s, buf, len, flags, to, tolen) \
+ __sanitizer_syscall_pre_impl_sendto((long long)(s), (long long)(buf), \
+ (long long)(len), (long long)(flags), \
+ (long long)(to), (long long)(tolen))
+#define __sanitizer_syscall_post_sendto(res, s, buf, len, flags, to, tolen) \
+ __sanitizer_syscall_post_impl_sendto(res, (long long)(s), (long long)(buf), \
+ (long long)(len), (long long)(flags), \
+ (long long)(to), (long long)(tolen))
+#define __sanitizer_syscall_pre_shutdown(s, how) \
+ __sanitizer_syscall_pre_impl_shutdown((long long)(s), (long long)(how))
+#define __sanitizer_syscall_post_shutdown(res, s, how) \
+ __sanitizer_syscall_post_impl_shutdown(res, (long long)(s), (long long)(how))
+#define __sanitizer_syscall_pre_socketpair(domain, type, protocol, rsv) \
+ __sanitizer_syscall_pre_impl_socketpair( \
+ (long long)(domain), (long long)(type), (long long)(protocol), \
+ (long long)(rsv))
+#define __sanitizer_syscall_post_socketpair(res, domain, type, protocol, rsv) \
+ __sanitizer_syscall_post_impl_socketpair( \
+ res, (long long)(domain), (long long)(type), (long long)(protocol), \
+ (long long)(rsv))
+#define __sanitizer_syscall_pre_mkdir(path, mode) \
+ __sanitizer_syscall_pre_impl_mkdir((long long)(path), (long long)(mode))
+#define __sanitizer_syscall_post_mkdir(res, path, mode) \
+ __sanitizer_syscall_post_impl_mkdir(res, (long long)(path), (long long)(mode))
+#define __sanitizer_syscall_pre_rmdir(path) \
+ __sanitizer_syscall_pre_impl_rmdir((long long)(path))
+#define __sanitizer_syscall_post_rmdir(res, path) \
+ __sanitizer_syscall_post_impl_rmdir(res, (long long)(path))
+#define __sanitizer_syscall_pre_compat_50_utimes(path, tptr) \
+ __sanitizer_syscall_pre_impl_compat_50_utimes((long long)(path), \
+ (long long)(tptr))
+#define __sanitizer_syscall_post_compat_50_utimes(res, path, tptr) \
+ __sanitizer_syscall_post_impl_compat_50_utimes(res, (long long)(path), \
+ (long long)(tptr))
+/* syscall 139 has been skipped */
+#define __sanitizer_syscall_pre_compat_50_adjtime(delta, olddelta) \
+ __sanitizer_syscall_pre_impl_compat_50_adjtime((long long)(delta), \
+ (long long)(olddelta))
+#define __sanitizer_syscall_post_compat_50_adjtime(res, delta, olddelta) \
+ __sanitizer_syscall_post_impl_compat_50_adjtime(res, (long long)(delta), \
+ (long long)(olddelta))
+#define __sanitizer_syscall_pre_compat_43_ogetpeername(fdes, asa, alen) \
+ __sanitizer_syscall_pre_impl_compat_43_ogetpeername( \
+ (long long)(fdes), (long long)(asa), (long long)(alen))
+#define __sanitizer_syscall_post_compat_43_ogetpeername(res, fdes, asa, alen) \
+ __sanitizer_syscall_post_impl_compat_43_ogetpeername( \
+ res, (long long)(fdes), (long long)(asa), (long long)(alen))
+#define __sanitizer_syscall_pre_compat_43_ogethostid() \
+ __sanitizer_syscall_pre_impl_compat_43_ogethostid()
+#define __sanitizer_syscall_post_compat_43_ogethostid(res) \
+ __sanitizer_syscall_post_impl_compat_43_ogethostid(res)
+#define __sanitizer_syscall_pre_compat_43_osethostid(hostid) \
+ __sanitizer_syscall_pre_impl_compat_43_osethostid((long long)(hostid))
+#define __sanitizer_syscall_post_compat_43_osethostid(res, hostid) \
+ __sanitizer_syscall_post_impl_compat_43_osethostid(res, (long long)(hostid))
+#define __sanitizer_syscall_pre_compat_43_ogetrlimit(which, rlp) \
+ __sanitizer_syscall_pre_impl_compat_43_ogetrlimit((long long)(which), \
+ (long long)(rlp))
+#define __sanitizer_syscall_post_compat_43_ogetrlimit(res, which, rlp) \
+ __sanitizer_syscall_post_impl_compat_43_ogetrlimit(res, (long long)(which), \
+ (long long)(rlp))
+#define __sanitizer_syscall_pre_compat_43_osetrlimit(which, rlp) \
+ __sanitizer_syscall_pre_impl_compat_43_osetrlimit((long long)(which), \
+ (long long)(rlp))
+#define __sanitizer_syscall_post_compat_43_osetrlimit(res, which, rlp) \
+ __sanitizer_syscall_post_impl_compat_43_osetrlimit(res, (long long)(which), \
+ (long long)(rlp))
+#define __sanitizer_syscall_pre_compat_43_okillpg(pgid, signum) \
+ __sanitizer_syscall_pre_impl_compat_43_okillpg((long long)(pgid), \
+ (long long)(signum))
+#define __sanitizer_syscall_post_compat_43_okillpg(res, pgid, signum) \
+ __sanitizer_syscall_post_impl_compat_43_okillpg(res, (long long)(pgid), \
+ (long long)(signum))
+#define __sanitizer_syscall_pre_setsid() __sanitizer_syscall_pre_impl_setsid()
+#define __sanitizer_syscall_post_setsid(res) \
+ __sanitizer_syscall_post_impl_setsid(res)
+#define __sanitizer_syscall_pre_compat_50_quotactl(path, cmd, uid, arg) \
+ __sanitizer_syscall_pre_impl_compat_50_quotactl( \
+ (long long)(path), (long long)(cmd), (long long)(uid), (long long)(arg))
+#define __sanitizer_syscall_post_compat_50_quotactl(res, path, cmd, uid, arg) \
+ __sanitizer_syscall_post_impl_compat_50_quotactl( \
+ res, (long long)(path), (long long)(cmd), (long long)(uid), \
+ (long long)(arg))
+#define __sanitizer_syscall_pre_compat_43_oquota() \
+ __sanitizer_syscall_pre_impl_compat_43_oquota()
+#define __sanitizer_syscall_post_compat_43_oquota(res) \
+ __sanitizer_syscall_post_impl_compat_43_oquota(res)
+#define __sanitizer_syscall_pre_compat_43_ogetsockname(fdec, asa, alen) \
+ __sanitizer_syscall_pre_impl_compat_43_ogetsockname( \
+ (long long)(fdec), (long long)(asa), (long long)(alen))
+#define __sanitizer_syscall_post_compat_43_ogetsockname(res, fdec, asa, alen) \
+ __sanitizer_syscall_post_impl_compat_43_ogetsockname( \
+ res, (long long)(fdec), (long long)(asa), (long long)(alen))
+/* syscall 151 has been skipped */
+/* syscall 152 has been skipped */
+/* syscall 153 has been skipped */
+/* syscall 154 has been skipped */
+#define __sanitizer_syscall_pre_nfssvc(flag, argp) \
+ __sanitizer_syscall_pre_impl_nfssvc((long long)(flag), (long long)(argp))
+#define __sanitizer_syscall_post_nfssvc(res, flag, argp) \
+ __sanitizer_syscall_post_impl_nfssvc(res, (long long)(flag), \
+ (long long)(argp))
+#define __sanitizer_syscall_pre_compat_43_ogetdirentries(fd, buf, count, \
+ basep) \
+ __sanitizer_syscall_pre_impl_compat_43_ogetdirentries( \
+ (long long)(fd), (long long)(buf), (long long)(count), \
+ (long long)(basep))
+#define __sanitizer_syscall_post_compat_43_ogetdirentries(res, fd, buf, count, \
+ basep) \
+ __sanitizer_syscall_post_impl_compat_43_ogetdirentries( \
+ res, (long long)(fd), (long long)(buf), (long long)(count), \
+ (long long)(basep))
+#define __sanitizer_syscall_pre_compat_20_statfs(path, buf) \
+ __sanitizer_syscall_pre_impl_compat_20_statfs((long long)(path), \
+ (long long)(buf))
+#define __sanitizer_syscall_post_compat_20_statfs(res, path, buf) \
+ __sanitizer_syscall_post_impl_compat_20_statfs(res, (long long)(path), \
+ (long long)(buf))
+#define __sanitizer_syscall_pre_compat_20_fstatfs(fd, buf) \
+ __sanitizer_syscall_pre_impl_compat_20_fstatfs((long long)(fd), \
+ (long long)(buf))
+#define __sanitizer_syscall_post_compat_20_fstatfs(res, fd, buf) \
+ __sanitizer_syscall_post_impl_compat_20_fstatfs(res, (long long)(fd), \
+ (long long)(buf))
+/* syscall 159 has been skipped */
+/* syscall 160 has been skipped */
+#define __sanitizer_syscall_pre_compat_30_getfh(fname, fhp) \
+ __sanitizer_syscall_pre_impl_compat_30_getfh((long long)(fname), \
+ (long long)(fhp))
+#define __sanitizer_syscall_post_compat_30_getfh(res, fname, fhp) \
+ __sanitizer_syscall_post_impl_compat_30_getfh(res, (long long)(fname), \
+ (long long)(fhp))
+#define __sanitizer_syscall_pre_compat_09_ogetdomainname(domainname, len) \
+ __sanitizer_syscall_pre_impl_compat_09_ogetdomainname( \
+ (long long)(domainname), (long long)(len))
+#define __sanitizer_syscall_post_compat_09_ogetdomainname(res, domainname, \
+ len) \
+ __sanitizer_syscall_post_impl_compat_09_ogetdomainname( \
+ res, (long long)(domainname), (long long)(len))
+#define __sanitizer_syscall_pre_compat_09_osetdomainname(domainname, len) \
+ __sanitizer_syscall_pre_impl_compat_09_osetdomainname( \
+ (long long)(domainname), (long long)(len))
+#define __sanitizer_syscall_post_compat_09_osetdomainname(res, domainname, \
+ len) \
+ __sanitizer_syscall_post_impl_compat_09_osetdomainname( \
+ res, (long long)(domainname), (long long)(len))
+#define __sanitizer_syscall_pre_compat_09_ouname(name) \
+ __sanitizer_syscall_pre_impl_compat_09_ouname((long long)(name))
+#define __sanitizer_syscall_post_compat_09_ouname(res, name) \
+ __sanitizer_syscall_post_impl_compat_09_ouname(res, (long long)(name))
+#define __sanitizer_syscall_pre_sysarch(op, parms) \
+ __sanitizer_syscall_pre_impl_sysarch((long long)(op), (long long)(parms))
+#define __sanitizer_syscall_post_sysarch(res, op, parms) \
+ __sanitizer_syscall_post_impl_sysarch(res, (long long)(op), \
+ (long long)(parms))
+/* syscall 166 has been skipped */
+/* syscall 167 has been skipped */
+/* syscall 168 has been skipped */
+#if !defined(_LP64)
+#define __sanitizer_syscall_pre_compat_10_osemsys(which, a2, a3, a4, a5) \
+ __sanitizer_syscall_pre_impl_compat_10_osemsys( \
+ (long long)(which), (long long)(a2), (long long)(a3), (long long)(a4), \
+ (long long)(a5))
+#define __sanitizer_syscall_post_compat_10_osemsys(res, which, a2, a3, a4, a5) \
+ __sanitizer_syscall_post_impl_compat_10_osemsys( \
+ res, (long long)(which), (long long)(a2), (long long)(a3), \
+ (long long)(a4), (long long)(a5))
+#else
+/* syscall 169 has been skipped */
+#endif
+#if !defined(_LP64)
+#define __sanitizer_syscall_pre_compat_10_omsgsys(which, a2, a3, a4, a5, a6) \
+ __sanitizer_syscall_pre_impl_compat_10_omsgsys( \
+ (long long)(which), (long long)(a2), (long long)(a3), (long long)(a4), \
+ (long long)(a5), (long long)(a6))
+#define __sanitizer_syscall_post_compat_10_omsgsys(res, which, a2, a3, a4, a5, \
+ a6) \
+ __sanitizer_syscall_post_impl_compat_10_omsgsys( \
+ res, (long long)(which), (long long)(a2), (long long)(a3), \
+ (long long)(a4), (long long)(a5), (long long)(a6))
+#else
+/* syscall 170 has been skipped */
+#endif
+#if !defined(_LP64)
+#define __sanitizer_syscall_pre_compat_10_oshmsys(which, a2, a3, a4) \
+ __sanitizer_syscall_pre_impl_compat_10_oshmsys( \
+ (long long)(which), (long long)(a2), (long long)(a3), (long long)(a4))
+#define __sanitizer_syscall_post_compat_10_oshmsys(res, which, a2, a3, a4) \
+ __sanitizer_syscall_post_impl_compat_10_oshmsys( \
+ res, (long long)(which), (long long)(a2), (long long)(a3), \
+ (long long)(a4))
+#else
+/* syscall 171 has been skipped */
+#endif
+/* syscall 172 has been skipped */
+#define __sanitizer_syscall_pre_pread(fd, buf, nbyte, PAD, offset) \
+ __sanitizer_syscall_pre_impl_pread((long long)(fd), (long long)(buf), \
+ (long long)(nbyte), (long long)(PAD), \
+ (long long)(offset))
+#define __sanitizer_syscall_post_pread(res, fd, buf, nbyte, PAD, offset) \
+ __sanitizer_syscall_post_impl_pread(res, (long long)(fd), (long long)(buf), \
+ (long long)(nbyte), (long long)(PAD), \
+ (long long)(offset))
+#define __sanitizer_syscall_pre_pwrite(fd, buf, nbyte, PAD, offset) \
+ __sanitizer_syscall_pre_impl_pwrite((long long)(fd), (long long)(buf), \
+ (long long)(nbyte), (long long)(PAD), \
+ (long long)(offset))
+#define __sanitizer_syscall_post_pwrite(res, fd, buf, nbyte, PAD, offset) \
+ __sanitizer_syscall_post_impl_pwrite(res, (long long)(fd), (long long)(buf), \
+ (long long)(nbyte), (long long)(PAD), \
+ (long long)(offset))
+#define __sanitizer_syscall_pre_compat_30_ntp_gettime(ntvp) \
+ __sanitizer_syscall_pre_impl_compat_30_ntp_gettime((long long)(ntvp))
+#define __sanitizer_syscall_post_compat_30_ntp_gettime(res, ntvp) \
+ __sanitizer_syscall_post_impl_compat_30_ntp_gettime(res, (long long)(ntvp))
+#if defined(NTP) || !defined(_KERNEL_OPT)
+#define __sanitizer_syscall_pre_ntp_adjtime(tp) \
+ __sanitizer_syscall_pre_impl_ntp_adjtime((long long)(tp))
+#define __sanitizer_syscall_post_ntp_adjtime(res, tp) \
+ __sanitizer_syscall_post_impl_ntp_adjtime(res, (long long)(tp))
+#else
+/* syscall 176 has been skipped */
+#endif
+/* syscall 177 has been skipped */
+/* syscall 178 has been skipped */
+/* syscall 179 has been skipped */
+/* syscall 180 has been skipped */
+#define __sanitizer_syscall_pre_setgid(gid) \
+ __sanitizer_syscall_pre_impl_setgid((long long)(gid))
+#define __sanitizer_syscall_post_setgid(res, gid) \
+ __sanitizer_syscall_post_impl_setgid(res, (long long)(gid))
+#define __sanitizer_syscall_pre_setegid(egid) \
+ __sanitizer_syscall_pre_impl_setegid((long long)(egid))
+#define __sanitizer_syscall_post_setegid(res, egid) \
+ __sanitizer_syscall_post_impl_setegid(res, (long long)(egid))
+#define __sanitizer_syscall_pre_seteuid(euid) \
+ __sanitizer_syscall_pre_impl_seteuid((long long)(euid))
+#define __sanitizer_syscall_post_seteuid(res, euid) \
+ __sanitizer_syscall_post_impl_seteuid(res, (long long)(euid))
+#define __sanitizer_syscall_pre_lfs_bmapv(fsidp, blkiov, blkcnt) \
+ __sanitizer_syscall_pre_impl_lfs_bmapv( \
+ (long long)(fsidp), (long long)(blkiov), (long long)(blkcnt))
+#define __sanitizer_syscall_post_lfs_bmapv(res, fsidp, blkiov, blkcnt) \
+ __sanitizer_syscall_post_impl_lfs_bmapv( \
+ res, (long long)(fsidp), (long long)(blkiov), (long long)(blkcnt))
+#define __sanitizer_syscall_pre_lfs_markv(fsidp, blkiov, blkcnt) \
+ __sanitizer_syscall_pre_impl_lfs_markv( \
+ (long long)(fsidp), (long long)(blkiov), (long long)(blkcnt))
+#define __sanitizer_syscall_post_lfs_markv(res, fsidp, blkiov, blkcnt) \
+ __sanitizer_syscall_post_impl_lfs_markv( \
+ res, (long long)(fsidp), (long long)(blkiov), (long long)(blkcnt))
+#define __sanitizer_syscall_pre_lfs_segclean(fsidp, segment) \
+ __sanitizer_syscall_pre_impl_lfs_segclean((long long)(fsidp), \
+ (long long)(segment))
+#define __sanitizer_syscall_post_lfs_segclean(res, fsidp, segment) \
+ __sanitizer_syscall_post_impl_lfs_segclean(res, (long long)(fsidp), \
+ (long long)(segment))
+#define __sanitizer_syscall_pre_compat_50_lfs_segwait(fsidp, tv) \
+ __sanitizer_syscall_pre_impl_compat_50_lfs_segwait((long long)(fsidp), \
+ (long long)(tv))
+#define __sanitizer_syscall_post_compat_50_lfs_segwait(res, fsidp, tv) \
+ __sanitizer_syscall_post_impl_compat_50_lfs_segwait(res, (long long)(fsidp), \
+ (long long)(tv))
+#define __sanitizer_syscall_pre_compat_12_stat12(path, ub) \
+ __sanitizer_syscall_pre_impl_compat_12_stat12((long long)(path), \
+ (long long)(ub))
+#define __sanitizer_syscall_post_compat_12_stat12(res, path, ub) \
+ __sanitizer_syscall_post_impl_compat_12_stat12(res, (long long)(path), \
+ (long long)(ub))
+#define __sanitizer_syscall_pre_compat_12_fstat12(fd, sb) \
+ __sanitizer_syscall_pre_impl_compat_12_fstat12((long long)(fd), \
+ (long long)(sb))
+#define __sanitizer_syscall_post_compat_12_fstat12(res, fd, sb) \
+ __sanitizer_syscall_post_impl_compat_12_fstat12(res, (long long)(fd), \
+ (long long)(sb))
+#define __sanitizer_syscall_pre_compat_12_lstat12(path, ub) \
+ __sanitizer_syscall_pre_impl_compat_12_lstat12((long long)(path), \
+ (long long)(ub))
+#define __sanitizer_syscall_post_compat_12_lstat12(res, path, ub) \
+ __sanitizer_syscall_post_impl_compat_12_lstat12(res, (long long)(path), \
+ (long long)(ub))
+#define __sanitizer_syscall_pre_pathconf(path, name) \
+ __sanitizer_syscall_pre_impl_pathconf((long long)(path), (long long)(name))
+#define __sanitizer_syscall_post_pathconf(res, path, name) \
+ __sanitizer_syscall_post_impl_pathconf(res, (long long)(path), \
+ (long long)(name))
+#define __sanitizer_syscall_pre_fpathconf(fd, name) \
+ __sanitizer_syscall_pre_impl_fpathconf((long long)(fd), (long long)(name))
+#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_getrlimit(which, rlp) \
+ __sanitizer_syscall_pre_impl_getrlimit((long long)(which), (long long)(rlp))
+#define __sanitizer_syscall_post_getrlimit(res, which, rlp) \
+ __sanitizer_syscall_post_impl_getrlimit(res, (long long)(which), \
+ (long long)(rlp))
+#define __sanitizer_syscall_pre_setrlimit(which, rlp) \
+ __sanitizer_syscall_pre_impl_setrlimit((long long)(which), (long long)(rlp))
+#define __sanitizer_syscall_post_setrlimit(res, which, rlp) \
+ __sanitizer_syscall_post_impl_setrlimit(res, (long long)(which), \
+ (long long)(rlp))
+#define __sanitizer_syscall_pre_compat_12_getdirentries(fd, buf, count, basep) \
+ __sanitizer_syscall_pre_impl_compat_12_getdirentries( \
+ (long long)(fd), (long long)(buf), (long long)(count), \
+ (long long)(basep))
+#define __sanitizer_syscall_post_compat_12_getdirentries(res, fd, buf, count, \
+ basep) \
+ __sanitizer_syscall_post_impl_compat_12_getdirentries( \
+ res, (long long)(fd), (long long)(buf), (long long)(count), \
+ (long long)(basep))
+#define __sanitizer_syscall_pre_mmap(addr, len, prot, flags, fd, PAD, pos) \
+ __sanitizer_syscall_pre_impl_mmap( \
+ (long long)(addr), (long long)(len), (long long)(prot), \
+ (long long)(flags), (long long)(fd), (long long)(PAD), (long long)(pos))
+#define __sanitizer_syscall_post_mmap(res, addr, len, prot, flags, fd, PAD, \
+ pos) \
+ __sanitizer_syscall_post_impl_mmap( \
+ res, (long long)(addr), (long long)(len), (long long)(prot), \
+ (long long)(flags), (long long)(fd), (long long)(PAD), (long long)(pos))
+#define __sanitizer_syscall_pre___syscall(code, arg0, arg1, arg2, arg3, arg4, \
+ arg5, arg6, arg7) \
+ __sanitizer_syscall_pre_impl___syscall( \
+ (long long)(code), (long long)(arg0), (long long)(arg1), \
+ (long long)(arg2), (long long)(arg3), (long long)(arg4), \
+ (long long)(arg5), (long long)(arg6), (long long)(arg7))
+#define __sanitizer_syscall_post___syscall(res, code, arg0, arg1, arg2, arg3, \
+ arg4, arg5, arg6, arg7) \
+ __sanitizer_syscall_post_impl___syscall( \
+ res, (long long)(code), (long long)(arg0), (long long)(arg1), \
+ (long long)(arg2), (long long)(arg3), (long long)(arg4), \
+ (long long)(arg5), (long long)(arg6), (long long)(arg7))
+#define __sanitizer_syscall_pre_lseek(fd, PAD, offset, whence) \
+ __sanitizer_syscall_pre_impl_lseek((long long)(fd), (long long)(PAD), \
+ (long long)(offset), (long long)(whence))
+#define __sanitizer_syscall_post_lseek(res, fd, PAD, offset, whence) \
+ __sanitizer_syscall_post_impl_lseek(res, (long long)(fd), (long long)(PAD), \
+ (long long)(offset), \
+ (long long)(whence))
+#define __sanitizer_syscall_pre_truncate(path, PAD, length) \
+ __sanitizer_syscall_pre_impl_truncate((long long)(path), (long long)(PAD), \
+ (long long)(length))
+#define __sanitizer_syscall_post_truncate(res, path, PAD, length) \
+ __sanitizer_syscall_post_impl_truncate( \
+ res, (long long)(path), (long long)(PAD), (long long)(length))
+#define __sanitizer_syscall_pre_ftruncate(fd, PAD, length) \
+ __sanitizer_syscall_pre_impl_ftruncate((long long)(fd), (long long)(PAD), \
+ (long long)(length))
+#define __sanitizer_syscall_post_ftruncate(res, fd, PAD, length) \
+ __sanitizer_syscall_post_impl_ftruncate( \
+ res, (long long)(fd), (long long)(PAD), (long long)(length))
+#define __sanitizer_syscall_pre___sysctl(name, namelen, oldv, oldlenp, newv, \
+ newlen) \
+ __sanitizer_syscall_pre_impl___sysctl( \
+ (long long)(name), (long long)(namelen), (long long)(oldv), \
+ (long long)(oldlenp), (long long)(newv), (long long)(newlen))
+#define __sanitizer_syscall_post___sysctl(res, name, namelen, oldv, oldlenp, \
+ newv, newlen) \
+ __sanitizer_syscall_post_impl___sysctl( \
+ res, (long long)(name), (long long)(namelen), (long long)(oldv), \
+ (long long)(oldlenp), (long long)(newv), (long long)(newlen))
+#define __sanitizer_syscall_pre_mlock(addr, len) \
+ __sanitizer_syscall_pre_impl_mlock((long long)(addr), (long long)(len))
+#define __sanitizer_syscall_post_mlock(res, addr, len) \
+ __sanitizer_syscall_post_impl_mlock(res, (long long)(addr), (long long)(len))
+#define __sanitizer_syscall_pre_munlock(addr, len) \
+ __sanitizer_syscall_pre_impl_munlock((long long)(addr), (long long)(len))
+#define __sanitizer_syscall_post_munlock(res, addr, len) \
+ __sanitizer_syscall_post_impl_munlock(res, (long long)(addr), \
+ (long long)(len))
+#define __sanitizer_syscall_pre_undelete(path) \
+ __sanitizer_syscall_pre_impl_undelete((long long)(path))
+#define __sanitizer_syscall_post_undelete(res, path) \
+ __sanitizer_syscall_post_impl_undelete(res, (long long)(path))
+#define __sanitizer_syscall_pre_compat_50_futimes(fd, tptr) \
+ __sanitizer_syscall_pre_impl_compat_50_futimes((long long)(fd), \
+ (long long)(tptr))
+#define __sanitizer_syscall_post_compat_50_futimes(res, fd, tptr) \
+ __sanitizer_syscall_post_impl_compat_50_futimes(res, (long long)(fd), \
+ (long long)(tptr))
+#define __sanitizer_syscall_pre_getpgid(pid) \
+ __sanitizer_syscall_pre_impl_getpgid((long long)(pid))
+#define __sanitizer_syscall_post_getpgid(res, pid) \
+ __sanitizer_syscall_post_impl_getpgid(res, (long long)(pid))
+#define __sanitizer_syscall_pre_reboot(opt, bootstr) \
+ __sanitizer_syscall_pre_impl_reboot((long long)(opt), (long long)(bootstr))
+#define __sanitizer_syscall_post_reboot(res, opt, bootstr) \
+ __sanitizer_syscall_post_impl_reboot(res, (long long)(opt), \
+ (long long)(bootstr))
+#define __sanitizer_syscall_pre_poll(fds, nfds, timeout) \
+ __sanitizer_syscall_pre_impl_poll((long long)(fds), (long long)(nfds), \
+ (long long)(timeout))
+#define __sanitizer_syscall_post_poll(res, fds, nfds, timeout) \
+ __sanitizer_syscall_post_impl_poll(res, (long long)(fds), (long long)(nfds), \
+ (long long)(timeout))
+#define __sanitizer_syscall_pre_afssys(id, a1, a2, a3, a4, a5, a6) \
+ __sanitizer_syscall_pre_impl_afssys( \
+ (long long)(id), (long long)(a1), (long long)(a2), (long long)(a3), \
+ (long long)(a4), (long long)(a5), (long long)(a6))
+#define __sanitizer_syscall_post_afssys(res, id, a1, a2, a3, a4, a5, a6) \
+ __sanitizer_syscall_post_impl_afssys( \
+ res, (long long)(id), (long long)(a1), (long long)(a2), (long long)(a3), \
+ (long long)(a4), (long long)(a5), (long long)(a6))
+/* syscall 211 has been skipped */
+/* syscall 212 has been skipped */
+/* syscall 213 has been skipped */
+/* syscall 214 has been skipped */
+/* syscall 215 has been skipped */
+/* syscall 216 has been skipped */
+/* syscall 217 has been skipped */
+/* syscall 218 has been skipped */
+/* syscall 219 has been skipped */
+#define __sanitizer_syscall_pre_compat_14___semctl(semid, semnum, cmd, arg) \
+ __sanitizer_syscall_pre_impl_compat_14___semctl( \
+ (long long)(semid), (long long)(semnum), (long long)(cmd), \
+ (long long)(arg))
+#define __sanitizer_syscall_post_compat_14___semctl(res, semid, semnum, cmd, \
+ arg) \
+ __sanitizer_syscall_post_impl_compat_14___semctl( \
+ res, (long long)(semid), (long long)(semnum), (long long)(cmd), \
+ (long long)(arg))
+#define __sanitizer_syscall_pre_semget(key, nsems, semflg) \
+ __sanitizer_syscall_pre_impl_semget((long long)(key), (long long)(nsems), \
+ (long long)(semflg))
+#define __sanitizer_syscall_post_semget(res, key, nsems, semflg) \
+ __sanitizer_syscall_post_impl_semget( \
+ res, (long long)(key), (long long)(nsems), (long long)(semflg))
+#define __sanitizer_syscall_pre_semop(semid, sops, nsops) \
+ __sanitizer_syscall_pre_impl_semop((long long)(semid), (long long)(sops), \
+ (long long)(nsops))
+#define __sanitizer_syscall_post_semop(res, semid, sops, nsops) \
+ __sanitizer_syscall_post_impl_semop(res, (long long)(semid), \
+ (long long)(sops), (long long)(nsops))
+#define __sanitizer_syscall_pre_semconfig(flag) \
+ __sanitizer_syscall_pre_impl_semconfig((long long)(flag))
+#define __sanitizer_syscall_post_semconfig(res, flag) \
+ __sanitizer_syscall_post_impl_semconfig(res, (long long)(flag))
+#define __sanitizer_syscall_pre_compat_14_msgctl(msqid, cmd, buf) \
+ __sanitizer_syscall_pre_impl_compat_14_msgctl( \
+ (long long)(msqid), (long long)(cmd), (long long)(buf))
+#define __sanitizer_syscall_post_compat_14_msgctl(res, msqid, cmd, buf) \
+ __sanitizer_syscall_post_impl_compat_14_msgctl( \
+ res, (long long)(msqid), (long long)(cmd), (long long)(buf))
+#define __sanitizer_syscall_pre_msgget(key, msgflg) \
+ __sanitizer_syscall_pre_impl_msgget((long long)(key), (long long)(msgflg))
+#define __sanitizer_syscall_post_msgget(res, key, msgflg) \
+ __sanitizer_syscall_post_impl_msgget(res, (long long)(key), \
+ (long long)(msgflg))
+#define __sanitizer_syscall_pre_msgsnd(msqid, msgp, msgsz, msgflg) \
+ __sanitizer_syscall_pre_impl_msgsnd((long long)(msqid), (long long)(msgp), \
+ (long long)(msgsz), (long long)(msgflg))
+#define __sanitizer_syscall_post_msgsnd(res, msqid, msgp, msgsz, msgflg) \
+ __sanitizer_syscall_post_impl_msgsnd(res, (long long)(msqid), \
+ (long long)(msgp), (long long)(msgsz), \
+ (long long)(msgflg))
+#define __sanitizer_syscall_pre_msgrcv(msqid, msgp, msgsz, msgtyp, msgflg) \
+ __sanitizer_syscall_pre_impl_msgrcv((long long)(msqid), (long long)(msgp), \
+ (long long)(msgsz), (long long)(msgtyp), \
+ (long long)(msgflg))
+#define __sanitizer_syscall_post_msgrcv(res, msqid, msgp, msgsz, msgtyp, \
+ msgflg) \
+ __sanitizer_syscall_post_impl_msgrcv( \
+ res, (long long)(msqid), (long long)(msgp), (long long)(msgsz), \
+ (long long)(msgtyp), (long long)(msgflg))
+#define __sanitizer_syscall_pre_shmat(shmid, shmaddr, shmflg) \
+ __sanitizer_syscall_pre_impl_shmat((long long)(shmid), (long long)(shmaddr), \
+ (long long)(shmflg))
+#define __sanitizer_syscall_post_shmat(res, shmid, shmaddr, shmflg) \
+ __sanitizer_syscall_post_impl_shmat( \
+ res, (long long)(shmid), (long long)(shmaddr), (long long)(shmflg))
+#define __sanitizer_syscall_pre_compat_14_shmctl(shmid, cmd, buf) \
+ __sanitizer_syscall_pre_impl_compat_14_shmctl( \
+ (long long)(shmid), (long long)(cmd), (long long)(buf))
+#define __sanitizer_syscall_post_compat_14_shmctl(res, shmid, cmd, buf) \
+ __sanitizer_syscall_post_impl_compat_14_shmctl( \
+ res, (long long)(shmid), (long long)(cmd), (long long)(buf))
+#define __sanitizer_syscall_pre_shmdt(shmaddr) \
+ __sanitizer_syscall_pre_impl_shmdt((long long)(shmaddr))
+#define __sanitizer_syscall_post_shmdt(res, shmaddr) \
+ __sanitizer_syscall_post_impl_shmdt(res, (long long)(shmaddr))
+#define __sanitizer_syscall_pre_shmget(key, size, shmflg) \
+ __sanitizer_syscall_pre_impl_shmget((long long)(key), (long long)(size), \
+ (long long)(shmflg))
+#define __sanitizer_syscall_post_shmget(res, key, size, shmflg) \
+ __sanitizer_syscall_post_impl_shmget(res, (long long)(key), \
+ (long long)(size), (long long)(shmflg))
+#define __sanitizer_syscall_pre_compat_50_clock_gettime(clock_id, tp) \
+ __sanitizer_syscall_pre_impl_compat_50_clock_gettime((long long)(clock_id), \
+ (long long)(tp))
+#define __sanitizer_syscall_post_compat_50_clock_gettime(res, clock_id, tp) \
+ __sanitizer_syscall_post_impl_compat_50_clock_gettime( \
+ res, (long long)(clock_id), (long long)(tp))
+#define __sanitizer_syscall_pre_compat_50_clock_settime(clock_id, tp) \
+ __sanitizer_syscall_pre_impl_compat_50_clock_settime((long long)(clock_id), \
+ (long long)(tp))
+#define __sanitizer_syscall_post_compat_50_clock_settime(res, clock_id, tp) \
+ __sanitizer_syscall_post_impl_compat_50_clock_settime( \
+ res, (long long)(clock_id), (long long)(tp))
+#define __sanitizer_syscall_pre_compat_50_clock_getres(clock_id, tp) \
+ __sanitizer_syscall_pre_impl_compat_50_clock_getres((long long)(clock_id), \
+ (long long)(tp))
+#define __sanitizer_syscall_post_compat_50_clock_getres(res, clock_id, tp) \
+ __sanitizer_syscall_post_impl_compat_50_clock_getres( \
+ res, (long long)(clock_id), (long long)(tp))
+#define __sanitizer_syscall_pre_timer_create(clock_id, evp, timerid) \
+ __sanitizer_syscall_pre_impl_timer_create( \
+ (long long)(clock_id), (long long)(evp), (long long)(timerid))
+#define __sanitizer_syscall_post_timer_create(res, clock_id, evp, timerid) \
+ __sanitizer_syscall_post_impl_timer_create( \
+ res, (long long)(clock_id), (long long)(evp), (long long)(timerid))
+#define __sanitizer_syscall_pre_timer_delete(timerid) \
+ __sanitizer_syscall_pre_impl_timer_delete((long long)(timerid))
+#define __sanitizer_syscall_post_timer_delete(res, timerid) \
+ __sanitizer_syscall_post_impl_timer_delete(res, (long long)(timerid))
+#define __sanitizer_syscall_pre_compat_50_timer_settime(timerid, flags, value, \
+ ovalue) \
+ __sanitizer_syscall_pre_impl_compat_50_timer_settime( \
+ (long long)(timerid), (long long)(flags), (long long)(value), \
+ (long long)(ovalue))
+#define __sanitizer_syscall_post_compat_50_timer_settime(res, timerid, flags, \
+ value, ovalue) \
+ __sanitizer_syscall_post_impl_compat_50_timer_settime( \
+ res, (long long)(timerid), (long long)(flags), (long long)(value), \
+ (long long)(ovalue))
+#define __sanitizer_syscall_pre_compat_50_timer_gettime(timerid, value) \
+ __sanitizer_syscall_pre_impl_compat_50_timer_gettime((long long)(timerid), \
+ (long long)(value))
+#define __sanitizer_syscall_post_compat_50_timer_gettime(res, timerid, value) \
+ __sanitizer_syscall_post_impl_compat_50_timer_gettime( \
+ res, (long long)(timerid), (long long)(value))
+#define __sanitizer_syscall_pre_timer_getoverrun(timerid) \
+ __sanitizer_syscall_pre_impl_timer_getoverrun((long long)(timerid))
+#define __sanitizer_syscall_post_timer_getoverrun(res, timerid) \
+ __sanitizer_syscall_post_impl_timer_getoverrun(res, (long long)(timerid))
+#define __sanitizer_syscall_pre_compat_50_nanosleep(rqtp, rmtp) \
+ __sanitizer_syscall_pre_impl_compat_50_nanosleep((long long)(rqtp), \
+ (long long)(rmtp))
+#define __sanitizer_syscall_post_compat_50_nanosleep(res, rqtp, rmtp) \
+ __sanitizer_syscall_post_impl_compat_50_nanosleep(res, (long long)(rqtp), \
+ (long long)(rmtp))
+#define __sanitizer_syscall_pre_fdatasync(fd) \
+ __sanitizer_syscall_pre_impl_fdatasync((long long)(fd))
+#define __sanitizer_syscall_post_fdatasync(res, fd) \
+ __sanitizer_syscall_post_impl_fdatasync(res, (long long)(fd))
+#define __sanitizer_syscall_pre_mlockall(flags) \
+ __sanitizer_syscall_pre_impl_mlockall((long long)(flags))
+#define __sanitizer_syscall_post_mlockall(res, flags) \
+ __sanitizer_syscall_post_impl_mlockall(res, (long long)(flags))
+#define __sanitizer_syscall_pre_munlockall() \
+ __sanitizer_syscall_pre_impl_munlockall()
+#define __sanitizer_syscall_post_munlockall(res) \
+ __sanitizer_syscall_post_impl_munlockall(res)
+#define __sanitizer_syscall_pre_compat_50___sigtimedwait(set, info, timeout) \
+ __sanitizer_syscall_pre_impl_compat_50___sigtimedwait( \
+ (long long)(set), (long long)(info), (long long)(timeout))
+#define __sanitizer_syscall_post_compat_50___sigtimedwait(res, set, info, \
+ timeout) \
+ __sanitizer_syscall_post_impl_compat_50___sigtimedwait( \
+ res, (long long)(set), (long long)(info), (long long)(timeout))
+#define __sanitizer_syscall_pre_sigqueueinfo(pid, info) \
+ __sanitizer_syscall_pre_impl_sigqueueinfo((long long)(pid), (long long)(info))
+#define __sanitizer_syscall_post_sigqueueinfo(res, pid, info) \
+ __sanitizer_syscall_post_impl_sigqueueinfo(res, (long long)(pid), \
+ (long long)(info))
+#define __sanitizer_syscall_pre_modctl(cmd, arg) \
+ __sanitizer_syscall_pre_impl_modctl((long long)(cmd), (long long)(arg))
+#define __sanitizer_syscall_post_modctl(res, cmd, arg) \
+ __sanitizer_syscall_post_impl_modctl(res, (long long)(cmd), (long long)(arg))
+#define __sanitizer_syscall_pre__ksem_init(value, idp) \
+ __sanitizer_syscall_pre_impl__ksem_init((long long)(value), (long long)(idp))
+#define __sanitizer_syscall_post__ksem_init(res, value, idp) \
+ __sanitizer_syscall_post_impl__ksem_init(res, (long long)(value), \
+ (long long)(idp))
+#define __sanitizer_syscall_pre__ksem_open(name, oflag, mode, value, idp) \
+ __sanitizer_syscall_pre_impl__ksem_open( \
+ (long long)(name), (long long)(oflag), (long long)(mode), \
+ (long long)(value), (long long)(idp))
+#define __sanitizer_syscall_post__ksem_open(res, name, oflag, mode, value, \
+ idp) \
+ __sanitizer_syscall_post_impl__ksem_open( \
+ res, (long long)(name), (long long)(oflag), (long long)(mode), \
+ (long long)(value), (long long)(idp))
+#define __sanitizer_syscall_pre__ksem_unlink(name) \
+ __sanitizer_syscall_pre_impl__ksem_unlink((long long)(name))
+#define __sanitizer_syscall_post__ksem_unlink(res, name) \
+ __sanitizer_syscall_post_impl__ksem_unlink(res, (long long)(name))
+#define __sanitizer_syscall_pre__ksem_close(id) \
+ __sanitizer_syscall_pre_impl__ksem_close((long long)(id))
+#define __sanitizer_syscall_post__ksem_close(res, id) \
+ __sanitizer_syscall_post_impl__ksem_close(res, (long long)(id))
+#define __sanitizer_syscall_pre__ksem_post(id) \
+ __sanitizer_syscall_pre_impl__ksem_post((long long)(id))
+#define __sanitizer_syscall_post__ksem_post(res, id) \
+ __sanitizer_syscall_post_impl__ksem_post(res, (long long)(id))
+#define __sanitizer_syscall_pre__ksem_wait(id) \
+ __sanitizer_syscall_pre_impl__ksem_wait((long long)(id))
+#define __sanitizer_syscall_post__ksem_wait(res, id) \
+ __sanitizer_syscall_post_impl__ksem_wait(res, (long long)(id))
+#define __sanitizer_syscall_pre__ksem_trywait(id) \
+ __sanitizer_syscall_pre_impl__ksem_trywait((long long)(id))
+#define __sanitizer_syscall_post__ksem_trywait(res, id) \
+ __sanitizer_syscall_post_impl__ksem_trywait(res, (long long)(id))
+#define __sanitizer_syscall_pre__ksem_getvalue(id, value) \
+ __sanitizer_syscall_pre_impl__ksem_getvalue((long long)(id), \
+ (long long)(value))
+#define __sanitizer_syscall_post__ksem_getvalue(res, id, value) \
+ __sanitizer_syscall_post_impl__ksem_getvalue(res, (long long)(id), \
+ (long long)(value))
+#define __sanitizer_syscall_pre__ksem_destroy(id) \
+ __sanitizer_syscall_pre_impl__ksem_destroy((long long)(id))
+#define __sanitizer_syscall_post__ksem_destroy(res, id) \
+ __sanitizer_syscall_post_impl__ksem_destroy(res, (long long)(id))
+#define __sanitizer_syscall_pre__ksem_timedwait(id, abstime) \
+ __sanitizer_syscall_pre_impl__ksem_timedwait((long long)(id), \
+ (long long)(abstime))
+#define __sanitizer_syscall_post__ksem_timedwait(res, id, abstime) \
+ __sanitizer_syscall_post_impl__ksem_timedwait(res, (long long)(id), \
+ (long long)(abstime))
+#define __sanitizer_syscall_pre_mq_open(name, oflag, mode, attr) \
+ __sanitizer_syscall_pre_impl_mq_open((long long)(name), (long long)(oflag), \
+ (long long)(mode), (long long)(attr))
+#define __sanitizer_syscall_post_mq_open(res, name, oflag, mode, attr) \
+ __sanitizer_syscall_post_impl_mq_open(res, (long long)(name), \
+ (long long)(oflag), (long long)(mode), \
+ (long long)(attr))
+#define __sanitizer_syscall_pre_mq_close(mqdes) \
+ __sanitizer_syscall_pre_impl_mq_close((long long)(mqdes))
+#define __sanitizer_syscall_post_mq_close(res, mqdes) \
+ __sanitizer_syscall_post_impl_mq_close(res, (long long)(mqdes))
+#define __sanitizer_syscall_pre_mq_unlink(name) \
+ __sanitizer_syscall_pre_impl_mq_unlink((long long)(name))
+#define __sanitizer_syscall_post_mq_unlink(res, name) \
+ __sanitizer_syscall_post_impl_mq_unlink(res, (long long)(name))
+#define __sanitizer_syscall_pre_mq_getattr(mqdes, mqstat) \
+ __sanitizer_syscall_pre_impl_mq_getattr((long long)(mqdes), \
+ (long long)(mqstat))
+#define __sanitizer_syscall_post_mq_getattr(res, mqdes, mqstat) \
+ __sanitizer_syscall_post_impl_mq_getattr(res, (long long)(mqdes), \
+ (long long)(mqstat))
+#define __sanitizer_syscall_pre_mq_setattr(mqdes, mqstat, omqstat) \
+ __sanitizer_syscall_pre_impl_mq_setattr( \
+ (long long)(mqdes), (long long)(mqstat), (long long)(omqstat))
+#define __sanitizer_syscall_post_mq_setattr(res, mqdes, mqstat, omqstat) \
+ __sanitizer_syscall_post_impl_mq_setattr( \
+ res, (long long)(mqdes), (long long)(mqstat), (long long)(omqstat))
+#define __sanitizer_syscall_pre_mq_notify(mqdes, notification) \
+ __sanitizer_syscall_pre_impl_mq_notify((long long)(mqdes), \
+ (long long)(notification))
+#define __sanitizer_syscall_post_mq_notify(res, mqdes, notification) \
+ __sanitizer_syscall_post_impl_mq_notify(res, (long long)(mqdes), \
+ (long long)(notification))
+#define __sanitizer_syscall_pre_mq_send(mqdes, msg_ptr, msg_len, msg_prio) \
+ __sanitizer_syscall_pre_impl_mq_send( \
+ (long long)(mqdes), (long long)(msg_ptr), (long long)(msg_len), \
+ (long long)(msg_prio))
+#define __sanitizer_syscall_post_mq_send(res, mqdes, msg_ptr, msg_len, \
+ msg_prio) \
+ __sanitizer_syscall_post_impl_mq_send( \
+ res, (long long)(mqdes), (long long)(msg_ptr), (long long)(msg_len), \
+ (long long)(msg_prio))
+#define __sanitizer_syscall_pre_mq_receive(mqdes, msg_ptr, msg_len, msg_prio) \
+ __sanitizer_syscall_pre_impl_mq_receive( \
+ (long long)(mqdes), (long long)(msg_ptr), (long long)(msg_len), \
+ (long long)(msg_prio))
+#define __sanitizer_syscall_post_mq_receive(res, mqdes, msg_ptr, msg_len, \
+ msg_prio) \
+ __sanitizer_syscall_post_impl_mq_receive( \
+ res, (long long)(mqdes), (long long)(msg_ptr), (long long)(msg_len), \
+ (long long)(msg_prio))
+#define __sanitizer_syscall_pre_compat_50_mq_timedsend( \
+ mqdes, msg_ptr, msg_len, msg_prio, abs_timeout) \
+ __sanitizer_syscall_pre_impl_compat_50_mq_timedsend( \
+ (long long)(mqdes), (long long)(msg_ptr), (long long)(msg_len), \
+ (long long)(msg_prio), (long long)(abs_timeout))
+#define __sanitizer_syscall_post_compat_50_mq_timedsend( \
+ res, mqdes, msg_ptr, msg_len, msg_prio, abs_timeout) \
+ __sanitizer_syscall_post_impl_compat_50_mq_timedsend( \
+ res, (long long)(mqdes), (long long)(msg_ptr), (long long)(msg_len), \
+ (long long)(msg_prio), (long long)(abs_timeout))
+#define __sanitizer_syscall_pre_compat_50_mq_timedreceive( \
+ mqdes, msg_ptr, msg_len, msg_prio, abs_timeout) \
+ __sanitizer_syscall_pre_impl_compat_50_mq_timedreceive( \
+ (long long)(mqdes), (long long)(msg_ptr), (long long)(msg_len), \
+ (long long)(msg_prio), (long long)(abs_timeout))
+#define __sanitizer_syscall_post_compat_50_mq_timedreceive( \
+ res, mqdes, msg_ptr, msg_len, msg_prio, abs_timeout) \
+ __sanitizer_syscall_post_impl_compat_50_mq_timedreceive( \
+ res, (long long)(mqdes), (long long)(msg_ptr), (long long)(msg_len), \
+ (long long)(msg_prio), (long long)(abs_timeout))
+/* syscall 267 has been skipped */
+/* syscall 268 has been skipped */
+/* syscall 269 has been skipped */
+#define __sanitizer_syscall_pre___posix_rename(from, to) \
+ __sanitizer_syscall_pre_impl___posix_rename((long long)(from), \
+ (long long)(to))
+#define __sanitizer_syscall_post___posix_rename(res, from, to) \
+ __sanitizer_syscall_post_impl___posix_rename(res, (long long)(from), \
+ (long long)(to))
+#define __sanitizer_syscall_pre_swapctl(cmd, arg, misc) \
+ __sanitizer_syscall_pre_impl_swapctl((long long)(cmd), (long long)(arg), \
+ (long long)(misc))
+#define __sanitizer_syscall_post_swapctl(res, cmd, arg, misc) \
+ __sanitizer_syscall_post_impl_swapctl(res, (long long)(cmd), \
+ (long long)(arg), (long long)(misc))
+#define __sanitizer_syscall_pre_compat_30_getdents(fd, buf, count) \
+ __sanitizer_syscall_pre_impl_compat_30_getdents( \
+ (long long)(fd), (long long)(buf), (long long)(count))
+#define __sanitizer_syscall_post_compat_30_getdents(res, fd, buf, count) \
+ __sanitizer_syscall_post_impl_compat_30_getdents( \
+ res, (long long)(fd), (long long)(buf), (long long)(count))
+#define __sanitizer_syscall_pre_minherit(addr, len, inherit) \
+ __sanitizer_syscall_pre_impl_minherit((long long)(addr), (long long)(len), \
+ (long long)(inherit))
+#define __sanitizer_syscall_post_minherit(res, addr, len, inherit) \
+ __sanitizer_syscall_post_impl_minherit( \
+ res, (long long)(addr), (long long)(len), (long long)(inherit))
+#define __sanitizer_syscall_pre_lchmod(path, mode) \
+ __sanitizer_syscall_pre_impl_lchmod((long long)(path), (long long)(mode))
+#define __sanitizer_syscall_post_lchmod(res, path, mode) \
+ __sanitizer_syscall_post_impl_lchmod(res, (long long)(path), \
+ (long long)(mode))
+#define __sanitizer_syscall_pre_lchown(path, uid, gid) \
+ __sanitizer_syscall_pre_impl_lchown((long long)(path), (long long)(uid), \
+ (long long)(gid))
+#define __sanitizer_syscall_post_lchown(res, path, uid, gid) \
+ __sanitizer_syscall_post_impl_lchown(res, (long long)(path), \
+ (long long)(uid), (long long)(gid))
+#define __sanitizer_syscall_pre_compat_50_lutimes(path, tptr) \
+ __sanitizer_syscall_pre_impl_compat_50_lutimes((long long)(path), \
+ (long long)(tptr))
+#define __sanitizer_syscall_post_compat_50_lutimes(res, path, tptr) \
+ __sanitizer_syscall_post_impl_compat_50_lutimes(res, (long long)(path), \
+ (long long)(tptr))
+#define __sanitizer_syscall_pre___msync13(addr, len, flags) \
+ __sanitizer_syscall_pre_impl___msync13((long long)(addr), (long long)(len), \
+ (long long)(flags))
+#define __sanitizer_syscall_post___msync13(res, addr, len, flags) \
+ __sanitizer_syscall_post_impl___msync13( \
+ res, (long long)(addr), (long long)(len), (long long)(flags))
+#define __sanitizer_syscall_pre_compat_30___stat13(path, ub) \
+ __sanitizer_syscall_pre_impl_compat_30___stat13((long long)(path), \
+ (long long)(ub))
+#define __sanitizer_syscall_post_compat_30___stat13(res, path, ub) \
+ __sanitizer_syscall_post_impl_compat_30___stat13(res, (long long)(path), \
+ (long long)(ub))
+#define __sanitizer_syscall_pre_compat_30___fstat13(fd, sb) \
+ __sanitizer_syscall_pre_impl_compat_30___fstat13((long long)(fd), \
+ (long long)(sb))
+#define __sanitizer_syscall_post_compat_30___fstat13(res, fd, sb) \
+ __sanitizer_syscall_post_impl_compat_30___fstat13(res, (long long)(fd), \
+ (long long)(sb))
+#define __sanitizer_syscall_pre_compat_30___lstat13(path, ub) \
+ __sanitizer_syscall_pre_impl_compat_30___lstat13((long long)(path), \
+ (long long)(ub))
+#define __sanitizer_syscall_post_compat_30___lstat13(res, path, ub) \
+ __sanitizer_syscall_post_impl_compat_30___lstat13(res, (long long)(path), \
+ (long long)(ub))
+#define __sanitizer_syscall_pre___sigaltstack14(nss, oss) \
+ __sanitizer_syscall_pre_impl___sigaltstack14((long long)(nss), \
+ (long long)(oss))
+#define __sanitizer_syscall_post___sigaltstack14(res, nss, oss) \
+ __sanitizer_syscall_post_impl___sigaltstack14(res, (long long)(nss), \
+ (long long)(oss))
+#define __sanitizer_syscall_pre___vfork14() \
+ __sanitizer_syscall_pre_impl___vfork14()
+#define __sanitizer_syscall_post___vfork14(res) \
+ __sanitizer_syscall_post_impl___vfork14(res)
+#define __sanitizer_syscall_pre___posix_chown(path, uid, gid) \
+ __sanitizer_syscall_pre_impl___posix_chown( \
+ (long long)(path), (long long)(uid), (long long)(gid))
+#define __sanitizer_syscall_post___posix_chown(res, path, uid, gid) \
+ __sanitizer_syscall_post_impl___posix_chown( \
+ res, (long long)(path), (long long)(uid), (long long)(gid))
+#define __sanitizer_syscall_pre___posix_fchown(fd, uid, gid) \
+ __sanitizer_syscall_pre_impl___posix_fchown( \
+ (long long)(fd), (long long)(uid), (long long)(gid))
+#define __sanitizer_syscall_post___posix_fchown(res, fd, uid, gid) \
+ __sanitizer_syscall_post_impl___posix_fchown( \
+ res, (long long)(fd), (long long)(uid), (long long)(gid))
+#define __sanitizer_syscall_pre___posix_lchown(path, uid, gid) \
+ __sanitizer_syscall_pre_impl___posix_lchown( \
+ (long long)(path), (long long)(uid), (long long)(gid))
+#define __sanitizer_syscall_post___posix_lchown(res, path, uid, gid) \
+ __sanitizer_syscall_post_impl___posix_lchown( \
+ res, (long long)(path), (long long)(uid), (long long)(gid))
+#define __sanitizer_syscall_pre_getsid(pid) \
+ __sanitizer_syscall_pre_impl_getsid((long long)(pid))
+#define __sanitizer_syscall_post_getsid(res, pid) \
+ __sanitizer_syscall_post_impl_getsid(res, (long long)(pid))
+#define __sanitizer_syscall_pre___clone(flags, stack) \
+ __sanitizer_syscall_pre_impl___clone((long long)(flags), (long long)(stack))
+#define __sanitizer_syscall_post___clone(res, flags, stack) \
+ __sanitizer_syscall_post_impl___clone(res, (long long)(flags), \
+ (long long)(stack))
+#define __sanitizer_syscall_pre_fktrace(fd, ops, facs, pid) \
+ __sanitizer_syscall_pre_impl_fktrace((long long)(fd), (long long)(ops), \
+ (long long)(facs), (long long)(pid))
+#define __sanitizer_syscall_post_fktrace(res, fd, ops, facs, pid) \
+ __sanitizer_syscall_post_impl_fktrace(res, (long long)(fd), \
+ (long long)(ops), (long long)(facs), \
+ (long long)(pid))
+#define __sanitizer_syscall_pre_preadv(fd, iovp, iovcnt, PAD, offset) \
+ __sanitizer_syscall_pre_impl_preadv((long long)(fd), (long long)(iovp), \
+ (long long)(iovcnt), (long long)(PAD), \
+ (long long)(offset))
+#define __sanitizer_syscall_post_preadv(res, fd, iovp, iovcnt, PAD, offset) \
+ __sanitizer_syscall_post_impl_preadv(res, (long long)(fd), \
+ (long long)(iovp), (long long)(iovcnt), \
+ (long long)(PAD), (long long)(offset))
+#define __sanitizer_syscall_pre_pwritev(fd, iovp, iovcnt, PAD, offset) \
+ __sanitizer_syscall_pre_impl_pwritev((long long)(fd), (long long)(iovp), \
+ (long long)(iovcnt), (long long)(PAD), \
+ (long long)(offset))
+#define __sanitizer_syscall_post_pwritev(res, fd, iovp, iovcnt, PAD, offset) \
+ __sanitizer_syscall_post_impl_pwritev( \
+ res, (long long)(fd), (long long)(iovp), (long long)(iovcnt), \
+ (long long)(PAD), (long long)(offset))
+#define __sanitizer_syscall_pre_compat_16___sigaction14(signum, nsa, osa) \
+ __sanitizer_syscall_pre_impl_compat_16___sigaction14( \
+ (long long)(signum), (long long)(nsa), (long long)(osa))
+#define __sanitizer_syscall_post_compat_16___sigaction14(res, signum, nsa, \
+ osa) \
+ __sanitizer_syscall_post_impl_compat_16___sigaction14( \
+ res, (long long)(signum), (long long)(nsa), (long long)(osa))
+#define __sanitizer_syscall_pre___sigpending14(set) \
+ __sanitizer_syscall_pre_impl___sigpending14((long long)(set))
+#define __sanitizer_syscall_post___sigpending14(res, set) \
+ __sanitizer_syscall_post_impl___sigpending14(res, (long long)(set))
+#define __sanitizer_syscall_pre___sigprocmask14(how, set, oset) \
+ __sanitizer_syscall_pre_impl___sigprocmask14( \
+ (long long)(how), (long long)(set), (long long)(oset))
+#define __sanitizer_syscall_post___sigprocmask14(res, how, set, oset) \
+ __sanitizer_syscall_post_impl___sigprocmask14( \
+ res, (long long)(how), (long long)(set), (long long)(oset))
+#define __sanitizer_syscall_pre___sigsuspend14(set) \
+ __sanitizer_syscall_pre_impl___sigsuspend14((long long)(set))
+#define __sanitizer_syscall_post___sigsuspend14(res, set) \
+ __sanitizer_syscall_post_impl___sigsuspend14(res, (long long)(set))
+#define __sanitizer_syscall_pre_compat_16___sigreturn14(sigcntxp) \
+ __sanitizer_syscall_pre_impl_compat_16___sigreturn14((long long)(sigcntxp))
+#define __sanitizer_syscall_post_compat_16___sigreturn14(res, sigcntxp) \
+ __sanitizer_syscall_post_impl_compat_16___sigreturn14(res, \
+ (long long)(sigcntxp))
+#define __sanitizer_syscall_pre___getcwd(bufp, length) \
+ __sanitizer_syscall_pre_impl___getcwd((long long)(bufp), (long long)(length))
+#define __sanitizer_syscall_post___getcwd(res, bufp, length) \
+ __sanitizer_syscall_post_impl___getcwd(res, (long long)(bufp), \
+ (long long)(length))
+#define __sanitizer_syscall_pre_fchroot(fd) \
+ __sanitizer_syscall_pre_impl_fchroot((long long)(fd))
+#define __sanitizer_syscall_post_fchroot(res, fd) \
+ __sanitizer_syscall_post_impl_fchroot(res, (long long)(fd))
+#define __sanitizer_syscall_pre_compat_30_fhopen(fhp, flags) \
+ __sanitizer_syscall_pre_impl_compat_30_fhopen((long long)(fhp), \
+ (long long)(flags))
+#define __sanitizer_syscall_post_compat_30_fhopen(res, fhp, flags) \
+ __sanitizer_syscall_post_impl_compat_30_fhopen(res, (long long)(fhp), \
+ (long long)(flags))
+#define __sanitizer_syscall_pre_compat_30_fhstat(fhp, sb) \
+ __sanitizer_syscall_pre_impl_compat_30_fhstat((long long)(fhp), \
+ (long long)(sb))
+#define __sanitizer_syscall_post_compat_30_fhstat(res, fhp, sb) \
+ __sanitizer_syscall_post_impl_compat_30_fhstat(res, (long long)(fhp), \
+ (long long)(sb))
+#define __sanitizer_syscall_pre_compat_20_fhstatfs(fhp, buf) \
+ __sanitizer_syscall_pre_impl_compat_20_fhstatfs((long long)(fhp), \
+ (long long)(buf))
+#define __sanitizer_syscall_post_compat_20_fhstatfs(res, fhp, buf) \
+ __sanitizer_syscall_post_impl_compat_20_fhstatfs(res, (long long)(fhp), \
+ (long long)(buf))
+#define __sanitizer_syscall_pre_compat_50_____semctl13(semid, semnum, cmd, \
+ arg) \
+ __sanitizer_syscall_pre_impl_compat_50_____semctl13( \
+ (long long)(semid), (long long)(semnum), (long long)(cmd), \
+ (long long)(arg))
+#define __sanitizer_syscall_post_compat_50_____semctl13(res, semid, semnum, \
+ cmd, arg) \
+ __sanitizer_syscall_post_impl_compat_50_____semctl13( \
+ res, (long long)(semid), (long long)(semnum), (long long)(cmd), \
+ (long long)(arg))
+#define __sanitizer_syscall_pre_compat_50___msgctl13(msqid, cmd, buf) \
+ __sanitizer_syscall_pre_impl_compat_50___msgctl13( \
+ (long long)(msqid), (long long)(cmd), (long long)(buf))
+#define __sanitizer_syscall_post_compat_50___msgctl13(res, msqid, cmd, buf) \
+ __sanitizer_syscall_post_impl_compat_50___msgctl13( \
+ res, (long long)(msqid), (long long)(cmd), (long long)(buf))
+#define __sanitizer_syscall_pre_compat_50___shmctl13(shmid, cmd, buf) \
+ __sanitizer_syscall_pre_impl_compat_50___shmctl13( \
+ (long long)(shmid), (long long)(cmd), (long long)(buf))
+#define __sanitizer_syscall_post_compat_50___shmctl13(res, shmid, cmd, buf) \
+ __sanitizer_syscall_post_impl_compat_50___shmctl13( \
+ res, (long long)(shmid), (long long)(cmd), (long long)(buf))
+#define __sanitizer_syscall_pre_lchflags(path, flags) \
+ __sanitizer_syscall_pre_impl_lchflags((long long)(path), (long long)(flags))
+#define __sanitizer_syscall_post_lchflags(res, path, flags) \
+ __sanitizer_syscall_post_impl_lchflags(res, (long long)(path), \
+ (long long)(flags))
+#define __sanitizer_syscall_pre_issetugid() \
+ __sanitizer_syscall_pre_impl_issetugid()
+#define __sanitizer_syscall_post_issetugid(res) \
+ __sanitizer_syscall_post_impl_issetugid(res)
+#define __sanitizer_syscall_pre_utrace(label, addr, len) \
+ __sanitizer_syscall_pre_impl_utrace((long long)(label), (long long)(addr), \
+ (long long)(len))
+#define __sanitizer_syscall_post_utrace(res, label, addr, len) \
+ __sanitizer_syscall_post_impl_utrace(res, (long long)(label), \
+ (long long)(addr), (long long)(len))
+#define __sanitizer_syscall_pre_getcontext(ucp) \
+ __sanitizer_syscall_pre_impl_getcontext((long long)(ucp))
+#define __sanitizer_syscall_post_getcontext(res, ucp) \
+ __sanitizer_syscall_post_impl_getcontext(res, (long long)(ucp))
+#define __sanitizer_syscall_pre_setcontext(ucp) \
+ __sanitizer_syscall_pre_impl_setcontext((long long)(ucp))
+#define __sanitizer_syscall_post_setcontext(res, ucp) \
+ __sanitizer_syscall_post_impl_setcontext(res, (long long)(ucp))
+#define __sanitizer_syscall_pre__lwp_create(ucp, flags, new_lwp) \
+ __sanitizer_syscall_pre_impl__lwp_create( \
+ (long long)(ucp), (long long)(flags), (long long)(new_lwp))
+#define __sanitizer_syscall_post__lwp_create(res, ucp, flags, new_lwp) \
+ __sanitizer_syscall_post_impl__lwp_create( \
+ res, (long long)(ucp), (long long)(flags), (long long)(new_lwp))
+#define __sanitizer_syscall_pre__lwp_exit() \
+ __sanitizer_syscall_pre_impl__lwp_exit()
+#define __sanitizer_syscall_post__lwp_exit(res) \
+ __sanitizer_syscall_post_impl__lwp_exit(res)
+#define __sanitizer_syscall_pre__lwp_self() \
+ __sanitizer_syscall_pre_impl__lwp_self()
+#define __sanitizer_syscall_post__lwp_self(res) \
+ __sanitizer_syscall_post_impl__lwp_self(res)
+#define __sanitizer_syscall_pre__lwp_wait(wait_for, departed) \
+ __sanitizer_syscall_pre_impl__lwp_wait((long long)(wait_for), \
+ (long long)(departed))
+#define __sanitizer_syscall_post__lwp_wait(res, wait_for, departed) \
+ __sanitizer_syscall_post_impl__lwp_wait(res, (long long)(wait_for), \
+ (long long)(departed))
+#define __sanitizer_syscall_pre__lwp_suspend(target) \
+ __sanitizer_syscall_pre_impl__lwp_suspend((long long)(target))
+#define __sanitizer_syscall_post__lwp_suspend(res, target) \
+ __sanitizer_syscall_post_impl__lwp_suspend(res, (long long)(target))
+#define __sanitizer_syscall_pre__lwp_continue(target) \
+ __sanitizer_syscall_pre_impl__lwp_continue((long long)(target))
+#define __sanitizer_syscall_post__lwp_continue(res, target) \
+ __sanitizer_syscall_post_impl__lwp_continue(res, (long long)(target))
+#define __sanitizer_syscall_pre__lwp_wakeup(target) \
+ __sanitizer_syscall_pre_impl__lwp_wakeup((long long)(target))
+#define __sanitizer_syscall_post__lwp_wakeup(res, target) \
+ __sanitizer_syscall_post_impl__lwp_wakeup(res, (long long)(target))
+#define __sanitizer_syscall_pre__lwp_getprivate() \
+ __sanitizer_syscall_pre_impl__lwp_getprivate()
+#define __sanitizer_syscall_post__lwp_getprivate(res) \
+ __sanitizer_syscall_post_impl__lwp_getprivate(res)
+#define __sanitizer_syscall_pre__lwp_setprivate(ptr) \
+ __sanitizer_syscall_pre_impl__lwp_setprivate((long long)(ptr))
+#define __sanitizer_syscall_post__lwp_setprivate(res, ptr) \
+ __sanitizer_syscall_post_impl__lwp_setprivate(res, (long long)(ptr))
+#define __sanitizer_syscall_pre__lwp_kill(target, signo) \
+ __sanitizer_syscall_pre_impl__lwp_kill((long long)(target), \
+ (long long)(signo))
+#define __sanitizer_syscall_post__lwp_kill(res, target, signo) \
+ __sanitizer_syscall_post_impl__lwp_kill(res, (long long)(target), \
+ (long long)(signo))
+#define __sanitizer_syscall_pre__lwp_detach(target) \
+ __sanitizer_syscall_pre_impl__lwp_detach((long long)(target))
+#define __sanitizer_syscall_post__lwp_detach(res, target) \
+ __sanitizer_syscall_post_impl__lwp_detach(res, (long long)(target))
+#define __sanitizer_syscall_pre_compat_50__lwp_park(ts, unpark, hint, \
+ unparkhint) \
+ __sanitizer_syscall_pre_impl_compat_50__lwp_park( \
+ (long long)(ts), (long long)(unpark), (long long)(hint), \
+ (long long)(unparkhint))
+#define __sanitizer_syscall_post_compat_50__lwp_park(res, ts, unpark, hint, \
+ unparkhint) \
+ __sanitizer_syscall_post_impl_compat_50__lwp_park( \
+ res, (long long)(ts), (long long)(unpark), (long long)(hint), \
+ (long long)(unparkhint))
+#define __sanitizer_syscall_pre__lwp_unpark(target, hint) \
+ __sanitizer_syscall_pre_impl__lwp_unpark((long long)(target), \
+ (long long)(hint))
+#define __sanitizer_syscall_post__lwp_unpark(res, target, hint) \
+ __sanitizer_syscall_post_impl__lwp_unpark(res, (long long)(target), \
+ (long long)(hint))
+#define __sanitizer_syscall_pre__lwp_unpark_all(targets, ntargets, hint) \
+ __sanitizer_syscall_pre_impl__lwp_unpark_all( \
+ (long long)(targets), (long long)(ntargets), (long long)(hint))
+#define __sanitizer_syscall_post__lwp_unpark_all(res, targets, ntargets, hint) \
+ __sanitizer_syscall_post_impl__lwp_unpark_all( \
+ res, (long long)(targets), (long long)(ntargets), (long long)(hint))
+#define __sanitizer_syscall_pre__lwp_setname(target, name) \
+ __sanitizer_syscall_pre_impl__lwp_setname((long long)(target), \
+ (long long)(name))
+#define __sanitizer_syscall_post__lwp_setname(res, target, name) \
+ __sanitizer_syscall_post_impl__lwp_setname(res, (long long)(target), \
+ (long long)(name))
+#define __sanitizer_syscall_pre__lwp_getname(target, name, len) \
+ __sanitizer_syscall_pre_impl__lwp_getname( \
+ (long long)(target), (long long)(name), (long long)(len))
+#define __sanitizer_syscall_post__lwp_getname(res, target, name, len) \
+ __sanitizer_syscall_post_impl__lwp_getname( \
+ res, (long long)(target), (long long)(name), (long long)(len))
+#define __sanitizer_syscall_pre__lwp_ctl(features, address) \
+ __sanitizer_syscall_pre_impl__lwp_ctl((long long)(features), \
+ (long long)(address))
+#define __sanitizer_syscall_post__lwp_ctl(res, features, address) \
+ __sanitizer_syscall_post_impl__lwp_ctl(res, (long long)(features), \
+ (long long)(address))
+/* syscall 326 has been skipped */
+/* syscall 327 has been skipped */
+/* syscall 328 has been skipped */
+/* syscall 329 has been skipped */
+#define __sanitizer_syscall_pre_compat_60_sa_register(newv, oldv, flags, \
+ stackinfo_offset) \
+ __sanitizer_syscall_pre_impl_compat_60_sa_register( \
+ (long long)(newv), (long long)(oldv), (long long)(flags), \
+ (long long)(stackinfo_offset))
+#define __sanitizer_syscall_post_compat_60_sa_register(res, newv, oldv, flags, \
+ stackinfo_offset) \
+ __sanitizer_syscall_post_impl_compat_60_sa_register( \
+ res, (long long)(newv), (long long)(oldv), (long long)(flags), \
+ (long long)(stackinfo_offset))
+#define __sanitizer_syscall_pre_compat_60_sa_stacks(num, stacks) \
+ __sanitizer_syscall_pre_impl_compat_60_sa_stacks((long long)(num), \
+ (long long)(stacks))
+#define __sanitizer_syscall_post_compat_60_sa_stacks(res, num, stacks) \
+ __sanitizer_syscall_post_impl_compat_60_sa_stacks(res, (long long)(num), \
+ (long long)(stacks))
+#define __sanitizer_syscall_pre_compat_60_sa_enable() \
+ __sanitizer_syscall_pre_impl_compat_60_sa_enable()
+#define __sanitizer_syscall_post_compat_60_sa_enable(res) \
+ __sanitizer_syscall_post_impl_compat_60_sa_enable(res)
+#define __sanitizer_syscall_pre_compat_60_sa_setconcurrency(concurrency) \
+ __sanitizer_syscall_pre_impl_compat_60_sa_setconcurrency( \
+ (long long)(concurrency))
+#define __sanitizer_syscall_post_compat_60_sa_setconcurrency(res, concurrency) \
+ __sanitizer_syscall_post_impl_compat_60_sa_setconcurrency( \
+ res, (long long)(concurrency))
+#define __sanitizer_syscall_pre_compat_60_sa_yield() \
+ __sanitizer_syscall_pre_impl_compat_60_sa_yield()
+#define __sanitizer_syscall_post_compat_60_sa_yield(res) \
+ __sanitizer_syscall_post_impl_compat_60_sa_yield(res)
+#define __sanitizer_syscall_pre_compat_60_sa_preempt(sa_id) \
+ __sanitizer_syscall_pre_impl_compat_60_sa_preempt((long long)(sa_id))
+#define __sanitizer_syscall_post_compat_60_sa_preempt(res, sa_id) \
+ __sanitizer_syscall_post_impl_compat_60_sa_preempt(res, (long long)(sa_id))
+/* syscall 336 has been skipped */
+/* syscall 337 has been skipped */
+/* syscall 338 has been skipped */
+/* syscall 339 has been skipped */
+#define __sanitizer_syscall_pre___sigaction_sigtramp(signum, nsa, osa, tramp, \
+ vers) \
+ __sanitizer_syscall_pre_impl___sigaction_sigtramp( \
+ (long long)(signum), (long long)(nsa), (long long)(osa), \
+ (long long)(tramp), (long long)(vers))
+#define __sanitizer_syscall_post___sigaction_sigtramp(res, signum, nsa, osa, \
+ tramp, vers) \
+ __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))
+#define __sanitizer_syscall_pre_rasctl(addr, len, op) \
+ __sanitizer_syscall_pre_impl_rasctl((long long)(addr), (long long)(len), \
+ (long long)(op))
+#define __sanitizer_syscall_post_rasctl(res, addr, len, op) \
+ __sanitizer_syscall_post_impl_rasctl(res, (long long)(addr), \
+ (long long)(len), (long long)(op))
+#define __sanitizer_syscall_pre_kqueue() __sanitizer_syscall_pre_impl_kqueue()
+#define __sanitizer_syscall_post_kqueue(res) \
+ __sanitizer_syscall_post_impl_kqueue(res)
+#define __sanitizer_syscall_pre_compat_50_kevent(fd, changelist, nchanges, \
+ eventlist, nevents, timeout) \
+ __sanitizer_syscall_pre_impl_compat_50_kevent( \
+ (long long)(fd), (long long)(changelist), (long long)(nchanges), \
+ (long long)(eventlist), (long long)(nevents), (long long)(timeout))
+#define __sanitizer_syscall_post_compat_50_kevent( \
+ res, fd, changelist, nchanges, eventlist, nevents, timeout) \
+ __sanitizer_syscall_post_impl_compat_50_kevent( \
+ res, (long long)(fd), (long long)(changelist), (long long)(nchanges), \
+ (long long)(eventlist), (long long)(nevents), (long long)(timeout))
+#define __sanitizer_syscall_pre__sched_setparam(pid, lid, policy, params) \
+ __sanitizer_syscall_pre_impl__sched_setparam( \
+ (long long)(pid), (long long)(lid), (long long)(policy), \
+ (long long)(params))
+#define __sanitizer_syscall_post__sched_setparam(res, pid, lid, policy, \
+ params) \
+ __sanitizer_syscall_post_impl__sched_setparam( \
+ res, (long long)(pid), (long long)(lid), (long long)(policy), \
+ (long long)(params))
+#define __sanitizer_syscall_pre__sched_getparam(pid, lid, policy, params) \
+ __sanitizer_syscall_pre_impl__sched_getparam( \
+ (long long)(pid), (long long)(lid), (long long)(policy), \
+ (long long)(params))
+#define __sanitizer_syscall_post__sched_getparam(res, pid, lid, policy, \
+ params) \
+ __sanitizer_syscall_post_impl__sched_getparam( \
+ res, (long long)(pid), (long long)(lid), (long long)(policy), \
+ (long long)(params))
+#define __sanitizer_syscall_pre__sched_setaffinity(pid, lid, size, cpuset) \
+ __sanitizer_syscall_pre_impl__sched_setaffinity( \
+ (long long)(pid), (long long)(lid), (long long)(size), \
+ (long long)(cpuset))
+#define __sanitizer_syscall_post__sched_setaffinity(res, pid, lid, size, \
+ cpuset) \
+ __sanitizer_syscall_post_impl__sched_setaffinity( \
+ res, (long long)(pid), (long long)(lid), (long long)(size), \
+ (long long)(cpuset))
+#define __sanitizer_syscall_pre__sched_getaffinity(pid, lid, size, cpuset) \
+ __sanitizer_syscall_pre_impl__sched_getaffinity( \
+ (long long)(pid), (long long)(lid), (long long)(size), \
+ (long long)(cpuset))
+#define __sanitizer_syscall_post__sched_getaffinity(res, pid, lid, size, \
+ cpuset) \
+ __sanitizer_syscall_post_impl__sched_getaffinity( \
+ res, (long long)(pid), (long long)(lid), (long long)(size), \
+ (long long)(cpuset))
+#define __sanitizer_syscall_pre_sched_yield() \
+ __sanitizer_syscall_pre_impl_sched_yield()
+#define __sanitizer_syscall_post_sched_yield(res) \
+ __sanitizer_syscall_post_impl_sched_yield(res)
+#define __sanitizer_syscall_pre__sched_protect(priority) \
+ __sanitizer_syscall_pre_impl__sched_protect((long long)(priority))
+#define __sanitizer_syscall_post__sched_protect(res, priority) \
+ __sanitizer_syscall_post_impl__sched_protect(res, (long long)(priority))
+/* syscall 352 has been skipped */
+/* syscall 353 has been skipped */
+#define __sanitizer_syscall_pre_fsync_range(fd, flags, start, length) \
+ __sanitizer_syscall_pre_impl_fsync_range( \
+ (long long)(fd), (long long)(flags), (long long)(start), \
+ (long long)(length))
+#define __sanitizer_syscall_post_fsync_range(res, fd, flags, start, length) \
+ __sanitizer_syscall_post_impl_fsync_range( \
+ res, (long long)(fd), (long long)(flags), (long long)(start), \
+ (long long)(length))
+#define __sanitizer_syscall_pre_uuidgen(store, count) \
+ __sanitizer_syscall_pre_impl_uuidgen((long long)(store), (long long)(count))
+#define __sanitizer_syscall_post_uuidgen(res, store, count) \
+ __sanitizer_syscall_post_impl_uuidgen(res, (long long)(store), \
+ (long long)(count))
+#define __sanitizer_syscall_pre_getvfsstat(buf, bufsize, flags) \
+ __sanitizer_syscall_pre_impl_getvfsstat( \
+ (long long)(buf), (long long)(bufsize), (long long)(flags))
+#define __sanitizer_syscall_post_getvfsstat(res, buf, bufsize, flags) \
+ __sanitizer_syscall_post_impl_getvfsstat( \
+ res, (long long)(buf), (long long)(bufsize), (long long)(flags))
+#define __sanitizer_syscall_pre_statvfs1(path, buf, flags) \
+ __sanitizer_syscall_pre_impl_statvfs1((long long)(path), (long long)(buf), \
+ (long long)(flags))
+#define __sanitizer_syscall_post_statvfs1(res, path, buf, flags) \
+ __sanitizer_syscall_post_impl_statvfs1(res, (long long)(path), \
+ (long long)(buf), (long long)(flags))
+#define __sanitizer_syscall_pre_fstatvfs1(fd, buf, flags) \
+ __sanitizer_syscall_pre_impl_fstatvfs1((long long)(fd), (long long)(buf), \
+ (long long)(flags))
+#define __sanitizer_syscall_post_fstatvfs1(res, fd, buf, flags) \
+ __sanitizer_syscall_post_impl_fstatvfs1( \
+ res, (long long)(fd), (long long)(buf), (long long)(flags))
+#define __sanitizer_syscall_pre_compat_30_fhstatvfs1(fhp, buf, flags) \
+ __sanitizer_syscall_pre_impl_compat_30_fhstatvfs1( \
+ (long long)(fhp), (long long)(buf), (long long)(flags))
+#define __sanitizer_syscall_post_compat_30_fhstatvfs1(res, fhp, buf, flags) \
+ __sanitizer_syscall_post_impl_compat_30_fhstatvfs1( \
+ res, (long long)(fhp), (long long)(buf), (long long)(flags))
+#define __sanitizer_syscall_pre_extattrctl(path, cmd, filename, attrnamespace, \
+ attrname) \
+ __sanitizer_syscall_pre_impl_extattrctl( \
+ (long long)(path), (long long)(cmd), (long long)(filename), \
+ (long long)(attrnamespace), (long long)(attrname))
+#define __sanitizer_syscall_post_extattrctl(res, path, cmd, filename, \
+ attrnamespace, attrname) \
+ __sanitizer_syscall_post_impl_extattrctl( \
+ res, (long long)(path), (long long)(cmd), (long long)(filename), \
+ (long long)(attrnamespace), (long long)(attrname))
+#define __sanitizer_syscall_pre_extattr_set_file(path, attrnamespace, \
+ attrname, data, nbytes) \
+ __sanitizer_syscall_pre_impl_extattr_set_file( \
+ (long long)(path), (long long)(attrnamespace), (long long)(attrname), \
+ (long long)(data), (long long)(nbytes))
+#define __sanitizer_syscall_post_extattr_set_file(res, path, attrnamespace, \
+ attrname, data, nbytes) \
+ __sanitizer_syscall_post_impl_extattr_set_file( \
+ res, (long long)(path), (long long)(attrnamespace), \
+ (long long)(attrname), (long long)(data), (long long)(nbytes))
+#define __sanitizer_syscall_pre_extattr_get_file(path, attrnamespace, \
+ attrname, data, nbytes) \
+ __sanitizer_syscall_pre_impl_extattr_get_file( \
+ (long long)(path), (long long)(attrnamespace), (long long)(attrname), \
+ (long long)(data), (long long)(nbytes))
+#define __sanitizer_syscall_post_extattr_get_file(res, path, attrnamespace, \
+ attrname, data, nbytes) \
+ __sanitizer_syscall_post_impl_extattr_get_file( \
+ res, (long long)(path), (long long)(attrnamespace), \
+ (long long)(attrname), (long long)(data), (long long)(nbytes))
+#define __sanitizer_syscall_pre_extattr_delete_file(path, attrnamespace, \
+ attrname) \
+ __sanitizer_syscall_pre_impl_extattr_delete_file( \
+ (long long)(path), (long long)(attrnamespace), (long long)(attrname))
+#define __sanitizer_syscall_post_extattr_delete_file(res, path, attrnamespace, \
+ attrname) \
+ __sanitizer_syscall_post_impl_extattr_delete_file( \
+ res, (long long)(path), (long long)(attrnamespace), \
+ (long long)(attrname))
+#define __sanitizer_syscall_pre_extattr_set_fd(fd, attrnamespace, attrname, \
+ data, nbytes) \
+ __sanitizer_syscall_pre_impl_extattr_set_fd( \
+ (long long)(fd), (long long)(attrnamespace), (long long)(attrname), \
+ (long long)(data), (long long)(nbytes))
+#define __sanitizer_syscall_post_extattr_set_fd(res, fd, attrnamespace, \
+ attrname, data, nbytes) \
+ __sanitizer_syscall_post_impl_extattr_set_fd( \
+ res, (long long)(fd), (long long)(attrnamespace), (long long)(attrname), \
+ (long long)(data), (long long)(nbytes))
+#define __sanitizer_syscall_pre_extattr_get_fd(fd, attrnamespace, attrname, \
+ data, nbytes) \
+ __sanitizer_syscall_pre_impl_extattr_get_fd( \
+ (long long)(fd), (long long)(attrnamespace), (long long)(attrname), \
+ (long long)(data), (long long)(nbytes))
+#define __sanitizer_syscall_post_extattr_get_fd(res, fd, attrnamespace, \
+ attrname, data, nbytes) \
+ __sanitizer_syscall_post_impl_extattr_get_fd( \
+ res, (long long)(fd), (long long)(attrnamespace), (long long)(attrname), \
+ (long long)(data), (long long)(nbytes))
+#define __sanitizer_syscall_pre_extattr_delete_fd(fd, attrnamespace, attrname) \
+ __sanitizer_syscall_pre_impl_extattr_delete_fd( \
+ (long long)(fd), (long long)(attrnamespace), (long long)(attrname))
+#define __sanitizer_syscall_post_extattr_delete_fd(res, fd, attrnamespace, \
+ attrname) \
+ __sanitizer_syscall_post_impl_extattr_delete_fd( \
+ res, (long long)(fd), (long long)(attrnamespace), (long long)(attrname))
+#define __sanitizer_syscall_pre_extattr_set_link(path, attrnamespace, \
+ attrname, data, nbytes) \
+ __sanitizer_syscall_pre_impl_extattr_set_link( \
+ (long long)(path), (long long)(attrnamespace), (long long)(attrname), \
+ (long long)(data), (long long)(nbytes))
+#define __sanitizer_syscall_post_extattr_set_link(res, path, attrnamespace, \
+ attrname, data, nbytes) \
+ __sanitizer_syscall_post_impl_extattr_set_link( \
+ res, (long long)(path), (long long)(attrnamespace), \
+ (long long)(attrname), (long long)(data), (long long)(nbytes))
+#define __sanitizer_syscall_pre_extattr_get_link(path, attrnamespace, \
+ attrname, data, nbytes) \
+ __sanitizer_syscall_pre_impl_extattr_get_link( \
+ (long long)(path), (long long)(attrnamespace), (long long)(attrname), \
+ (long long)(data), (long long)(nbytes))
+#define __sanitizer_syscall_post_extattr_get_link(res, path, attrnamespace, \
+ attrname, data, nbytes) \
+ __sanitizer_syscall_post_impl_extattr_get_link( \
+ res, (long long)(path), (long long)(attrnamespace), \
+ (long long)(attrname), (long long)(data), (long long)(nbytes))
+#define __sanitizer_syscall_pre_extattr_delete_link(path, attrnamespace, \
+ attrname) \
+ __sanitizer_syscall_pre_impl_extattr_delete_link( \
+ (long long)(path), (long long)(attrnamespace), (long long)(attrname))
+#define __sanitizer_syscall_post_extattr_delete_link(res, path, attrnamespace, \
+ attrname) \
+ __sanitizer_syscall_post_impl_extattr_delete_link( \
+ res, (long long)(path), (long long)(attrnamespace), \
+ (long long)(attrname))
+#define __sanitizer_syscall_pre_extattr_list_fd(fd, attrnamespace, data, \
+ nbytes) \
+ __sanitizer_syscall_pre_impl_extattr_list_fd( \
+ (long long)(fd), (long long)(attrnamespace), (long long)(data), \
+ (long long)(nbytes))
+#define __sanitizer_syscall_post_extattr_list_fd(res, fd, attrnamespace, data, \
+ nbytes) \
+ __sanitizer_syscall_post_impl_extattr_list_fd( \
+ res, (long long)(fd), (long long)(attrnamespace), (long long)(data), \
+ (long long)(nbytes))
+#define __sanitizer_syscall_pre_extattr_list_file(path, attrnamespace, data, \
+ nbytes) \
+ __sanitizer_syscall_pre_impl_extattr_list_file( \
+ (long long)(path), (long long)(attrnamespace), (long long)(data), \
+ (long long)(nbytes))
+#define __sanitizer_syscall_post_extattr_list_file(res, path, attrnamespace, \
+ data, nbytes) \
+ __sanitizer_syscall_post_impl_extattr_list_file( \
+ res, (long long)(path), (long long)(attrnamespace), (long long)(data), \
+ (long long)(nbytes))
+#define __sanitizer_syscall_pre_extattr_list_link(path, attrnamespace, data, \
+ nbytes) \
+ __sanitizer_syscall_pre_impl_extattr_list_link( \
+ (long long)(path), (long long)(attrnamespace), (long long)(data), \
+ (long long)(nbytes))
+#define __sanitizer_syscall_post_extattr_list_link(res, path, attrnamespace, \
+ data, nbytes) \
+ __sanitizer_syscall_post_impl_extattr_list_link( \
+ res, (long long)(path), (long long)(attrnamespace), (long long)(data), \
+ (long long)(nbytes))
+#define __sanitizer_syscall_pre_compat_50_pselect(nd, in, ou, ex, ts, mask) \
+ __sanitizer_syscall_pre_impl_compat_50_pselect( \
+ (long long)(nd), (long long)(in), (long long)(ou), (long long)(ex), \
+ (long long)(ts), (long long)(mask))
+#define __sanitizer_syscall_post_compat_50_pselect(res, nd, in, ou, ex, ts, \
+ mask) \
+ __sanitizer_syscall_post_impl_compat_50_pselect( \
+ res, (long long)(nd), (long long)(in), (long long)(ou), (long long)(ex), \
+ (long long)(ts), (long long)(mask))
+#define __sanitizer_syscall_pre_compat_50_pollts(fds, nfds, ts, mask) \
+ __sanitizer_syscall_pre_impl_compat_50_pollts( \
+ (long long)(fds), (long long)(nfds), (long long)(ts), (long long)(mask))
+#define __sanitizer_syscall_post_compat_50_pollts(res, fds, nfds, ts, mask) \
+ __sanitizer_syscall_post_impl_compat_50_pollts( \
+ res, (long long)(fds), (long long)(nfds), (long long)(ts), \
+ (long long)(mask))
+#define __sanitizer_syscall_pre_setxattr(path, name, value, size, flags) \
+ __sanitizer_syscall_pre_impl_setxattr((long long)(path), (long long)(name), \
+ (long long)(value), (long long)(size), \
+ (long long)(flags))
+#define __sanitizer_syscall_post_setxattr(res, path, name, value, size, flags) \
+ __sanitizer_syscall_post_impl_setxattr( \
+ res, (long long)(path), (long long)(name), (long long)(value), \
+ (long long)(size), (long long)(flags))
+#define __sanitizer_syscall_pre_lsetxattr(path, name, value, size, flags) \
+ __sanitizer_syscall_pre_impl_lsetxattr( \
+ (long long)(path), (long long)(name), (long long)(value), \
+ (long long)(size), (long long)(flags))
+#define __sanitizer_syscall_post_lsetxattr(res, path, name, value, size, \
+ flags) \
+ __sanitizer_syscall_post_impl_lsetxattr( \
+ res, (long long)(path), (long long)(name), (long long)(value), \
+ (long long)(size), (long long)(flags))
+#define __sanitizer_syscall_pre_fsetxattr(fd, name, value, size, flags) \
+ __sanitizer_syscall_pre_impl_fsetxattr( \
+ (long long)(fd), (long long)(name), (long long)(value), \
+ (long long)(size), (long long)(flags))
+#define __sanitizer_syscall_post_fsetxattr(res, fd, name, value, size, flags) \
+ __sanitizer_syscall_post_impl_fsetxattr( \
+ res, (long long)(fd), (long long)(name), (long long)(value), \
+ (long long)(size), (long long)(flags))
+#define __sanitizer_syscall_pre_getxattr(path, name, value, size) \
+ __sanitizer_syscall_pre_impl_getxattr((long long)(path), (long long)(name), \
+ (long long)(value), (long long)(size))
+#define __sanitizer_syscall_post_getxattr(res, path, name, value, size) \
+ __sanitizer_syscall_post_impl_getxattr( \
+ res, (long long)(path), (long long)(name), (long long)(value), \
+ (long long)(size))
+#define __sanitizer_syscall_pre_lgetxattr(path, name, value, size) \
+ __sanitizer_syscall_pre_impl_lgetxattr((long long)(path), (long long)(name), \
+ (long long)(value), \
+ (long long)(size))
+#define __sanitizer_syscall_post_lgetxattr(res, path, name, value, size) \
+ __sanitizer_syscall_post_impl_lgetxattr( \
+ res, (long long)(path), (long long)(name), (long long)(value), \
+ (long long)(size))
+#define __sanitizer_syscall_pre_fgetxattr(fd, name, value, size) \
+ __sanitizer_syscall_pre_impl_fgetxattr((long long)(fd), (long long)(name), \
+ (long long)(value), \
+ (long long)(size))
+#define __sanitizer_syscall_post_fgetxattr(res, fd, name, value, size) \
+ __sanitizer_syscall_post_impl_fgetxattr( \
+ res, (long long)(fd), (long long)(name), (long long)(value), \
+ (long long)(size))
+#define __sanitizer_syscall_pre_listxattr(path, list, size) \
+ __sanitizer_syscall_pre_impl_listxattr((long long)(path), (long long)(list), \
+ (long long)(size))
+#define __sanitizer_syscall_post_listxattr(res, path, list, size) \
+ __sanitizer_syscall_post_impl_listxattr( \
+ res, (long long)(path), (long long)(list), (long long)(size))
+#define __sanitizer_syscall_pre_llistxattr(path, list, size) \
+ __sanitizer_syscall_pre_impl_llistxattr( \
+ (long long)(path), (long long)(list), (long long)(size))
+#define __sanitizer_syscall_post_llistxattr(res, path, list, size) \
+ __sanitizer_syscall_post_impl_llistxattr( \
+ res, (long long)(path), (long long)(list), (long long)(size))
+#define __sanitizer_syscall_pre_flistxattr(fd, list, size) \
+ __sanitizer_syscall_pre_impl_flistxattr((long long)(fd), (long long)(list), \
+ (long long)(size))
+#define __sanitizer_syscall_post_flistxattr(res, fd, list, size) \
+ __sanitizer_syscall_post_impl_flistxattr( \
+ res, (long long)(fd), (long long)(list), (long long)(size))
+#define __sanitizer_syscall_pre_removexattr(path, name) \
+ __sanitizer_syscall_pre_impl_removexattr((long long)(path), (long long)(name))
+#define __sanitizer_syscall_post_removexattr(res, path, name) \
+ __sanitizer_syscall_post_impl_removexattr(res, (long long)(path), \
+ (long long)(name))
+#define __sanitizer_syscall_pre_lremovexattr(path, name) \
+ __sanitizer_syscall_pre_impl_lremovexattr((long long)(path), \
+ (long long)(name))
+#define __sanitizer_syscall_post_lremovexattr(res, path, name) \
+ __sanitizer_syscall_post_impl_lremovexattr(res, (long long)(path), \
+ (long long)(name))
+#define __sanitizer_syscall_pre_fremovexattr(fd, name) \
+ __sanitizer_syscall_pre_impl_fremovexattr((long long)(fd), (long long)(name))
+#define __sanitizer_syscall_post_fremovexattr(res, fd, name) \
+ __sanitizer_syscall_post_impl_fremovexattr(res, (long long)(fd), \
+ (long long)(name))
+#define __sanitizer_syscall_pre_compat_50___stat30(path, ub) \
+ __sanitizer_syscall_pre_impl_compat_50___stat30((long long)(path), \
+ (long long)(ub))
+#define __sanitizer_syscall_post_compat_50___stat30(res, path, ub) \
+ __sanitizer_syscall_post_impl_compat_50___stat30(res, (long long)(path), \
+ (long long)(ub))
+#define __sanitizer_syscall_pre_compat_50___fstat30(fd, sb) \
+ __sanitizer_syscall_pre_impl_compat_50___fstat30((long long)(fd), \
+ (long long)(sb))
+#define __sanitizer_syscall_post_compat_50___fstat30(res, fd, sb) \
+ __sanitizer_syscall_post_impl_compat_50___fstat30(res, (long long)(fd), \
+ (long long)(sb))
+#define __sanitizer_syscall_pre_compat_50___lstat30(path, ub) \
+ __sanitizer_syscall_pre_impl_compat_50___lstat30((long long)(path), \
+ (long long)(ub))
+#define __sanitizer_syscall_post_compat_50___lstat30(res, path, ub) \
+ __sanitizer_syscall_post_impl_compat_50___lstat30(res, (long long)(path), \
+ (long long)(ub))
+#define __sanitizer_syscall_pre___getdents30(fd, buf, count) \
+ __sanitizer_syscall_pre_impl___getdents30((long long)(fd), (long long)(buf), \
+ (long long)(count))
+#define __sanitizer_syscall_post___getdents30(res, fd, buf, count) \
+ __sanitizer_syscall_post_impl___getdents30( \
+ res, (long long)(fd), (long long)(buf), (long long)(count))
+#define __sanitizer_syscall_pre_posix_fadvise() \
+ __sanitizer_syscall_pre_impl_posix_fadvise((long long)())
+#define __sanitizer_syscall_post_posix_fadvise(res) \
+ __sanitizer_syscall_post_impl_posix_fadvise(res, (long long)())
+#define __sanitizer_syscall_pre_compat_30___fhstat30(fhp, sb) \
+ __sanitizer_syscall_pre_impl_compat_30___fhstat30((long long)(fhp), \
+ (long long)(sb))
+#define __sanitizer_syscall_post_compat_30___fhstat30(res, fhp, sb) \
+ __sanitizer_syscall_post_impl_compat_30___fhstat30(res, (long long)(fhp), \
+ (long long)(sb))
+#define __sanitizer_syscall_pre_compat_50___ntp_gettime30(ntvp) \
+ __sanitizer_syscall_pre_impl_compat_50___ntp_gettime30((long long)(ntvp))
+#define __sanitizer_syscall_post_compat_50___ntp_gettime30(res, ntvp) \
+ __sanitizer_syscall_post_impl_compat_50___ntp_gettime30(res, \
+ (long long)(ntvp))
+#define __sanitizer_syscall_pre___socket30(domain, type, protocol) \
+ __sanitizer_syscall_pre_impl___socket30( \
+ (long long)(domain), (long long)(type), (long long)(protocol))
+#define __sanitizer_syscall_post___socket30(res, domain, type, protocol) \
+ __sanitizer_syscall_post_impl___socket30( \
+ res, (long long)(domain), (long long)(type), (long long)(protocol))
+#define __sanitizer_syscall_pre___getfh30(fname, fhp, fh_size) \
+ __sanitizer_syscall_pre_impl___getfh30((long long)(fname), (long long)(fhp), \
+ (long long)(fh_size))
+#define __sanitizer_syscall_post___getfh30(res, fname, fhp, fh_size) \
+ __sanitizer_syscall_post_impl___getfh30( \
+ res, (long long)(fname), (long long)(fhp), (long long)(fh_size))
+#define __sanitizer_syscall_pre___fhopen40(fhp, fh_size, flags) \
+ __sanitizer_syscall_pre_impl___fhopen40( \
+ (long long)(fhp), (long long)(fh_size), (long long)(flags))
+#define __sanitizer_syscall_post___fhopen40(res, fhp, fh_size, flags) \
+ __sanitizer_syscall_post_impl___fhopen40( \
+ res, (long long)(fhp), (long long)(fh_size), (long long)(flags))
+#define __sanitizer_syscall_pre___fhstatvfs140(fhp, fh_size, buf, flags) \
+ __sanitizer_syscall_pre_impl___fhstatvfs140( \
+ (long long)(fhp), (long long)(fh_size), (long long)(buf), \
+ (long long)(flags))
+#define __sanitizer_syscall_post___fhstatvfs140(res, fhp, fh_size, buf, flags) \
+ __sanitizer_syscall_post_impl___fhstatvfs140( \
+ res, (long long)(fhp), (long long)(fh_size), (long long)(buf), \
+ (long long)(flags))
+#define __sanitizer_syscall_pre_compat_50___fhstat40(fhp, fh_size, sb) \
+ __sanitizer_syscall_pre_impl_compat_50___fhstat40( \
+ (long long)(fhp), (long long)(fh_size), (long long)(sb))
+#define __sanitizer_syscall_post_compat_50___fhstat40(res, fhp, fh_size, sb) \
+ __sanitizer_syscall_post_impl_compat_50___fhstat40( \
+ res, (long long)(fhp), (long long)(fh_size), (long long)(sb))
+#define __sanitizer_syscall_pre_aio_cancel(fildes, aiocbp) \
+ __sanitizer_syscall_pre_impl_aio_cancel((long long)(fildes), \
+ (long long)(aiocbp))
+#define __sanitizer_syscall_post_aio_cancel(res, fildes, aiocbp) \
+ __sanitizer_syscall_post_impl_aio_cancel(res, (long long)(fildes), \
+ (long long)(aiocbp))
+#define __sanitizer_syscall_pre_aio_error(aiocbp) \
+ __sanitizer_syscall_pre_impl_aio_error((long long)(aiocbp))
+#define __sanitizer_syscall_post_aio_error(res, aiocbp) \
+ __sanitizer_syscall_post_impl_aio_error(res, (long long)(aiocbp))
+#define __sanitizer_syscall_pre_aio_fsync(op, aiocbp) \
+ __sanitizer_syscall_pre_impl_aio_fsync((long long)(op), (long long)(aiocbp))
+#define __sanitizer_syscall_post_aio_fsync(res, op, aiocbp) \
+ __sanitizer_syscall_post_impl_aio_fsync(res, (long long)(op), \
+ (long long)(aiocbp))
+#define __sanitizer_syscall_pre_aio_read(aiocbp) \
+ __sanitizer_syscall_pre_impl_aio_read((long long)(aiocbp))
+#define __sanitizer_syscall_post_aio_read(res, aiocbp) \
+ __sanitizer_syscall_post_impl_aio_read(res, (long long)(aiocbp))
+#define __sanitizer_syscall_pre_aio_return(aiocbp) \
+ __sanitizer_syscall_pre_impl_aio_return((long long)(aiocbp))
+#define __sanitizer_syscall_post_aio_return(res, aiocbp) \
+ __sanitizer_syscall_post_impl_aio_return(res, (long long)(aiocbp))
+#define __sanitizer_syscall_pre_compat_50_aio_suspend(list, nent, timeout) \
+ __sanitizer_syscall_pre_impl_compat_50_aio_suspend( \
+ (long long)(list), (long long)(nent), (long long)(timeout))
+#define __sanitizer_syscall_post_compat_50_aio_suspend(res, list, nent, \
+ timeout) \
+ __sanitizer_syscall_post_impl_compat_50_aio_suspend( \
+ res, (long long)(list), (long long)(nent), (long long)(timeout))
+#define __sanitizer_syscall_pre_aio_write(aiocbp) \
+ __sanitizer_syscall_pre_impl_aio_write((long long)(aiocbp))
+#define __sanitizer_syscall_post_aio_write(res, aiocbp) \
+ __sanitizer_syscall_post_impl_aio_write(res, (long long)(aiocbp))
+#define __sanitizer_syscall_pre_lio_listio(mode, list, nent, sig) \
+ __sanitizer_syscall_pre_impl_lio_listio((long long)(mode), \
+ (long long)(list), \
+ (long long)(nent), (long long)(sig))
+#define __sanitizer_syscall_post_lio_listio(res, mode, list, nent, sig) \
+ __sanitizer_syscall_post_impl_lio_listio( \
+ res, (long long)(mode), (long long)(list), (long long)(nent), \
+ (long long)(sig))
+/* syscall 407 has been skipped */
+/* syscall 408 has been skipped */
+/* syscall 409 has been skipped */
+#define __sanitizer_syscall_pre___mount50(type, path, flags, data, data_len) \
+ __sanitizer_syscall_pre_impl___mount50( \
+ (long long)(type), (long long)(path), (long long)(flags), \
+ (long long)(data), (long long)(data_len))
+#define __sanitizer_syscall_post___mount50(res, type, path, flags, data, \
+ data_len) \
+ __sanitizer_syscall_post_impl___mount50( \
+ res, (long long)(type), (long long)(path), (long long)(flags), \
+ (long long)(data), (long long)(data_len))
+#define __sanitizer_syscall_pre_mremap(old_address, old_size, new_address, \
+ new_size, flags) \
+ __sanitizer_syscall_pre_impl_mremap( \
+ (long long)(old_address), (long long)(old_size), \
+ (long long)(new_address), (long long)(new_size), (long long)(flags))
+#define __sanitizer_syscall_post_mremap(res, old_address, old_size, \
+ new_address, new_size, flags) \
+ __sanitizer_syscall_post_impl_mremap( \
+ res, (long long)(old_address), (long long)(old_size), \
+ (long long)(new_address), (long long)(new_size), (long long)(flags))
+#define __sanitizer_syscall_pre_pset_create(psid) \
+ __sanitizer_syscall_pre_impl_pset_create((long long)(psid))
+#define __sanitizer_syscall_post_pset_create(res, psid) \
+ __sanitizer_syscall_post_impl_pset_create(res, (long long)(psid))
+#define __sanitizer_syscall_pre_pset_destroy(psid) \
+ __sanitizer_syscall_pre_impl_pset_destroy((long long)(psid))
+#define __sanitizer_syscall_post_pset_destroy(res, psid) \
+ __sanitizer_syscall_post_impl_pset_destroy(res, (long long)(psid))
+#define __sanitizer_syscall_pre_pset_assign(psid, cpuid, opsid) \
+ __sanitizer_syscall_pre_impl_pset_assign( \
+ (long long)(psid), (long long)(cpuid), (long long)(opsid))
+#define __sanitizer_syscall_post_pset_assign(res, psid, cpuid, opsid) \
+ __sanitizer_syscall_post_impl_pset_assign( \
+ res, (long long)(psid), (long long)(cpuid), (long long)(opsid))
+#define __sanitizer_syscall_pre__pset_bind(idtype, first_id, second_id, psid, \
+ opsid) \
+ __sanitizer_syscall_pre_impl__pset_bind( \
+ (long long)(idtype), (long long)(first_id), (long long)(second_id), \
+ (long long)(psid), (long long)(opsid))
+#define __sanitizer_syscall_post__pset_bind(res, idtype, first_id, second_id, \
+ psid, opsid) \
+ __sanitizer_syscall_post_impl__pset_bind( \
+ res, (long long)(idtype), (long long)(first_id), (long long)(second_id), \
+ (long long)(psid), (long long)(opsid))
+#define __sanitizer_syscall_pre___posix_fadvise50(fd, PAD, offset, len, \
+ advice) \
+ __sanitizer_syscall_pre_impl___posix_fadvise50( \
+ (long long)(fd), (long long)(PAD), (long long)(offset), \
+ (long long)(len), (long long)(advice))
+#define __sanitizer_syscall_post___posix_fadvise50(res, fd, PAD, offset, len, \
+ advice) \
+ __sanitizer_syscall_post_impl___posix_fadvise50( \
+ res, (long long)(fd), (long long)(PAD), (long long)(offset), \
+ (long long)(len), (long long)(advice))
+#define __sanitizer_syscall_pre___select50(nd, in, ou, ex, tv) \
+ __sanitizer_syscall_pre_impl___select50((long long)(nd), (long long)(in), \
+ (long long)(ou), (long long)(ex), \
+ (long long)(tv))
+#define __sanitizer_syscall_post___select50(res, nd, in, ou, ex, tv) \
+ __sanitizer_syscall_post_impl___select50(res, (long long)(nd), \
+ (long long)(in), (long long)(ou), \
+ (long long)(ex), (long long)(tv))
+#define __sanitizer_syscall_pre___gettimeofday50(tp, tzp) \
+ __sanitizer_syscall_pre_impl___gettimeofday50((long long)(tp), \
+ (long long)(tzp))
+#define __sanitizer_syscall_post___gettimeofday50(res, tp, tzp) \
+ __sanitizer_syscall_post_impl___gettimeofday50(res, (long long)(tp), \
+ (long long)(tzp))
+#define __sanitizer_syscall_pre___settimeofday50(tv, tzp) \
+ __sanitizer_syscall_pre_impl___settimeofday50((long long)(tv), \
+ (long long)(tzp))
+#define __sanitizer_syscall_post___settimeofday50(res, tv, tzp) \
+ __sanitizer_syscall_post_impl___settimeofday50(res, (long long)(tv), \
+ (long long)(tzp))
+#define __sanitizer_syscall_pre___utimes50(path, tptr) \
+ __sanitizer_syscall_pre_impl___utimes50((long long)(path), (long long)(tptr))
+#define __sanitizer_syscall_post___utimes50(res, path, tptr) \
+ __sanitizer_syscall_post_impl___utimes50(res, (long long)(path), \
+ (long long)(tptr))
+#define __sanitizer_syscall_pre___adjtime50(delta, olddelta) \
+ __sanitizer_syscall_pre_impl___adjtime50((long long)(delta), \
+ (long long)(olddelta))
+#define __sanitizer_syscall_post___adjtime50(res, delta, olddelta) \
+ __sanitizer_syscall_post_impl___adjtime50(res, (long long)(delta), \
+ (long long)(olddelta))
+#define __sanitizer_syscall_pre___lfs_segwait50(fsidp, tv) \
+ __sanitizer_syscall_pre_impl___lfs_segwait50((long long)(fsidp), \
+ (long long)(tv))
+#define __sanitizer_syscall_post___lfs_segwait50(res, fsidp, tv) \
+ __sanitizer_syscall_post_impl___lfs_segwait50(res, (long long)(fsidp), \
+ (long long)(tv))
+#define __sanitizer_syscall_pre___futimes50(fd, tptr) \
+ __sanitizer_syscall_pre_impl___futimes50((long long)(fd), (long long)(tptr))
+#define __sanitizer_syscall_post___futimes50(res, fd, tptr) \
+ __sanitizer_syscall_post_impl___futimes50(res, (long long)(fd), \
+ (long long)(tptr))
+#define __sanitizer_syscall_pre___lutimes50(path, tptr) \
+ __sanitizer_syscall_pre_impl___lutimes50((long long)(path), (long long)(tptr))
+#define __sanitizer_syscall_post___lutimes50(res, path, tptr) \
+ __sanitizer_syscall_post_impl___lutimes50(res, (long long)(path), \
+ (long long)(tptr))
+#define __sanitizer_syscall_pre___setitimer50(which, itv, oitv) \
+ __sanitizer_syscall_pre_impl___setitimer50( \
+ (long long)(which), (long long)(itv), (long long)(oitv))
+#define __sanitizer_syscall_post___setitimer50(res, which, itv, oitv) \
+ __sanitizer_syscall_post_impl___setitimer50( \
+ res, (long long)(which), (long long)(itv), (long long)(oitv))
+#define __sanitizer_syscall_pre___getitimer50(which, itv) \
+ __sanitizer_syscall_pre_impl___getitimer50((long long)(which), \
+ (long long)(itv))
+#define __sanitizer_syscall_post___getitimer50(res, which, itv) \
+ __sanitizer_syscall_post_impl___getitimer50(res, (long long)(which), \
+ (long long)(itv))
+#define __sanitizer_syscall_pre___clock_gettime50(clock_id, tp) \
+ __sanitizer_syscall_pre_impl___clock_gettime50((long long)(clock_id), \
+ (long long)(tp))
+#define __sanitizer_syscall_post___clock_gettime50(res, clock_id, tp) \
+ __sanitizer_syscall_post_impl___clock_gettime50(res, (long long)(clock_id), \
+ (long long)(tp))
+#define __sanitizer_syscall_pre___clock_settime50(clock_id, tp) \
+ __sanitizer_syscall_pre_impl___clock_settime50((long long)(clock_id), \
+ (long long)(tp))
+#define __sanitizer_syscall_post___clock_settime50(res, clock_id, tp) \
+ __sanitizer_syscall_post_impl___clock_settime50(res, (long long)(clock_id), \
+ (long long)(tp))
+#define __sanitizer_syscall_pre___clock_getres50(clock_id, tp) \
+ __sanitizer_syscall_pre_impl___clock_getres50((long long)(clock_id), \
+ (long long)(tp))
+#define __sanitizer_syscall_post___clock_getres50(res, clock_id, tp) \
+ __sanitizer_syscall_post_impl___clock_getres50(res, (long long)(clock_id), \
+ (long long)(tp))
+#define __sanitizer_syscall_pre___nanosleep50(rqtp, rmtp) \
+ __sanitizer_syscall_pre_impl___nanosleep50((long long)(rqtp), \
+ (long long)(rmtp))
+#define __sanitizer_syscall_post___nanosleep50(res, rqtp, rmtp) \
+ __sanitizer_syscall_post_impl___nanosleep50(res, (long long)(rqtp), \
+ (long long)(rmtp))
+#define __sanitizer_syscall_pre_____sigtimedwait50(set, info, timeout) \
+ __sanitizer_syscall_pre_impl_____sigtimedwait50( \
+ (long long)(set), (long long)(info), (long long)(timeout))
+#define __sanitizer_syscall_post_____sigtimedwait50(res, set, info, timeout) \
+ __sanitizer_syscall_post_impl_____sigtimedwait50( \
+ res, (long long)(set), (long long)(info), (long long)(timeout))
+#define __sanitizer_syscall_pre___mq_timedsend50(mqdes, msg_ptr, msg_len, \
+ msg_prio, abs_timeout) \
+ __sanitizer_syscall_pre_impl___mq_timedsend50( \
+ (long long)(mqdes), (long long)(msg_ptr), (long long)(msg_len), \
+ (long long)(msg_prio), (long long)(abs_timeout))
+#define __sanitizer_syscall_post___mq_timedsend50( \
+ res, mqdes, msg_ptr, msg_len, msg_prio, abs_timeout) \
+ __sanitizer_syscall_post_impl___mq_timedsend50( \
+ res, (long long)(mqdes), (long long)(msg_ptr), (long long)(msg_len), \
+ (long long)(msg_prio), (long long)(abs_timeout))
+#define __sanitizer_syscall_pre___mq_timedreceive50(mqdes, msg_ptr, msg_len, \
+ msg_prio, abs_timeout) \
+ __sanitizer_syscall_pre_impl___mq_timedreceive50( \
+ (long long)(mqdes), (long long)(msg_ptr), (long long)(msg_len), \
+ (long long)(msg_prio), (long long)(abs_timeout))
+#define __sanitizer_syscall_post___mq_timedreceive50( \
+ res, mqdes, msg_ptr, msg_len, msg_prio, abs_timeout) \
+ __sanitizer_syscall_post_impl___mq_timedreceive50( \
+ res, (long long)(mqdes), (long long)(msg_ptr), (long long)(msg_len), \
+ (long long)(msg_prio), (long long)(abs_timeout))
+#define __sanitizer_syscall_pre_compat_60__lwp_park(ts, unpark, hint, \
+ unparkhint) \
+ __sanitizer_syscall_pre_impl_compat_60__lwp_park( \
+ (long long)(ts), (long long)(unpark), (long long)(hint), \
+ (long long)(unparkhint))
+#define __sanitizer_syscall_post_compat_60__lwp_park(res, ts, unpark, hint, \
+ unparkhint) \
+ __sanitizer_syscall_post_impl_compat_60__lwp_park( \
+ res, (long long)(ts), (long long)(unpark), (long long)(hint), \
+ (long long)(unparkhint))
+#define __sanitizer_syscall_pre___kevent50(fd, changelist, nchanges, \
+ eventlist, nevents, timeout) \
+ __sanitizer_syscall_pre_impl___kevent50( \
+ (long long)(fd), (long long)(changelist), (long long)(nchanges), \
+ (long long)(eventlist), (long long)(nevents), (long long)(timeout))
+#define __sanitizer_syscall_post___kevent50(res, fd, changelist, nchanges, \
+ eventlist, nevents, timeout) \
+ __sanitizer_syscall_post_impl___kevent50( \
+ res, (long long)(fd), (long long)(changelist), (long long)(nchanges), \
+ (long long)(eventlist), (long long)(nevents), (long long)(timeout))
+#define __sanitizer_syscall_pre___pselect50(nd, in, ou, ex, ts, mask) \
+ __sanitizer_syscall_pre_impl___pselect50((long long)(nd), (long long)(in), \
+ (long long)(ou), (long long)(ex), \
+ (long long)(ts), (long long)(mask))
+#define __sanitizer_syscall_post___pselect50(res, nd, in, ou, ex, ts, mask) \
+ __sanitizer_syscall_post_impl___pselect50( \
+ res, (long long)(nd), (long long)(in), (long long)(ou), (long long)(ex), \
+ (long long)(ts), (long long)(mask))
+#define __sanitizer_syscall_pre___pollts50(fds, nfds, ts, mask) \
+ __sanitizer_syscall_pre_impl___pollts50((long long)(fds), (long long)(nfds), \
+ (long long)(ts), (long long)(mask))
+#define __sanitizer_syscall_post___pollts50(res, fds, nfds, ts, mask) \
+ __sanitizer_syscall_post_impl___pollts50(res, (long long)(fds), \
+ (long long)(nfds), (long long)(ts), \
+ (long long)(mask))
+#define __sanitizer_syscall_pre___aio_suspend50(list, nent, timeout) \
+ __sanitizer_syscall_pre_impl___aio_suspend50( \
+ (long long)(list), (long long)(nent), (long long)(timeout))
+#define __sanitizer_syscall_post___aio_suspend50(res, list, nent, timeout) \
+ __sanitizer_syscall_post_impl___aio_suspend50( \
+ res, (long long)(list), (long long)(nent), (long long)(timeout))
+#define __sanitizer_syscall_pre___stat50(path, ub) \
+ __sanitizer_syscall_pre_impl___stat50((long long)(path), (long long)(ub))
+#define __sanitizer_syscall_post___stat50(res, path, ub) \
+ __sanitizer_syscall_post_impl___stat50(res, (long long)(path), \
+ (long long)(ub))
+#define __sanitizer_syscall_pre___fstat50(fd, sb) \
+ __sanitizer_syscall_pre_impl___fstat50((long long)(fd), (long long)(sb))
+#define __sanitizer_syscall_post___fstat50(res, fd, sb) \
+ __sanitizer_syscall_post_impl___fstat50(res, (long long)(fd), (long long)(sb))
+#define __sanitizer_syscall_pre___lstat50(path, ub) \
+ __sanitizer_syscall_pre_impl___lstat50((long long)(path), (long long)(ub))
+#define __sanitizer_syscall_post___lstat50(res, path, ub) \
+ __sanitizer_syscall_post_impl___lstat50(res, (long long)(path), \
+ (long long)(ub))
+#define __sanitizer_syscall_pre_____semctl50(semid, semnum, cmd, arg) \
+ __sanitizer_syscall_pre_impl_____semctl50( \
+ (long long)(semid), (long long)(semnum), (long long)(cmd), \
+ (long long)(arg))
+#define __sanitizer_syscall_post_____semctl50(res, semid, semnum, cmd, arg) \
+ __sanitizer_syscall_post_impl_____semctl50( \
+ res, (long long)(semid), (long long)(semnum), (long long)(cmd), \
+ (long long)(arg))
+#define __sanitizer_syscall_pre___shmctl50(shmid, cmd, buf) \
+ __sanitizer_syscall_pre_impl___shmctl50((long long)(shmid), \
+ (long long)(cmd), (long long)(buf))
+#define __sanitizer_syscall_post___shmctl50(res, shmid, cmd, buf) \
+ __sanitizer_syscall_post_impl___shmctl50(res, (long long)(shmid), \
+ (long long)(cmd), (long long)(buf))
+#define __sanitizer_syscall_pre___msgctl50(msqid, cmd, buf) \
+ __sanitizer_syscall_pre_impl___msgctl50((long long)(msqid), \
+ (long long)(cmd), (long long)(buf))
+#define __sanitizer_syscall_post___msgctl50(res, msqid, cmd, buf) \
+ __sanitizer_syscall_post_impl___msgctl50(res, (long long)(msqid), \
+ (long long)(cmd), (long long)(buf))
+#define __sanitizer_syscall_pre___getrusage50(who, rusage) \
+ __sanitizer_syscall_pre_impl___getrusage50((long long)(who), \
+ (long long)(rusage))
+#define __sanitizer_syscall_post___getrusage50(res, who, rusage) \
+ __sanitizer_syscall_post_impl___getrusage50(res, (long long)(who), \
+ (long long)(rusage))
+#define __sanitizer_syscall_pre___timer_settime50(timerid, flags, value, \
+ ovalue) \
+ __sanitizer_syscall_pre_impl___timer_settime50( \
+ (long long)(timerid), (long long)(flags), (long long)(value), \
+ (long long)(ovalue))
+#define __sanitizer_syscall_post___timer_settime50(res, timerid, flags, value, \
+ ovalue) \
+ __sanitizer_syscall_post_impl___timer_settime50( \
+ res, (long long)(timerid), (long long)(flags), (long long)(value), \
+ (long long)(ovalue))
+#define __sanitizer_syscall_pre___timer_gettime50(timerid, value) \
+ __sanitizer_syscall_pre_impl___timer_gettime50((long long)(timerid), \
+ (long long)(value))
+#define __sanitizer_syscall_post___timer_gettime50(res, timerid, value) \
+ __sanitizer_syscall_post_impl___timer_gettime50(res, (long long)(timerid), \
+ (long long)(value))
+#if defined(NTP) || !defined(_KERNEL_OPT)
+#define __sanitizer_syscall_pre___ntp_gettime50(ntvp) \
+ __sanitizer_syscall_pre_impl___ntp_gettime50((long long)(ntvp))
+#define __sanitizer_syscall_post___ntp_gettime50(res, ntvp) \
+ __sanitizer_syscall_post_impl___ntp_gettime50(res, (long long)(ntvp))
+#else
+/* syscall 448 has been skipped */
+#endif
+#define __sanitizer_syscall_pre___wait450(pid, status, options, rusage) \
+ __sanitizer_syscall_pre_impl___wait450( \
+ (long long)(pid), (long long)(status), (long long)(options), \
+ (long long)(rusage))
+#define __sanitizer_syscall_post___wait450(res, pid, status, options, rusage) \
+ __sanitizer_syscall_post_impl___wait450( \
+ res, (long long)(pid), (long long)(status), (long long)(options), \
+ (long long)(rusage))
+#define __sanitizer_syscall_pre___mknod50(path, mode, dev) \
+ __sanitizer_syscall_pre_impl___mknod50((long long)(path), (long long)(mode), \
+ (long long)(dev))
+#define __sanitizer_syscall_post___mknod50(res, path, mode, dev) \
+ __sanitizer_syscall_post_impl___mknod50(res, (long long)(path), \
+ (long long)(mode), (long long)(dev))
+#define __sanitizer_syscall_pre___fhstat50(fhp, fh_size, sb) \
+ __sanitizer_syscall_pre_impl___fhstat50( \
+ (long long)(fhp), (long long)(fh_size), (long long)(sb))
+#define __sanitizer_syscall_post___fhstat50(res, fhp, fh_size, sb) \
+ __sanitizer_syscall_post_impl___fhstat50( \
+ res, (long long)(fhp), (long long)(fh_size), (long long)(sb))
+/* syscall 452 has been skipped */
+#define __sanitizer_syscall_pre_pipe2(fildes, flags) \
+ __sanitizer_syscall_pre_impl_pipe2((long long)(fildes), (long long)(flags))
+#define __sanitizer_syscall_post_pipe2(res, fildes, flags) \
+ __sanitizer_syscall_post_impl_pipe2(res, (long long)(fildes), \
+ (long long)(flags))
+#define __sanitizer_syscall_pre_dup3(from, to, flags) \
+ __sanitizer_syscall_pre_impl_dup3((long long)(from), (long long)(to), \
+ (long long)(flags))
+#define __sanitizer_syscall_post_dup3(res, from, to, flags) \
+ __sanitizer_syscall_post_impl_dup3(res, (long long)(from), (long long)(to), \
+ (long long)(flags))
+#define __sanitizer_syscall_pre_kqueue1(flags) \
+ __sanitizer_syscall_pre_impl_kqueue1((long long)(flags))
+#define __sanitizer_syscall_post_kqueue1(res, flags) \
+ __sanitizer_syscall_post_impl_kqueue1(res, (long long)(flags))
+#define __sanitizer_syscall_pre_paccept(s, name, anamelen, mask, flags) \
+ __sanitizer_syscall_pre_impl_paccept((long long)(s), (long long)(name), \
+ (long long)(anamelen), \
+ (long long)(mask), (long long)(flags))
+#define __sanitizer_syscall_post_paccept(res, s, name, anamelen, mask, flags) \
+ __sanitizer_syscall_post_impl_paccept( \
+ res, (long long)(s), (long long)(name), (long long)(anamelen), \
+ (long long)(mask), (long long)(flags))
+#define __sanitizer_syscall_pre_linkat(fd1, name1, fd2, name2, flags) \
+ __sanitizer_syscall_pre_impl_linkat((long long)(fd1), (long long)(name1), \
+ (long long)(fd2), (long long)(name2), \
+ (long long)(flags))
+#define __sanitizer_syscall_post_linkat(res, fd1, name1, fd2, name2, flags) \
+ __sanitizer_syscall_post_impl_linkat(res, (long long)(fd1), \
+ (long long)(name1), (long long)(fd2), \
+ (long long)(name2), (long long)(flags))
+#define __sanitizer_syscall_pre_renameat(fromfd, from, tofd, to) \
+ __sanitizer_syscall_pre_impl_renameat((long long)(fromfd), \
+ (long long)(from), (long long)(tofd), \
+ (long long)(to))
+#define __sanitizer_syscall_post_renameat(res, fromfd, from, tofd, to) \
+ __sanitizer_syscall_post_impl_renameat(res, (long long)(fromfd), \
+ (long long)(from), (long long)(tofd), \
+ (long long)(to))
+#define __sanitizer_syscall_pre_mkfifoat(fd, path, mode) \
+ __sanitizer_syscall_pre_impl_mkfifoat((long long)(fd), (long long)(path), \
+ (long long)(mode))
+#define __sanitizer_syscall_post_mkfifoat(res, fd, path, mode) \
+ __sanitizer_syscall_post_impl_mkfifoat(res, (long long)(fd), \
+ (long long)(path), (long long)(mode))
+#define __sanitizer_syscall_pre_mknodat(fd, path, mode, PAD, dev) \
+ __sanitizer_syscall_pre_impl_mknodat((long long)(fd), (long long)(path), \
+ (long long)(mode), (long long)(PAD), \
+ (long long)(dev))
+#define __sanitizer_syscall_post_mknodat(res, fd, path, mode, PAD, dev) \
+ __sanitizer_syscall_post_impl_mknodat(res, (long long)(fd), \
+ (long long)(path), (long long)(mode), \
+ (long long)(PAD), (long long)(dev))
+#define __sanitizer_syscall_pre_mkdirat(fd, path, mode) \
+ __sanitizer_syscall_pre_impl_mkdirat((long long)(fd), (long long)(path), \
+ (long long)(mode))
+#define __sanitizer_syscall_post_mkdirat(res, fd, path, mode) \
+ __sanitizer_syscall_post_impl_mkdirat(res, (long long)(fd), \
+ (long long)(path), (long long)(mode))
+#define __sanitizer_syscall_pre_faccessat(fd, path, amode, flag) \
+ __sanitizer_syscall_pre_impl_faccessat((long long)(fd), (long long)(path), \
+ (long long)(amode), \
+ (long long)(flag))
+#define __sanitizer_syscall_post_faccessat(res, fd, path, amode, flag) \
+ __sanitizer_syscall_post_impl_faccessat( \
+ res, (long long)(fd), (long long)(path), (long long)(amode), \
+ (long long)(flag))
+#define __sanitizer_syscall_pre_fchmodat(fd, path, mode, flag) \
+ __sanitizer_syscall_pre_impl_fchmodat((long long)(fd), (long long)(path), \
+ (long long)(mode), (long long)(flag))
+#define __sanitizer_syscall_post_fchmodat(res, fd, path, mode, flag) \
+ __sanitizer_syscall_post_impl_fchmodat(res, (long long)(fd), \
+ (long long)(path), (long long)(mode), \
+ (long long)(flag))
+#define __sanitizer_syscall_pre_fchownat(fd, path, owner, group, flag) \
+ __sanitizer_syscall_pre_impl_fchownat((long long)(fd), (long long)(path), \
+ (long long)(owner), \
+ (long long)(group), (long long)(flag))
+#define __sanitizer_syscall_post_fchownat(res, fd, path, owner, group, flag) \
+ __sanitizer_syscall_post_impl_fchownat( \
+ res, (long long)(fd), (long long)(path), (long long)(owner), \
+ (long long)(group), (long long)(flag))
+#define __sanitizer_syscall_pre_fexecve(fd, argp, envp) \
+ __sanitizer_syscall_pre_impl_fexecve((long long)(fd), (long long)(argp), \
+ (long long)(envp))
+#define __sanitizer_syscall_post_fexecve(res, fd, argp, envp) \
+ __sanitizer_syscall_post_impl_fexecve(res, (long long)(fd), \
+ (long long)(argp), (long long)(envp))
+#define __sanitizer_syscall_pre_fstatat(fd, path, buf, flag) \
+ __sanitizer_syscall_pre_impl_fstatat((long long)(fd), (long long)(path), \
+ (long long)(buf), (long long)(flag))
+#define __sanitizer_syscall_post_fstatat(res, fd, path, buf, flag) \
+ __sanitizer_syscall_post_impl_fstatat(res, (long long)(fd), \
+ (long long)(path), (long long)(buf), \
+ (long long)(flag))
+#define __sanitizer_syscall_pre_utimensat(fd, path, tptr, flag) \
+ __sanitizer_syscall_pre_impl_utimensat((long long)(fd), (long long)(path), \
+ (long long)(tptr), (long long)(flag))
+#define __sanitizer_syscall_post_utimensat(res, fd, path, tptr, flag) \
+ __sanitizer_syscall_post_impl_utimensat( \
+ res, (long long)(fd), (long long)(path), (long long)(tptr), \
+ (long long)(flag))
+#define __sanitizer_syscall_pre_openat(fd, path, oflags, mode) \
+ __sanitizer_syscall_pre_impl_openat((long long)(fd), (long long)(path), \
+ (long long)(oflags), (long long)(mode))
+#define __sanitizer_syscall_post_openat(res, fd, path, oflags, mode) \
+ __sanitizer_syscall_post_impl_openat(res, (long long)(fd), \
+ (long long)(path), (long long)(oflags), \
+ (long long)(mode))
+#define __sanitizer_syscall_pre_readlinkat(fd, path, buf, bufsize) \
+ __sanitizer_syscall_pre_impl_readlinkat((long long)(fd), (long long)(path), \
+ (long long)(buf), \
+ (long long)(bufsize))
+#define __sanitizer_syscall_post_readlinkat(res, fd, path, buf, bufsize) \
+ __sanitizer_syscall_post_impl_readlinkat( \
+ res, (long long)(fd), (long long)(path), (long long)(buf), \
+ (long long)(bufsize))
+#define __sanitizer_syscall_pre_symlinkat(path1, fd, path2) \
+ __sanitizer_syscall_pre_impl_symlinkat((long long)(path1), (long long)(fd), \
+ (long long)(path2))
+#define __sanitizer_syscall_post_symlinkat(res, path1, fd, path2) \
+ __sanitizer_syscall_post_impl_symlinkat(res, (long long)(path1), \
+ (long long)(fd), (long long)(path2))
+#define __sanitizer_syscall_pre_unlinkat(fd, path, flag) \
+ __sanitizer_syscall_pre_impl_unlinkat((long long)(fd), (long long)(path), \
+ (long long)(flag))
+#define __sanitizer_syscall_post_unlinkat(res, fd, path, flag) \
+ __sanitizer_syscall_post_impl_unlinkat(res, (long long)(fd), \
+ (long long)(path), (long long)(flag))
+#define __sanitizer_syscall_pre_futimens(fd, tptr) \
+ __sanitizer_syscall_pre_impl_futimens((long long)(fd), (long long)(tptr))
+#define __sanitizer_syscall_post_futimens(res, fd, tptr) \
+ __sanitizer_syscall_post_impl_futimens(res, (long long)(fd), \
+ (long long)(tptr))
+#define __sanitizer_syscall_pre___quotactl(path, args) \
+ __sanitizer_syscall_pre_impl___quotactl((long long)(path), (long long)(args))
+#define __sanitizer_syscall_post___quotactl(res, path, args) \
+ __sanitizer_syscall_post_impl___quotactl(res, (long long)(path), \
+ (long long)(args))
+#define __sanitizer_syscall_pre_posix_spawn(pid, path, file_actions, attrp, \
+ argv, envp) \
+ __sanitizer_syscall_pre_impl_posix_spawn( \
+ (long long)(pid), (long long)(path), (long long)(file_actions), \
+ (long long)(attrp), (long long)(argv), (long long)(envp))
+#define __sanitizer_syscall_post_posix_spawn(res, pid, path, file_actions, \
+ attrp, argv, envp) \
+ __sanitizer_syscall_post_impl_posix_spawn( \
+ res, (long long)(pid), (long long)(path), (long long)(file_actions), \
+ (long long)(attrp), (long long)(argv), (long long)(envp))
+#define __sanitizer_syscall_pre_recvmmsg(s, mmsg, vlen, flags, timeout) \
+ __sanitizer_syscall_pre_impl_recvmmsg((long long)(s), (long long)(mmsg), \
+ (long long)(vlen), (long long)(flags), \
+ (long long)(timeout))
+#define __sanitizer_syscall_post_recvmmsg(res, s, mmsg, vlen, flags, timeout) \
+ __sanitizer_syscall_post_impl_recvmmsg( \
+ res, (long long)(s), (long long)(mmsg), (long long)(vlen), \
+ (long long)(flags), (long long)(timeout))
+#define __sanitizer_syscall_pre_sendmmsg(s, mmsg, vlen, flags) \
+ __sanitizer_syscall_pre_impl_sendmmsg((long long)(s), (long long)(mmsg), \
+ (long long)(vlen), (long long)(flags))
+#define __sanitizer_syscall_post_sendmmsg(res, s, mmsg, vlen, flags) \
+ __sanitizer_syscall_post_impl_sendmmsg(res, (long long)(s), \
+ (long long)(mmsg), (long long)(vlen), \
+ (long long)(flags))
+#define __sanitizer_syscall_pre_clock_nanosleep(clock_id, flags, rqtp, rmtp) \
+ __sanitizer_syscall_pre_impl_clock_nanosleep( \
+ (long long)(clock_id), (long long)(flags), (long long)(rqtp), \
+ (long long)(rmtp))
+#define __sanitizer_syscall_post_clock_nanosleep(res, clock_id, flags, rqtp, \
+ rmtp) \
+ __sanitizer_syscall_post_impl_clock_nanosleep( \
+ res, (long long)(clock_id), (long long)(flags), (long long)(rqtp), \
+ (long long)(rmtp))
+#define __sanitizer_syscall_pre____lwp_park60(clock_id, flags, ts, unpark, \
+ hint, unparkhint) \
+ __sanitizer_syscall_pre_impl____lwp_park60( \
+ (long long)(clock_id), (long long)(flags), (long long)(ts), \
+ (long long)(unpark), (long long)(hint), (long long)(unparkhint))
+#define __sanitizer_syscall_post____lwp_park60(res, clock_id, flags, ts, \
+ unpark, hint, unparkhint) \
+ __sanitizer_syscall_post_impl____lwp_park60( \
+ res, (long long)(clock_id), (long long)(flags), (long long)(ts), \
+ (long long)(unpark), (long long)(hint), (long long)(unparkhint))
+#define __sanitizer_syscall_pre_posix_fallocate(fd, PAD, pos, len) \
+ __sanitizer_syscall_pre_impl_posix_fallocate( \
+ (long long)(fd), (long long)(PAD), (long long)(pos), (long long)(len))
+#define __sanitizer_syscall_post_posix_fallocate(res, fd, PAD, pos, len) \
+ __sanitizer_syscall_post_impl_posix_fallocate( \
+ res, (long long)(fd), (long long)(PAD), (long long)(pos), \
+ (long long)(len))
+#define __sanitizer_syscall_pre_fdiscard(fd, PAD, pos, len) \
+ __sanitizer_syscall_pre_impl_fdiscard((long long)(fd), (long long)(PAD), \
+ (long long)(pos), (long long)(len))
+#define __sanitizer_syscall_post_fdiscard(res, fd, PAD, pos, len) \
+ __sanitizer_syscall_post_impl_fdiscard(res, (long long)(fd), \
+ (long long)(PAD), (long long)(pos), \
+ (long long)(len))
+#define __sanitizer_syscall_pre_wait6(idtype, id, status, options, wru, info) \
+ __sanitizer_syscall_pre_impl_wait6( \
+ (long long)(idtype), (long long)(id), (long long)(status), \
+ (long long)(options), (long long)(wru), (long long)(info))
+#define __sanitizer_syscall_post_wait6(res, idtype, id, status, options, wru, \
+ info) \
+ __sanitizer_syscall_post_impl_wait6( \
+ res, (long long)(idtype), (long long)(id), (long long)(status), \
+ (long long)(options), (long long)(wru), (long long)(info))
+#define __sanitizer_syscall_pre_clock_getcpuclockid2(idtype, id, clock_id) \
+ __sanitizer_syscall_pre_impl_clock_getcpuclockid2( \
+ (long long)(idtype), (long long)(id), (long long)(clock_id))
+#define __sanitizer_syscall_post_clock_getcpuclockid2(res, idtype, id, \
+ clock_id) \
+ __sanitizer_syscall_post_impl_clock_getcpuclockid2( \
+ res, (long long)(idtype), (long long)(id), (long long)(clock_id))
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+// Private declarations. Do not call directly from user code. Use macros above.
+
+// DO NOT EDIT! THIS FILE HAS BEEN GENERATED!
+
+void __sanitizer_syscall_pre_impl_syscall(long long code, long long arg0,
+ long long arg1, long long arg2,
+ long long arg3, long long arg4,
+ long long arg5, long long arg6,
+ long long arg7);
+void __sanitizer_syscall_post_impl_syscall(long long res, long long code,
+ long long arg0, long long arg1,
+ long long arg2, long long arg3,
+ long long arg4, long long arg5,
+ long long arg6, long long arg7);
+void __sanitizer_syscall_pre_impl_exit(long long rval);
+void __sanitizer_syscall_post_impl_exit(long long res, long long rval);
+void __sanitizer_syscall_pre_impl_fork(void);
+void __sanitizer_syscall_post_impl_fork(long long res);
+void __sanitizer_syscall_pre_impl_read(long long fd, long long buf,
+ long long nbyte);
+void __sanitizer_syscall_post_impl_read(long long res, long long fd,
+ long long buf, long long nbyte);
+void __sanitizer_syscall_pre_impl_write(long long fd, long long buf,
+ long long nbyte);
+void __sanitizer_syscall_post_impl_write(long long res, long long fd,
+ long long buf, long long nbyte);
+void __sanitizer_syscall_pre_impl_open(long long path, long long flags,
+ long long mode);
+void __sanitizer_syscall_post_impl_open(long long res, long long path,
+ long long flags, long long mode);
+void __sanitizer_syscall_pre_impl_close(long long fd);
+void __sanitizer_syscall_post_impl_close(long long res, long long fd);
+void __sanitizer_syscall_pre_impl_compat_50_wait4(long long pid,
+ long long status,
+ long long options,
+ long long rusage);
+void __sanitizer_syscall_post_impl_compat_50_wait4(long long res, long long pid,
+ long long status,
+ long long options,
+ long long rusage);
+void __sanitizer_syscall_pre_impl_compat_43_ocreat(long long path,
+ long long mode);
+void __sanitizer_syscall_post_impl_compat_43_ocreat(long long res,
+ long long path,
+ long long mode);
+void __sanitizer_syscall_pre_impl_link(long long path, long long link);
+void __sanitizer_syscall_post_impl_link(long long res, long long path,
+ long long link);
+void __sanitizer_syscall_pre_impl_unlink(long long path);
+void __sanitizer_syscall_post_impl_unlink(long long res, long long path);
+/* syscall 11 has been skipped */
+void __sanitizer_syscall_pre_impl_chdir(long long path);
+void __sanitizer_syscall_post_impl_chdir(long long res, long long path);
+void __sanitizer_syscall_pre_impl_fchdir(long long fd);
+void __sanitizer_syscall_post_impl_fchdir(long long res, long long fd);
+void __sanitizer_syscall_pre_impl_compat_50_mknod(long long path,
+ long long mode,
+ long long dev);
+void __sanitizer_syscall_post_impl_compat_50_mknod(long long res,
+ long long path,
+ long long mode,
+ long long dev);
+void __sanitizer_syscall_pre_impl_chmod(long long path, long long mode);
+void __sanitizer_syscall_post_impl_chmod(long long res, long long path,
+ long long mode);
+void __sanitizer_syscall_pre_impl_chown(long long path, long long uid,
+ long long gid);
+void __sanitizer_syscall_post_impl_chown(long long res, long long path,
+ long long uid, long long gid);
+void __sanitizer_syscall_pre_impl_break(long long nsize);
+void __sanitizer_syscall_post_impl_break(long long res, long long nsize);
+void __sanitizer_syscall_pre_impl_compat_20_getfsstat(long long buf,
+ long long bufsize,
+ long long flags);
+void __sanitizer_syscall_post_impl_compat_20_getfsstat(long long res,
+ long long buf,
+ long long bufsize,
+ long long flags);
+void __sanitizer_syscall_pre_impl_compat_43_olseek(long long fd,
+ long long offset,
+ long long whence);
+void __sanitizer_syscall_post_impl_compat_43_olseek(long long res, long long fd,
+ long long offset,
+ long long whence);
+void __sanitizer_syscall_pre_impl_getpid(void);
+void __sanitizer_syscall_post_impl_getpid(long long res);
+void __sanitizer_syscall_pre_impl_compat_40_mount(long long type,
+ long long path,
+ long long flags,
+ long long data);
+void __sanitizer_syscall_post_impl_compat_40_mount(long long res,
+ long long type,
+ long long path,
+ long long flags,
+ long long data);
+void __sanitizer_syscall_pre_impl_unmount(long long path, long long flags);
+void __sanitizer_syscall_post_impl_unmount(long long res, long long path,
+ long long flags);
+void __sanitizer_syscall_pre_impl_setuid(long long uid);
+void __sanitizer_syscall_post_impl_setuid(long long res, long long uid);
+void __sanitizer_syscall_pre_impl_getuid(void);
+void __sanitizer_syscall_post_impl_getuid(long long res);
+void __sanitizer_syscall_pre_impl_geteuid(void);
+void __sanitizer_syscall_post_impl_geteuid(long long res);
+void __sanitizer_syscall_pre_impl_ptrace(long long req, long long pid,
+ long long addr, long long data);
+void __sanitizer_syscall_post_impl_ptrace(long long res, long long req,
+ long long pid, long long addr,
+ long long data);
+void __sanitizer_syscall_pre_impl_recvmsg(long long s, long long msg,
+ long long flags);
+void __sanitizer_syscall_post_impl_recvmsg(long long res, long long s,
+ long long msg, long long flags);
+void __sanitizer_syscall_pre_impl_sendmsg(long long s, long long msg,
+ long long flags);
+void __sanitizer_syscall_post_impl_sendmsg(long long res, long long s,
+ long long msg, long long flags);
+void __sanitizer_syscall_pre_impl_recvfrom(long long s, long long buf,
+ long long len, long long flags,
+ long long from,
+ long long fromlenaddr);
+void __sanitizer_syscall_post_impl_recvfrom(long long res, long long s,
+ long long buf, long long len,
+ long long flags, long long from,
+ long long fromlenaddr);
+void __sanitizer_syscall_pre_impl_accept(long long s, long long name,
+ long long anamelen);
+void __sanitizer_syscall_post_impl_accept(long long res, long long s,
+ long long name, long long anamelen);
+void __sanitizer_syscall_pre_impl_getpeername(long long fdes, long long asa,
+ long long alen);
+void __sanitizer_syscall_post_impl_getpeername(long long res, long long fdes,
+ long long asa, long long alen);
+void __sanitizer_syscall_pre_impl_getsockname(long long fdes, long long asa,
+ long long alen);
+void __sanitizer_syscall_post_impl_getsockname(long long res, long long fdes,
+ long long asa, long long alen);
+void __sanitizer_syscall_pre_impl_access(long long path, long long flags);
+void __sanitizer_syscall_post_impl_access(long long res, long long path,
+ long long flags);
+void __sanitizer_syscall_pre_impl_chflags(long long path, long long flags);
+void __sanitizer_syscall_post_impl_chflags(long long res, long long path,
+ long long flags);
+void __sanitizer_syscall_pre_impl_fchflags(long long fd, long long flags);
+void __sanitizer_syscall_post_impl_fchflags(long long res, long long fd,
+ long long flags);
+void __sanitizer_syscall_pre_impl_sync(void);
+void __sanitizer_syscall_post_impl_sync(long long res);
+void __sanitizer_syscall_pre_impl_kill(long long pid, long long signum);
+void __sanitizer_syscall_post_impl_kill(long long res, long long pid,
+ long long signum);
+void __sanitizer_syscall_pre_impl_compat_43_stat43(long long path,
+ long long ub);
+void __sanitizer_syscall_post_impl_compat_43_stat43(long long res,
+ long long path,
+ long long ub);
+void __sanitizer_syscall_pre_impl_getppid(void);
+void __sanitizer_syscall_post_impl_getppid(long long res);
+void __sanitizer_syscall_pre_impl_compat_43_lstat43(long long path,
+ long long ub);
+void __sanitizer_syscall_post_impl_compat_43_lstat43(long long res,
+ long long path,
+ long long ub);
+void __sanitizer_syscall_pre_impl_dup(long long fd);
+void __sanitizer_syscall_post_impl_dup(long long res, long long fd);
+void __sanitizer_syscall_pre_impl_pipe(void);
+void __sanitizer_syscall_post_impl_pipe(long long res);
+void __sanitizer_syscall_pre_impl_getegid(void);
+void __sanitizer_syscall_post_impl_getegid(long long res);
+void __sanitizer_syscall_pre_impl_profil(long long samples, long long size,
+ long long offset, long long scale);
+void __sanitizer_syscall_post_impl_profil(long long res, long long samples,
+ long long size, long long offset,
+ long long scale);
+void __sanitizer_syscall_pre_impl_ktrace(long long fname, long long ops,
+ long long facs, long long pid);
+void __sanitizer_syscall_post_impl_ktrace(long long res, long long fname,
+ long long ops, long long facs,
+ long long pid);
+void __sanitizer_syscall_pre_impl_compat_13_sigaction13(long long signum,
+ long long nsa,
+ long long osa);
+void __sanitizer_syscall_post_impl_compat_13_sigaction13(long long res,
+ long long signum,
+ long long nsa,
+ long long osa);
+void __sanitizer_syscall_pre_impl_getgid(void);
+void __sanitizer_syscall_post_impl_getgid(long long res);
+void __sanitizer_syscall_pre_impl_compat_13_sigprocmask13(long long how,
+ long long mask);
+void __sanitizer_syscall_post_impl_compat_13_sigprocmask13(long long res,
+ long long how,
+ long long mask);
+void __sanitizer_syscall_pre_impl___getlogin(long long namebuf,
+ long long namelen);
+void __sanitizer_syscall_post_impl___getlogin(long long res, long long namebuf,
+ long long namelen);
+void __sanitizer_syscall_pre_impl___setlogin(long long namebuf);
+void __sanitizer_syscall_post_impl___setlogin(long long res, long long namebuf);
+void __sanitizer_syscall_pre_impl_acct(long long path);
+void __sanitizer_syscall_post_impl_acct(long long res, long long path);
+void __sanitizer_syscall_pre_impl_compat_13_sigpending13(void);
+void __sanitizer_syscall_post_impl_compat_13_sigpending13(long long res);
+void __sanitizer_syscall_pre_impl_compat_13_sigaltstack13(long long nss,
+ long long oss);
+void __sanitizer_syscall_post_impl_compat_13_sigaltstack13(long long res,
+ long long nss,
+ long long oss);
+void __sanitizer_syscall_pre_impl_ioctl(long long fd, long long com,
+ long long data);
+void __sanitizer_syscall_post_impl_ioctl(long long res, long long fd,
+ long long com, long long data);
+void __sanitizer_syscall_pre_impl_compat_12_oreboot(long long opt);
+void __sanitizer_syscall_post_impl_compat_12_oreboot(long long res,
+ long long opt);
+void __sanitizer_syscall_pre_impl_revoke(long long path);
+void __sanitizer_syscall_post_impl_revoke(long long res, long long path);
+void __sanitizer_syscall_pre_impl_symlink(long long path, long long link);
+void __sanitizer_syscall_post_impl_symlink(long long res, long long path,
+ long long link);
+void __sanitizer_syscall_pre_impl_readlink(long long path, long long buf,
+ long long count);
+void __sanitizer_syscall_post_impl_readlink(long long res, long long path,
+ long long buf, long long count);
+void __sanitizer_syscall_pre_impl_execve(long long path, long long argp,
+ long long envp);
+void __sanitizer_syscall_post_impl_execve(long long res, long long path,
+ long long argp, long long envp);
+void __sanitizer_syscall_pre_impl_umask(long long newmask);
+void __sanitizer_syscall_post_impl_umask(long long res, long long newmask);
+void __sanitizer_syscall_pre_impl_chroot(long long path);
+void __sanitizer_syscall_post_impl_chroot(long long res, long long path);
+void __sanitizer_syscall_pre_impl_compat_43_fstat43(long long fd, long long sb);
+void __sanitizer_syscall_post_impl_compat_43_fstat43(long long res,
+ long long fd,
+ long long sb);
+void __sanitizer_syscall_pre_impl_compat_43_ogetkerninfo(long long op,
+ long long where,
+ long long size,
+ long long arg);
+void __sanitizer_syscall_post_impl_compat_43_ogetkerninfo(long long res,
+ long long op,
+ long long where,
+ long long size,
+ long long arg);
+void __sanitizer_syscall_pre_impl_compat_43_ogetpagesize(void);
+void __sanitizer_syscall_post_impl_compat_43_ogetpagesize(long long res);
+void __sanitizer_syscall_pre_impl_compat_12_msync(long long addr,
+ long long len);
+void __sanitizer_syscall_post_impl_compat_12_msync(long long res,
+ long long addr,
+ long long len);
+void __sanitizer_syscall_pre_impl_vfork(void);
+void __sanitizer_syscall_post_impl_vfork(long long res);
+/* syscall 67 has been skipped */
+/* syscall 68 has been skipped */
+/* syscall 69 has been skipped */
+/* syscall 70 has been skipped */
+void __sanitizer_syscall_pre_impl_compat_43_ommap(long long addr, long long len,
+ long long prot,
+ long long flags, long long fd,
+ long long pos);
+void __sanitizer_syscall_post_impl_compat_43_ommap(
+ long long res, long long addr, long long len, long long prot,
+ long long flags, long long fd, long long pos);
+void __sanitizer_syscall_pre_impl_vadvise(long long anom);
+void __sanitizer_syscall_post_impl_vadvise(long long res, long long anom);
+void __sanitizer_syscall_pre_impl_munmap(long long addr, long long len);
+void __sanitizer_syscall_post_impl_munmap(long long res, long long addr,
+ long long len);
+void __sanitizer_syscall_pre_impl_mprotect(long long addr, long long len,
+ long long prot);
+void __sanitizer_syscall_post_impl_mprotect(long long res, long long addr,
+ long long len, long long prot);
+void __sanitizer_syscall_pre_impl_madvise(long long addr, long long len,
+ long long behav);
+void __sanitizer_syscall_post_impl_madvise(long long res, long long addr,
+ long long len, long long behav);
+/* syscall 76 has been skipped */
+/* syscall 77 has been skipped */
+void __sanitizer_syscall_pre_impl_mincore(long long addr, long long len,
+ long long vec);
+void __sanitizer_syscall_post_impl_mincore(long long res, long long addr,
+ long long len, long long vec);
+void __sanitizer_syscall_pre_impl_getgroups(long long gidsetsize,
+ long long gidset);
+void __sanitizer_syscall_post_impl_getgroups(long long res,
+ long long gidsetsize,
+ long long gidset);
+void __sanitizer_syscall_pre_impl_setgroups(long long gidsetsize,
+ long long gidset);
+void __sanitizer_syscall_post_impl_setgroups(long long res,
+ long long gidsetsize,
+ long long gidset);
+void __sanitizer_syscall_pre_impl_getpgrp(void);
+void __sanitizer_syscall_post_impl_getpgrp(long long res);
+void __sanitizer_syscall_pre_impl_setpgid(long long pid, long long pgid);
+void __sanitizer_syscall_post_impl_setpgid(long long res, long long pid,
+ long long pgid);
+void __sanitizer_syscall_pre_impl_compat_50_setitimer(long long which,
+ long long itv,
+ long long oitv);
+void __sanitizer_syscall_post_impl_compat_50_setitimer(long long res,
+ long long which,
+ long long itv,
+ long long oitv);
+void __sanitizer_syscall_pre_impl_compat_43_owait(void);
+void __sanitizer_syscall_post_impl_compat_43_owait(long long res);
+void __sanitizer_syscall_pre_impl_compat_12_oswapon(long long name);
+void __sanitizer_syscall_post_impl_compat_12_oswapon(long long res,
+ long long name);
+void __sanitizer_syscall_pre_impl_compat_50_getitimer(long long which,
+ long long itv);
+void __sanitizer_syscall_post_impl_compat_50_getitimer(long long res,
+ long long which,
+ long long itv);
+void __sanitizer_syscall_pre_impl_compat_43_ogethostname(long long hostname,
+ long long len);
+void __sanitizer_syscall_post_impl_compat_43_ogethostname(long long res,
+ long long hostname,
+ long long len);
+void __sanitizer_syscall_pre_impl_compat_43_osethostname(long long hostname,
+ long long len);
+void __sanitizer_syscall_post_impl_compat_43_osethostname(long long res,
+ long long hostname,
+ long long len);
+void __sanitizer_syscall_pre_impl_compat_43_ogetdtablesize(void);
+void __sanitizer_syscall_post_impl_compat_43_ogetdtablesize(long long res);
+void __sanitizer_syscall_pre_impl_dup2(long long from, long long to);
+void __sanitizer_syscall_post_impl_dup2(long long res, long long from,
+ long long to);
+/* syscall 91 has been skipped */
+void __sanitizer_syscall_pre_impl_fcntl(long long fd, long long cmd,
+ long long arg);
+void __sanitizer_syscall_post_impl_fcntl(long long res, long long fd,
+ long long cmd, long long arg);
+void __sanitizer_syscall_pre_impl_compat_50_select(long long nd, long long in,
+ long long ou, long long ex,
+ long long tv);
+void __sanitizer_syscall_post_impl_compat_50_select(long long res, long long nd,
+ long long in, long long ou,
+ long long ex, long long tv);
+/* syscall 94 has been skipped */
+void __sanitizer_syscall_pre_impl_fsync(long long fd);
+void __sanitizer_syscall_post_impl_fsync(long long res, long long fd);
+void __sanitizer_syscall_pre_impl_setpriority(long long which, long long who,
+ long long prio);
+void __sanitizer_syscall_post_impl_setpriority(long long res, long long which,
+ long long who, long long prio);
+void __sanitizer_syscall_pre_impl_compat_30_socket(long long domain,
+ long long type,
+ long long protocol);
+void __sanitizer_syscall_post_impl_compat_30_socket(long long res,
+ long long domain,
+ long long type,
+ long long protocol);
+void __sanitizer_syscall_pre_impl_connect(long long s, long long name,
+ long long namelen);
+void __sanitizer_syscall_post_impl_connect(long long res, long long s,
+ long long name, long long namelen);
+void __sanitizer_syscall_pre_impl_compat_43_oaccept(long long s, long long name,
+ long long anamelen);
+void __sanitizer_syscall_post_impl_compat_43_oaccept(long long res, long long s,
+ long long name,
+ long long anamelen);
+void __sanitizer_syscall_pre_impl_getpriority(long long which, long long who);
+void __sanitizer_syscall_post_impl_getpriority(long long res, long long which,
+ long long who);
+void __sanitizer_syscall_pre_impl_compat_43_osend(long long s, long long buf,
+ long long len,
+ long long flags);
+void __sanitizer_syscall_post_impl_compat_43_osend(long long res, long long s,
+ long long buf, long long len,
+ long long flags);
+void __sanitizer_syscall_pre_impl_compat_43_orecv(long long s, long long buf,
+ long long len,
+ long long flags);
+void __sanitizer_syscall_post_impl_compat_43_orecv(long long res, long long s,
+ long long buf, long long len,
+ long long flags);
+void __sanitizer_syscall_pre_impl_compat_13_sigreturn13(long long sigcntxp);
+void __sanitizer_syscall_post_impl_compat_13_sigreturn13(long long res,
+ long long sigcntxp);
+void __sanitizer_syscall_pre_impl_bind(long long s, long long name,
+ long long namelen);
+void __sanitizer_syscall_post_impl_bind(long long res, long long s,
+ long long name, long long namelen);
+void __sanitizer_syscall_pre_impl_setsockopt(long long s, long long level,
+ long long name, long long val,
+ long long valsize);
+void __sanitizer_syscall_post_impl_setsockopt(long long res, long long s,
+ long long level, long long name,
+ long long val, long long valsize);
+void __sanitizer_syscall_pre_impl_listen(long long s, long long backlog);
+void __sanitizer_syscall_post_impl_listen(long long res, long long s,
+ long long backlog);
+/* syscall 107 has been skipped */
+void __sanitizer_syscall_pre_impl_compat_43_osigvec(long long signum,
+ long long nsv,
+ long long osv);
+void __sanitizer_syscall_post_impl_compat_43_osigvec(long long res,
+ long long signum,
+ long long nsv,
+ long long osv);
+void __sanitizer_syscall_pre_impl_compat_43_osigblock(long long mask);
+void __sanitizer_syscall_post_impl_compat_43_osigblock(long long res,
+ long long mask);
+void __sanitizer_syscall_pre_impl_compat_43_osigsetmask(long long mask);
+void __sanitizer_syscall_post_impl_compat_43_osigsetmask(long long res,
+ long long mask);
+void __sanitizer_syscall_pre_impl_compat_13_sigsuspend13(long long mask);
+void __sanitizer_syscall_post_impl_compat_13_sigsuspend13(long long res,
+ long long mask);
+void __sanitizer_syscall_pre_impl_compat_43_osigstack(long long nss,
+ long long oss);
+void __sanitizer_syscall_post_impl_compat_43_osigstack(long long res,
+ long long nss,
+ long long oss);
+void __sanitizer_syscall_pre_impl_compat_43_orecvmsg(long long s, long long msg,
+ long long flags);
+void __sanitizer_syscall_post_impl_compat_43_orecvmsg(long long res,
+ long long s,
+ long long msg,
+ long long flags);
+void __sanitizer_syscall_pre_impl_compat_43_osendmsg(long long s, long long msg,
+ long long flags);
+void __sanitizer_syscall_post_impl_compat_43_osendmsg(long long res,
+ long long s,
+ long long msg,
+ long long flags);
+/* syscall 115 has been skipped */
+void __sanitizer_syscall_pre_impl_compat_50_gettimeofday(long long tp,
+ long long tzp);
+void __sanitizer_syscall_post_impl_compat_50_gettimeofday(long long res,
+ long long tp,
+ long long tzp);
+void __sanitizer_syscall_pre_impl_compat_50_getrusage(long long who,
+ long long rusage);
+void __sanitizer_syscall_post_impl_compat_50_getrusage(long long res,
+ long long who,
+ long long rusage);
+void __sanitizer_syscall_pre_impl_getsockopt(long long s, long long level,
+ long long name, long long val,
+ long long avalsize);
+void __sanitizer_syscall_post_impl_getsockopt(long long res, long long s,
+ long long level, long long name,
+ long long val,
+ long long avalsize);
+/* syscall 119 has been skipped */
+void __sanitizer_syscall_pre_impl_readv(long long fd, long long iovp,
+ long long iovcnt);
+void __sanitizer_syscall_post_impl_readv(long long res, long long fd,
+ long long iovp, long long iovcnt);
+void __sanitizer_syscall_pre_impl_writev(long long fd, long long iovp,
+ long long iovcnt);
+void __sanitizer_syscall_post_impl_writev(long long res, long long fd,
+ long long iovp, long long iovcnt);
+void __sanitizer_syscall_pre_impl_compat_50_settimeofday(long long tv,
+ long long tzp);
+void __sanitizer_syscall_post_impl_compat_50_settimeofday(long long res,
+ long long tv,
+ long long tzp);
+void __sanitizer_syscall_pre_impl_fchown(long long fd, long long uid,
+ long long gid);
+void __sanitizer_syscall_post_impl_fchown(long long res, long long fd,
+ long long uid, long long gid);
+void __sanitizer_syscall_pre_impl_fchmod(long long fd, long long mode);
+void __sanitizer_syscall_post_impl_fchmod(long long res, long long fd,
+ long long mode);
+void __sanitizer_syscall_pre_impl_compat_43_orecvfrom(
+ long long s, long long buf, long long len, long long flags, long long from,
+ long long fromlenaddr);
+void __sanitizer_syscall_post_impl_compat_43_orecvfrom(
+ long long res, long long s, long long buf, long long len, long long flags,
+ long long from, long long fromlenaddr);
+void __sanitizer_syscall_pre_impl_setreuid(long long ruid, long long euid);
+void __sanitizer_syscall_post_impl_setreuid(long long res, long long ruid,
+ long long euid);
+void __sanitizer_syscall_pre_impl_setregid(long long rgid, long long egid);
+void __sanitizer_syscall_post_impl_setregid(long long res, long long rgid,
+ long long egid);
+void __sanitizer_syscall_pre_impl_rename(long long from, long long to);
+void __sanitizer_syscall_post_impl_rename(long long res, long long from,
+ long long to);
+void __sanitizer_syscall_pre_impl_compat_43_otruncate(long long path,
+ long long length);
+void __sanitizer_syscall_post_impl_compat_43_otruncate(long long res,
+ long long path,
+ long long length);
+void __sanitizer_syscall_pre_impl_compat_43_oftruncate(long long fd,
+ long long length);
+void __sanitizer_syscall_post_impl_compat_43_oftruncate(long long res,
+ long long fd,
+ long long length);
+void __sanitizer_syscall_pre_impl_flock(long long fd, long long how);
+void __sanitizer_syscall_post_impl_flock(long long res, long long fd,
+ long long how);
+void __sanitizer_syscall_pre_impl_mkfifo(long long path, long long mode);
+void __sanitizer_syscall_post_impl_mkfifo(long long res, long long path,
+ long long mode);
+void __sanitizer_syscall_pre_impl_sendto(long long s, long long buf,
+ long long len, long long flags,
+ long long to, long long tolen);
+void __sanitizer_syscall_post_impl_sendto(long long res, long long s,
+ long long buf, long long len,
+ long long flags, long long to,
+ long long tolen);
+void __sanitizer_syscall_pre_impl_shutdown(long long s, long long how);
+void __sanitizer_syscall_post_impl_shutdown(long long res, long long s,
+ long long how);
+void __sanitizer_syscall_pre_impl_socketpair(long long domain, long long type,
+ long long protocol, long long rsv);
+void __sanitizer_syscall_post_impl_socketpair(long long res, long long domain,
+ long long type,
+ long long protocol,
+ long long rsv);
+void __sanitizer_syscall_pre_impl_mkdir(long long path, long long mode);
+void __sanitizer_syscall_post_impl_mkdir(long long res, long long path,
+ long long mode);
+void __sanitizer_syscall_pre_impl_rmdir(long long path);
+void __sanitizer_syscall_post_impl_rmdir(long long res, long long path);
+void __sanitizer_syscall_pre_impl_compat_50_utimes(long long path,
+ long long tptr);
+void __sanitizer_syscall_post_impl_compat_50_utimes(long long res,
+ long long path,
+ long long tptr);
+/* syscall 139 has been skipped */
+void __sanitizer_syscall_pre_impl_compat_50_adjtime(long long delta,
+ long long olddelta);
+void __sanitizer_syscall_post_impl_compat_50_adjtime(long long res,
+ long long delta,
+ long long olddelta);
+void __sanitizer_syscall_pre_impl_compat_43_ogetpeername(long long fdes,
+ long long asa,
+ long long alen);
+void __sanitizer_syscall_post_impl_compat_43_ogetpeername(long long res,
+ long long fdes,
+ long long asa,
+ long long alen);
+void __sanitizer_syscall_pre_impl_compat_43_ogethostid(void);
+void __sanitizer_syscall_post_impl_compat_43_ogethostid(long long res);
+void __sanitizer_syscall_pre_impl_compat_43_osethostid(long long hostid);
+void __sanitizer_syscall_post_impl_compat_43_osethostid(long long res,
+ long long hostid);
+void __sanitizer_syscall_pre_impl_compat_43_ogetrlimit(long long which,
+ long long rlp);
+void __sanitizer_syscall_post_impl_compat_43_ogetrlimit(long long res,
+ long long which,
+ long long rlp);
+void __sanitizer_syscall_pre_impl_compat_43_osetrlimit(long long which,
+ long long rlp);
+void __sanitizer_syscall_post_impl_compat_43_osetrlimit(long long res,
+ long long which,
+ long long rlp);
+void __sanitizer_syscall_pre_impl_compat_43_okillpg(long long pgid,
+ long long signum);
+void __sanitizer_syscall_post_impl_compat_43_okillpg(long long res,
+ long long pgid,
+ long long signum);
+void __sanitizer_syscall_pre_impl_setsid(void);
+void __sanitizer_syscall_post_impl_setsid(long long res);
+void __sanitizer_syscall_pre_impl_compat_50_quotactl(long long path,
+ long long cmd,
+ long long uid,
+ long long arg);
+void __sanitizer_syscall_post_impl_compat_50_quotactl(
+ long long res, long long path, long long cmd, long long uid, long long arg);
+void __sanitizer_syscall_pre_impl_compat_43_oquota(void);
+void __sanitizer_syscall_post_impl_compat_43_oquota(long long res);
+void __sanitizer_syscall_pre_impl_compat_43_ogetsockname(long long fdec,
+ long long asa,
+ long long alen);
+void __sanitizer_syscall_post_impl_compat_43_ogetsockname(long long res,
+ long long fdec,
+ long long asa,
+ long long alen);
+/* syscall 151 has been skipped */
+/* syscall 152 has been skipped */
+/* syscall 153 has been skipped */
+/* syscall 154 has been skipped */
+void __sanitizer_syscall_pre_impl_nfssvc(long long flag, long long argp);
+void __sanitizer_syscall_post_impl_nfssvc(long long res, long long flag,
+ long long argp);
+void __sanitizer_syscall_pre_impl_compat_43_ogetdirentries(long long fd,
+ long long buf,
+ long long count,
+ long long basep);
+void __sanitizer_syscall_post_impl_compat_43_ogetdirentries(long long res,
+ long long fd,
+ long long buf,
+ long long count,
+ long long basep);
+void __sanitizer_syscall_pre_impl_compat_20_statfs(long long path,
+ long long buf);
+void __sanitizer_syscall_post_impl_compat_20_statfs(long long res,
+ long long path,
+ long long buf);
+void __sanitizer_syscall_pre_impl_compat_20_fstatfs(long long fd,
+ long long buf);
+void __sanitizer_syscall_post_impl_compat_20_fstatfs(long long res,
+ long long fd,
+ long long buf);
+/* syscall 159 has been skipped */
+/* syscall 160 has been skipped */
+void __sanitizer_syscall_pre_impl_compat_30_getfh(long long fname,
+ long long fhp);
+void __sanitizer_syscall_post_impl_compat_30_getfh(long long res,
+ long long fname,
+ long long fhp);
+void __sanitizer_syscall_pre_impl_compat_09_ogetdomainname(long long domainname,
+ long long len);
+void __sanitizer_syscall_post_impl_compat_09_ogetdomainname(
+ long long res, long long domainname, long long len);
+void __sanitizer_syscall_pre_impl_compat_09_osetdomainname(long long domainname,
+ long long len);
+void __sanitizer_syscall_post_impl_compat_09_osetdomainname(
+ long long res, long long domainname, long long len);
+void __sanitizer_syscall_pre_impl_compat_09_ouname(long long name);
+void __sanitizer_syscall_post_impl_compat_09_ouname(long long res,
+ long long name);
+void __sanitizer_syscall_pre_impl_sysarch(long long op, long long parms);
+void __sanitizer_syscall_post_impl_sysarch(long long res, long long op,
+ long long parms);
+/* syscall 166 has been skipped */
+/* syscall 167 has been skipped */
+/* syscall 168 has been skipped */
+#if !defined(_LP64)
+void __sanitizer_syscall_pre_impl_compat_10_osemsys(long long which,
+ long long a2, long long a3,
+ long long a4, long long a5);
+void __sanitizer_syscall_post_impl_compat_10_osemsys(long long res,
+ long long which,
+ long long a2, long long a3,
+ long long a4,
+ long long a5);
+#else
+/* syscall 169 has been skipped */
+#endif
+#if !defined(_LP64)
+void __sanitizer_syscall_pre_impl_compat_10_omsgsys(long long which,
+ long long a2, long long a3,
+ long long a4, long long a5,
+ long long a6);
+void __sanitizer_syscall_post_impl_compat_10_omsgsys(long long res,
+ long long which,
+ long long a2, long long a3,
+ long long a4, long long a5,
+ long long a6);
+#else
+/* syscall 170 has been skipped */
+#endif
+#if !defined(_LP64)
+void __sanitizer_syscall_pre_impl_compat_10_oshmsys(long long which,
+ long long a2, long long a3,
+ long long a4);
+void __sanitizer_syscall_post_impl_compat_10_oshmsys(long long res,
+ long long which,
+ long long a2, long long a3,
+ long long a4);
+#else
+/* syscall 171 has been skipped */
+#endif
+/* syscall 172 has been skipped */
+void __sanitizer_syscall_pre_impl_pread(long long fd, long long buf,
+ long long nbyte, long long PAD,
+ long long offset);
+void __sanitizer_syscall_post_impl_pread(long long res, long long fd,
+ long long buf, long long nbyte,
+ long long PAD, long long offset);
+void __sanitizer_syscall_pre_impl_pwrite(long long fd, long long buf,
+ long long nbyte, long long PAD,
+ long long offset);
+void __sanitizer_syscall_post_impl_pwrite(long long res, long long fd,
+ long long buf, long long nbyte,
+ long long PAD, long long offset);
+void __sanitizer_syscall_pre_impl_compat_30_ntp_gettime(long long ntvp);
+void __sanitizer_syscall_post_impl_compat_30_ntp_gettime(long long res,
+ long long ntvp);
+#if defined(NTP) || !defined(_KERNEL_OPT)
+void __sanitizer_syscall_pre_impl_ntp_adjtime(long long tp);
+void __sanitizer_syscall_post_impl_ntp_adjtime(long long res, long long tp);
+#else
+/* syscall 176 has been skipped */
+#endif
+/* syscall 177 has been skipped */
+/* syscall 178 has been skipped */
+/* syscall 179 has been skipped */
+/* syscall 180 has been skipped */
+void __sanitizer_syscall_pre_impl_setgid(long long gid);
+void __sanitizer_syscall_post_impl_setgid(long long res, long long gid);
+void __sanitizer_syscall_pre_impl_setegid(long long egid);
+void __sanitizer_syscall_post_impl_setegid(long long res, long long egid);
+void __sanitizer_syscall_pre_impl_seteuid(long long euid);
+void __sanitizer_syscall_post_impl_seteuid(long long res, long long euid);
+void __sanitizer_syscall_pre_impl_lfs_bmapv(long long fsidp, long long blkiov,
+ long long blkcnt);
+void __sanitizer_syscall_post_impl_lfs_bmapv(long long res, long long fsidp,
+ long long blkiov,
+ long long blkcnt);
+void __sanitizer_syscall_pre_impl_lfs_markv(long long fsidp, long long blkiov,
+ long long blkcnt);
+void __sanitizer_syscall_post_impl_lfs_markv(long long res, long long fsidp,
+ long long blkiov,
+ long long blkcnt);
+void __sanitizer_syscall_pre_impl_lfs_segclean(long long fsidp,
+ long long segment);
+void __sanitizer_syscall_post_impl_lfs_segclean(long long res, long long fsidp,
+ long long segment);
+void __sanitizer_syscall_pre_impl_compat_50_lfs_segwait(long long fsidp,
+ long long tv);
+void __sanitizer_syscall_post_impl_compat_50_lfs_segwait(long long res,
+ long long fsidp,
+ long long tv);
+void __sanitizer_syscall_pre_impl_compat_12_stat12(long long path,
+ long long ub);
+void __sanitizer_syscall_post_impl_compat_12_stat12(long long res,
+ long long path,
+ long long ub);
+void __sanitizer_syscall_pre_impl_compat_12_fstat12(long long fd, long long sb);
+void __sanitizer_syscall_post_impl_compat_12_fstat12(long long res,
+ long long fd,
+ long long sb);
+void __sanitizer_syscall_pre_impl_compat_12_lstat12(long long path,
+ long long ub);
+void __sanitizer_syscall_post_impl_compat_12_lstat12(long long res,
+ long long path,
+ long long ub);
+void __sanitizer_syscall_pre_impl_pathconf(long long path, long long name);
+void __sanitizer_syscall_post_impl_pathconf(long long res, long long path,
+ long long name);
+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_getrlimit(long long which, long long rlp);
+void __sanitizer_syscall_post_impl_getrlimit(long long res, long long which,
+ long long rlp);
+void __sanitizer_syscall_pre_impl_setrlimit(long long which, long long rlp);
+void __sanitizer_syscall_post_impl_setrlimit(long long res, long long which,
+ long long rlp);
+void __sanitizer_syscall_pre_impl_compat_12_getdirentries(long long fd,
+ long long buf,
+ long long count,
+ long long basep);
+void __sanitizer_syscall_post_impl_compat_12_getdirentries(long long res,
+ long long fd,
+ long long buf,
+ long long count,
+ long long basep);
+void __sanitizer_syscall_pre_impl_mmap(long long addr, long long len,
+ long long prot, long long flags,
+ long long fd, long long PAD,
+ long long pos);
+void __sanitizer_syscall_post_impl_mmap(long long res, long long addr,
+ long long len, long long prot,
+ long long flags, long long fd,
+ long long PAD, long long pos);
+void __sanitizer_syscall_pre_impl___syscall(long long code, long long arg0,
+ long long arg1, long long arg2,
+ long long arg3, long long arg4,
+ long long arg5, long long arg6,
+ long long arg7);
+void __sanitizer_syscall_post_impl___syscall(long long res, long long code,
+ long long arg0, long long arg1,
+ long long arg2, long long arg3,
+ long long arg4, long long arg5,
+ long long arg6, long long arg7);
+void __sanitizer_syscall_pre_impl_lseek(long long fd, long long PAD,
+ long long offset, long long whence);
+void __sanitizer_syscall_post_impl_lseek(long long res, long long fd,
+ long long PAD, long long offset,
+ long long whence);
+void __sanitizer_syscall_pre_impl_truncate(long long path, long long PAD,
+ long long length);
+void __sanitizer_syscall_post_impl_truncate(long long res, long long path,
+ long long PAD, long long length);
+void __sanitizer_syscall_pre_impl_ftruncate(long long fd, long long PAD,
+ long long length);
+void __sanitizer_syscall_post_impl_ftruncate(long long res, long long fd,
+ long long PAD, long long length);
+void __sanitizer_syscall_pre_impl___sysctl(long long name, long long namelen,
+ long long oldv, long long oldlenp,
+ long long newv, long long newlen);
+void __sanitizer_syscall_post_impl___sysctl(long long res, long long name,
+ long long namelen, long long oldv,
+ long long oldlenp, long long newv,
+ long long newlen);
+void __sanitizer_syscall_pre_impl_mlock(long long addr, long long len);
+void __sanitizer_syscall_post_impl_mlock(long long res, long long addr,
+ long long len);
+void __sanitizer_syscall_pre_impl_munlock(long long addr, long long len);
+void __sanitizer_syscall_post_impl_munlock(long long res, long long addr,
+ long long len);
+void __sanitizer_syscall_pre_impl_undelete(long long path);
+void __sanitizer_syscall_post_impl_undelete(long long res, long long path);
+void __sanitizer_syscall_pre_impl_compat_50_futimes(long long fd,
+ long long tptr);
+void __sanitizer_syscall_post_impl_compat_50_futimes(long long res,
+ long long fd,
+ long long tptr);
+void __sanitizer_syscall_pre_impl_getpgid(long long pid);
+void __sanitizer_syscall_post_impl_getpgid(long long res, long long pid);
+void __sanitizer_syscall_pre_impl_reboot(long long opt, long long bootstr);
+void __sanitizer_syscall_post_impl_reboot(long long res, long long opt,
+ long long bootstr);
+void __sanitizer_syscall_pre_impl_poll(long long fds, long long nfds,
+ long long timeout);
+void __sanitizer_syscall_post_impl_poll(long long res, long long fds,
+ long long nfds, long long timeout);
+void __sanitizer_syscall_pre_impl_afssys(long long id, long long a1,
+ long long a2, long long a3,
+ long long a4, long long a5,
+ long long a6);
+void __sanitizer_syscall_post_impl_afssys(long long res, long long id,
+ long long a1, long long a2,
+ long long a3, long long a4,
+ long long a5, long long a6);
+/* syscall 211 has been skipped */
+/* syscall 212 has been skipped */
+/* syscall 213 has been skipped */
+/* syscall 214 has been skipped */
+/* syscall 215 has been skipped */
+/* syscall 216 has been skipped */
+/* syscall 217 has been skipped */
+/* syscall 218 has been skipped */
+/* syscall 219 has been skipped */
+void __sanitizer_syscall_pre_impl_compat_14___semctl(long long semid,
+ long long semnum,
+ long long cmd,
+ long long arg);
+void __sanitizer_syscall_post_impl_compat_14___semctl(long long res,
+ long long semid,
+ long long semnum,
+ long long cmd,
+ long long arg);
+void __sanitizer_syscall_pre_impl_semget(long long key, long long nsems,
+ long long semflg);
+void __sanitizer_syscall_post_impl_semget(long long res, long long key,
+ long long nsems, long long semflg);
+void __sanitizer_syscall_pre_impl_semop(long long semid, long long sops,
+ long long nsops);
+void __sanitizer_syscall_post_impl_semop(long long res, long long semid,
+ long long sops, long long nsops);
+void __sanitizer_syscall_pre_impl_semconfig(long long flag);
+void __sanitizer_syscall_post_impl_semconfig(long long res, long long flag);
+void __sanitizer_syscall_pre_impl_compat_14_msgctl(long long msqid,
+ long long cmd,
+ long long buf);
+void __sanitizer_syscall_post_impl_compat_14_msgctl(long long res,
+ long long msqid,
+ long long cmd,
+ long long buf);
+void __sanitizer_syscall_pre_impl_msgget(long long key, long long msgflg);
+void __sanitizer_syscall_post_impl_msgget(long long res, long long key,
+ long long msgflg);
+void __sanitizer_syscall_pre_impl_msgsnd(long long msqid, long long msgp,
+ long long msgsz, long long msgflg);
+void __sanitizer_syscall_post_impl_msgsnd(long long res, long long msqid,
+ long long msgp, long long msgsz,
+ long long msgflg);
+void __sanitizer_syscall_pre_impl_msgrcv(long long msqid, long long msgp,
+ long long msgsz, long long msgtyp,
+ long long msgflg);
+void __sanitizer_syscall_post_impl_msgrcv(long long res, long long msqid,
+ long long msgp, long long msgsz,
+ long long msgtyp, long long msgflg);
+void __sanitizer_syscall_pre_impl_shmat(long long shmid, long long shmaddr,
+ long long shmflg);
+void __sanitizer_syscall_post_impl_shmat(long long res, long long shmid,
+ long long shmaddr, long long shmflg);
+void __sanitizer_syscall_pre_impl_compat_14_shmctl(long long shmid,
+ long long cmd,
+ long long buf);
+void __sanitizer_syscall_post_impl_compat_14_shmctl(long long res,
+ long long shmid,
+ long long cmd,
+ long long buf);
+void __sanitizer_syscall_pre_impl_shmdt(long long shmaddr);
+void __sanitizer_syscall_post_impl_shmdt(long long res, long long shmaddr);
+void __sanitizer_syscall_pre_impl_shmget(long long key, long long size,
+ long long shmflg);
+void __sanitizer_syscall_post_impl_shmget(long long res, long long key,
+ long long size, long long shmflg);
+void __sanitizer_syscall_pre_impl_compat_50_clock_gettime(long long clock_id,
+ long long tp);
+void __sanitizer_syscall_post_impl_compat_50_clock_gettime(long long res,
+ long long clock_id,
+ long long tp);
+void __sanitizer_syscall_pre_impl_compat_50_clock_settime(long long clock_id,
+ long long tp);
+void __sanitizer_syscall_post_impl_compat_50_clock_settime(long long res,
+ long long clock_id,
+ long long tp);
+void __sanitizer_syscall_pre_impl_compat_50_clock_getres(long long clock_id,
+ long long tp);
+void __sanitizer_syscall_post_impl_compat_50_clock_getres(long long res,
+ long long clock_id,
+ long long tp);
+void __sanitizer_syscall_pre_impl_timer_create(long long clock_id,
+ long long evp,
+ long long timerid);
+void __sanitizer_syscall_post_impl_timer_create(long long res,
+ long long clock_id,
+ long long evp,
+ long long timerid);
+void __sanitizer_syscall_pre_impl_timer_delete(long long timerid);
+void __sanitizer_syscall_post_impl_timer_delete(long long res,
+ long long timerid);
+void __sanitizer_syscall_pre_impl_compat_50_timer_settime(long long timerid,
+ long long flags,
+ long long value,
+ long long ovalue);
+void __sanitizer_syscall_post_impl_compat_50_timer_settime(long long res,
+ long long timerid,
+ long long flags,
+ long long value,
+ long long ovalue);
+void __sanitizer_syscall_pre_impl_compat_50_timer_gettime(long long timerid,
+ long long value);
+void __sanitizer_syscall_post_impl_compat_50_timer_gettime(long long res,
+ long long timerid,
+ long long value);
+void __sanitizer_syscall_pre_impl_timer_getoverrun(long long timerid);
+void __sanitizer_syscall_post_impl_timer_getoverrun(long long res,
+ long long timerid);
+void __sanitizer_syscall_pre_impl_compat_50_nanosleep(long long rqtp,
+ long long rmtp);
+void __sanitizer_syscall_post_impl_compat_50_nanosleep(long long res,
+ long long rqtp,
+ long long rmtp);
+void __sanitizer_syscall_pre_impl_fdatasync(long long fd);
+void __sanitizer_syscall_post_impl_fdatasync(long long res, long long fd);
+void __sanitizer_syscall_pre_impl_mlockall(long long flags);
+void __sanitizer_syscall_post_impl_mlockall(long long res, long long flags);
+void __sanitizer_syscall_pre_impl_munlockall(void);
+void __sanitizer_syscall_post_impl_munlockall(long long res);
+void __sanitizer_syscall_pre_impl_compat_50___sigtimedwait(long long set,
+ long long info,
+ long long timeout);
+void __sanitizer_syscall_post_impl_compat_50___sigtimedwait(long long res,
+ long long set,
+ long long info,
+ long long timeout);
+void __sanitizer_syscall_pre_impl_sigqueueinfo(long long pid, long long info);
+void __sanitizer_syscall_post_impl_sigqueueinfo(long long res, long long pid,
+ long long info);
+void __sanitizer_syscall_pre_impl_modctl(long long cmd, long long arg);
+void __sanitizer_syscall_post_impl_modctl(long long res, long long cmd,
+ long long arg);
+void __sanitizer_syscall_pre_impl__ksem_init(long long value, long long idp);
+void __sanitizer_syscall_post_impl__ksem_init(long long res, long long value,
+ long long idp);
+void __sanitizer_syscall_pre_impl__ksem_open(long long name, long long oflag,
+ long long mode, long long value,
+ long long idp);
+void __sanitizer_syscall_post_impl__ksem_open(long long res, long long name,
+ long long oflag, long long mode,
+ long long value, long long idp);
+void __sanitizer_syscall_pre_impl__ksem_unlink(long long name);
+void __sanitizer_syscall_post_impl__ksem_unlink(long long res, long long name);
+void __sanitizer_syscall_pre_impl__ksem_close(long long id);
+void __sanitizer_syscall_post_impl__ksem_close(long long res, long long id);
+void __sanitizer_syscall_pre_impl__ksem_post(long long id);
+void __sanitizer_syscall_post_impl__ksem_post(long long res, long long id);
+void __sanitizer_syscall_pre_impl__ksem_wait(long long id);
+void __sanitizer_syscall_post_impl__ksem_wait(long long res, long long id);
+void __sanitizer_syscall_pre_impl__ksem_trywait(long long id);
+void __sanitizer_syscall_post_impl__ksem_trywait(long long res, long long id);
+void __sanitizer_syscall_pre_impl__ksem_getvalue(long long id, long long value);
+void __sanitizer_syscall_post_impl__ksem_getvalue(long long res, long long id,
+ long long value);
+void __sanitizer_syscall_pre_impl__ksem_destroy(long long id);
+void __sanitizer_syscall_post_impl__ksem_destroy(long long res, long long id);
+void __sanitizer_syscall_pre_impl__ksem_timedwait(long long id,
+ long long abstime);
+void __sanitizer_syscall_post_impl__ksem_timedwait(long long res, long long id,
+ long long abstime);
+void __sanitizer_syscall_pre_impl_mq_open(long long name, long long oflag,
+ long long mode, long long attr);
+void __sanitizer_syscall_post_impl_mq_open(long long res, long long name,
+ long long oflag, long long mode,
+ long long attr);
+void __sanitizer_syscall_pre_impl_mq_close(long long mqdes);
+void __sanitizer_syscall_post_impl_mq_close(long long res, long long mqdes);
+void __sanitizer_syscall_pre_impl_mq_unlink(long long name);
+void __sanitizer_syscall_post_impl_mq_unlink(long long res, long long name);
+void __sanitizer_syscall_pre_impl_mq_getattr(long long mqdes, long long mqstat);
+void __sanitizer_syscall_post_impl_mq_getattr(long long res, long long mqdes,
+ long long mqstat);
+void __sanitizer_syscall_pre_impl_mq_setattr(long long mqdes, long long mqstat,
+ long long omqstat);
+void __sanitizer_syscall_post_impl_mq_setattr(long long res, long long mqdes,
+ long long mqstat,
+ long long omqstat);
+void __sanitizer_syscall_pre_impl_mq_notify(long long mqdes,
+ long long notification);
+void __sanitizer_syscall_post_impl_mq_notify(long long res, long long mqdes,
+ long long notification);
+void __sanitizer_syscall_pre_impl_mq_send(long long mqdes, long long msg_ptr,
+ long long msg_len,
+ long long msg_prio);
+void __sanitizer_syscall_post_impl_mq_send(long long res, long long mqdes,
+ long long msg_ptr, long long msg_len,
+ long long msg_prio);
+void __sanitizer_syscall_pre_impl_mq_receive(long long mqdes, long long msg_ptr,
+ long long msg_len,
+ long long msg_prio);
+void __sanitizer_syscall_post_impl_mq_receive(long long res, long long mqdes,
+ long long msg_ptr,
+ long long msg_len,
+ long long msg_prio);
+void __sanitizer_syscall_pre_impl_compat_50_mq_timedsend(long long mqdes,
+ long long msg_ptr,
+ long long msg_len,
+ long long msg_prio,
+ long long abs_timeout);
+void __sanitizer_syscall_post_impl_compat_50_mq_timedsend(
+ long long res, long long mqdes, long long msg_ptr, long long msg_len,
+ long long msg_prio, long long abs_timeout);
+void __sanitizer_syscall_pre_impl_compat_50_mq_timedreceive(
+ long long mqdes, long long msg_ptr, long long msg_len, long long msg_prio,
+ long long abs_timeout);
+void __sanitizer_syscall_post_impl_compat_50_mq_timedreceive(
+ long long res, long long mqdes, long long msg_ptr, long long msg_len,
+ long long msg_prio, long long abs_timeout);
+/* syscall 267 has been skipped */
+/* syscall 268 has been skipped */
+/* syscall 269 has been skipped */
+void __sanitizer_syscall_pre_impl___posix_rename(long long from, long long to);
+void __sanitizer_syscall_post_impl___posix_rename(long long res, long long from,
+ long long to);
+void __sanitizer_syscall_pre_impl_swapctl(long long cmd, long long arg,
+ long long misc);
+void __sanitizer_syscall_post_impl_swapctl(long long res, long long cmd,
+ long long arg, long long misc);
+void __sanitizer_syscall_pre_impl_compat_30_getdents(long long fd,
+ long long buf,
+ long long count);
+void __sanitizer_syscall_post_impl_compat_30_getdents(long long res,
+ long long fd,
+ long long buf,
+ long long count);
+void __sanitizer_syscall_pre_impl_minherit(long long addr, long long len,
+ long long inherit);
+void __sanitizer_syscall_post_impl_minherit(long long res, long long addr,
+ long long len, long long inherit);
+void __sanitizer_syscall_pre_impl_lchmod(long long path, long long mode);
+void __sanitizer_syscall_post_impl_lchmod(long long res, long long path,
+ long long mode);
+void __sanitizer_syscall_pre_impl_lchown(long long path, long long uid,
+ long long gid);
+void __sanitizer_syscall_post_impl_lchown(long long res, long long path,
+ long long uid, long long gid);
+void __sanitizer_syscall_pre_impl_compat_50_lutimes(long long path,
+ long long tptr);
+void __sanitizer_syscall_post_impl_compat_50_lutimes(long long res,
+ long long path,
+ long long tptr);
+void __sanitizer_syscall_pre_impl___msync13(long long addr, long long len,
+ long long flags);
+void __sanitizer_syscall_post_impl___msync13(long long res, long long addr,
+ long long len, long long flags);
+void __sanitizer_syscall_pre_impl_compat_30___stat13(long long path,
+ long long ub);
+void __sanitizer_syscall_post_impl_compat_30___stat13(long long res,
+ long long path,
+ long long ub);
+void __sanitizer_syscall_pre_impl_compat_30___fstat13(long long fd,
+ long long sb);
+void __sanitizer_syscall_post_impl_compat_30___fstat13(long long res,
+ long long fd,
+ long long sb);
+void __sanitizer_syscall_pre_impl_compat_30___lstat13(long long path,
+ long long ub);
+void __sanitizer_syscall_post_impl_compat_30___lstat13(long long res,
+ long long path,
+ long long ub);
+void __sanitizer_syscall_pre_impl___sigaltstack14(long long nss, long long oss);
+void __sanitizer_syscall_post_impl___sigaltstack14(long long res, long long nss,
+ long long oss);
+void __sanitizer_syscall_pre_impl___vfork14(void);
+void __sanitizer_syscall_post_impl___vfork14(long long res);
+void __sanitizer_syscall_pre_impl___posix_chown(long long path, long long uid,
+ long long gid);
+void __sanitizer_syscall_post_impl___posix_chown(long long res, long long path,
+ long long uid, long long gid);
+void __sanitizer_syscall_pre_impl___posix_fchown(long long fd, long long uid,
+ long long gid);
+void __sanitizer_syscall_post_impl___posix_fchown(long long res, long long fd,
+ long long uid, long long gid);
+void __sanitizer_syscall_pre_impl___posix_lchown(long long path, long long uid,
+ long long gid);
+void __sanitizer_syscall_post_impl___posix_lchown(long long res, long long path,
+ long long uid, long long gid);
+void __sanitizer_syscall_pre_impl_getsid(long long pid);
+void __sanitizer_syscall_post_impl_getsid(long long res, long long pid);
+void __sanitizer_syscall_pre_impl___clone(long long flags, long long stack);
+void __sanitizer_syscall_post_impl___clone(long long res, long long flags,
+ long long stack);
+void __sanitizer_syscall_pre_impl_fktrace(long long fd, long long ops,
+ long long facs, long long pid);
+void __sanitizer_syscall_post_impl_fktrace(long long res, long long fd,
+ long long ops, long long facs,
+ long long pid);
+void __sanitizer_syscall_pre_impl_preadv(long long fd, long long iovp,
+ long long iovcnt, long long PAD,
+ long long offset);
+void __sanitizer_syscall_post_impl_preadv(long long res, long long fd,
+ long long iovp, long long iovcnt,
+ long long PAD, long long offset);
+void __sanitizer_syscall_pre_impl_pwritev(long long fd, long long iovp,
+ long long iovcnt, long long PAD,
+ long long offset);
+void __sanitizer_syscall_post_impl_pwritev(long long res, long long fd,
+ long long iovp, long long iovcnt,
+ long long PAD, long long offset);
+void __sanitizer_syscall_pre_impl_compat_16___sigaction14(long long signum,
+ long long nsa,
+ long long osa);
+void __sanitizer_syscall_post_impl_compat_16___sigaction14(long long res,
+ long long signum,
+ long long nsa,
+ long long osa);
+void __sanitizer_syscall_pre_impl___sigpending14(long long set);
+void __sanitizer_syscall_post_impl___sigpending14(long long res, long long set);
+void __sanitizer_syscall_pre_impl___sigprocmask14(long long how, long long set,
+ long long oset);
+void __sanitizer_syscall_post_impl___sigprocmask14(long long res, long long how,
+ long long set,
+ long long oset);
+void __sanitizer_syscall_pre_impl___sigsuspend14(long long set);
+void __sanitizer_syscall_post_impl___sigsuspend14(long long res, long long set);
+void __sanitizer_syscall_pre_impl_compat_16___sigreturn14(long long sigcntxp);
+void __sanitizer_syscall_post_impl_compat_16___sigreturn14(long long res,
+ long long sigcntxp);
+void __sanitizer_syscall_pre_impl___getcwd(long long bufp, long long length);
+void __sanitizer_syscall_post_impl___getcwd(long long res, long long bufp,
+ long long length);
+void __sanitizer_syscall_pre_impl_fchroot(long long fd);
+void __sanitizer_syscall_post_impl_fchroot(long long res, long long fd);
+void __sanitizer_syscall_pre_impl_compat_30_fhopen(long long fhp,
+ long long flags);
+void __sanitizer_syscall_post_impl_compat_30_fhopen(long long res,
+ long long fhp,
+ long long flags);
+void __sanitizer_syscall_pre_impl_compat_30_fhstat(long long fhp, long long sb);
+void __sanitizer_syscall_post_impl_compat_30_fhstat(long long res,
+ long long fhp,
+ long long sb);
+void __sanitizer_syscall_pre_impl_compat_20_fhstatfs(long long fhp,
+ long long buf);
+void __sanitizer_syscall_post_impl_compat_20_fhstatfs(long long res,
+ long long fhp,
+ long long buf);
+void __sanitizer_syscall_pre_impl_compat_50_____semctl13(long long semid,
+ long long semnum,
+ long long cmd,
+ long long arg);
+void __sanitizer_syscall_post_impl_compat_50_____semctl13(long long res,
+ long long semid,
+ long long semnum,
+ long long cmd,
+ long long arg);
+void __sanitizer_syscall_pre_impl_compat_50___msgctl13(long long msqid,
+ long long cmd,
+ long long buf);
+void __sanitizer_syscall_post_impl_compat_50___msgctl13(long long res,
+ long long msqid,
+ long long cmd,
+ long long buf);
+void __sanitizer_syscall_pre_impl_compat_50___shmctl13(long long shmid,
+ long long cmd,
+ long long buf);
+void __sanitizer_syscall_post_impl_compat_50___shmctl13(long long res,
+ long long shmid,
+ long long cmd,
+ long long buf);
+void __sanitizer_syscall_pre_impl_lchflags(long long path, long long flags);
+void __sanitizer_syscall_post_impl_lchflags(long long res, long long path,
+ long long flags);
+void __sanitizer_syscall_pre_impl_issetugid(void);
+void __sanitizer_syscall_post_impl_issetugid(long long res);
+void __sanitizer_syscall_pre_impl_utrace(long long label, long long addr,
+ long long len);
+void __sanitizer_syscall_post_impl_utrace(long long res, long long label,
+ long long addr, long long len);
+void __sanitizer_syscall_pre_impl_getcontext(long long ucp);
+void __sanitizer_syscall_post_impl_getcontext(long long res, long long ucp);
+void __sanitizer_syscall_pre_impl_setcontext(long long ucp);
+void __sanitizer_syscall_post_impl_setcontext(long long res, long long ucp);
+void __sanitizer_syscall_pre_impl__lwp_create(long long ucp, long long flags,
+ long long new_lwp);
+void __sanitizer_syscall_post_impl__lwp_create(long long res, long long ucp,
+ long long flags,
+ long long new_lwp);
+void __sanitizer_syscall_pre_impl__lwp_exit(void);
+void __sanitizer_syscall_post_impl__lwp_exit(long long res);
+void __sanitizer_syscall_pre_impl__lwp_self(void);
+void __sanitizer_syscall_post_impl__lwp_self(long long res);
+void __sanitizer_syscall_pre_impl__lwp_wait(long long wait_for,
+ long long departed);
+void __sanitizer_syscall_post_impl__lwp_wait(long long res, long long wait_for,
+ long long departed);
+void __sanitizer_syscall_pre_impl__lwp_suspend(long long target);
+void __sanitizer_syscall_post_impl__lwp_suspend(long long res,
+ long long target);
+void __sanitizer_syscall_pre_impl__lwp_continue(long long target);
+void __sanitizer_syscall_post_impl__lwp_continue(long long res,
+ long long target);
+void __sanitizer_syscall_pre_impl__lwp_wakeup(long long target);
+void __sanitizer_syscall_post_impl__lwp_wakeup(long long res, long long target);
+void __sanitizer_syscall_pre_impl__lwp_getprivate(void);
+void __sanitizer_syscall_post_impl__lwp_getprivate(long long res);
+void __sanitizer_syscall_pre_impl__lwp_setprivate(long long ptr);
+void __sanitizer_syscall_post_impl__lwp_setprivate(long long res,
+ long long ptr);
+void __sanitizer_syscall_pre_impl__lwp_kill(long long target, long long signo);
+void __sanitizer_syscall_post_impl__lwp_kill(long long res, long long target,
+ long long signo);
+void __sanitizer_syscall_pre_impl__lwp_detach(long long target);
+void __sanitizer_syscall_post_impl__lwp_detach(long long res, long long target);
+void __sanitizer_syscall_pre_impl_compat_50__lwp_park(long long ts,
+ long long unpark,
+ long long hint,
+ long long unparkhint);
+void __sanitizer_syscall_post_impl_compat_50__lwp_park(long long res,
+ long long ts,
+ long long unpark,
+ long long hint,
+ long long unparkhint);
+void __sanitizer_syscall_pre_impl__lwp_unpark(long long target, long long hint);
+void __sanitizer_syscall_post_impl__lwp_unpark(long long res, long long target,
+ long long hint);
+void __sanitizer_syscall_pre_impl__lwp_unpark_all(long long targets,
+ long long ntargets,
+ long long hint);
+void __sanitizer_syscall_post_impl__lwp_unpark_all(long long res,
+ long long targets,
+ long long ntargets,
+ long long hint);
+void __sanitizer_syscall_pre_impl__lwp_setname(long long target,
+ long long name);
+void __sanitizer_syscall_post_impl__lwp_setname(long long res, long long target,
+ long long name);
+void __sanitizer_syscall_pre_impl__lwp_getname(long long target, long long name,
+ long long len);
+void __sanitizer_syscall_post_impl__lwp_getname(long long res, long long target,
+ long long name, long long len);
+void __sanitizer_syscall_pre_impl__lwp_ctl(long long features,
+ long long address);
+void __sanitizer_syscall_post_impl__lwp_ctl(long long res, long long features,
+ long long address);
+/* syscall 326 has been skipped */
+/* syscall 327 has been skipped */
+/* syscall 328 has been skipped */
+/* syscall 329 has been skipped */
+void __sanitizer_syscall_pre_impl_compat_60_sa_register(
+ long long newv, long long oldv, long long flags,
+ long long stackinfo_offset);
+void __sanitizer_syscall_post_impl_compat_60_sa_register(
+ long long res, long long newv, long long oldv, long long flags,
+ long long stackinfo_offset);
+void __sanitizer_syscall_pre_impl_compat_60_sa_stacks(long long num,
+ long long stacks);
+void __sanitizer_syscall_post_impl_compat_60_sa_stacks(long long res,
+ long long num,
+ long long stacks);
+void __sanitizer_syscall_pre_impl_compat_60_sa_enable(void);
+void __sanitizer_syscall_post_impl_compat_60_sa_enable(long long res);
+void __sanitizer_syscall_pre_impl_compat_60_sa_setconcurrency(
+ long long concurrency);
+void __sanitizer_syscall_post_impl_compat_60_sa_setconcurrency(
+ long long res, long long concurrency);
+void __sanitizer_syscall_pre_impl_compat_60_sa_yield(void);
+void __sanitizer_syscall_post_impl_compat_60_sa_yield(long long res);
+void __sanitizer_syscall_pre_impl_compat_60_sa_preempt(long long sa_id);
+void __sanitizer_syscall_post_impl_compat_60_sa_preempt(long long res,
+ long long sa_id);
+/* syscall 336 has been skipped */
+/* syscall 337 has been skipped */
+/* syscall 338 has been skipped */
+/* syscall 339 has been skipped */
+void __sanitizer_syscall_pre_impl___sigaction_sigtramp(long long signum,
+ long long nsa,
+ long long osa,
+ long long tramp,
+ long long vers);
+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);
+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,
+ long long len, long long op);
+void __sanitizer_syscall_pre_impl_kqueue(void);
+void __sanitizer_syscall_post_impl_kqueue(long long res);
+void __sanitizer_syscall_pre_impl_compat_50_kevent(
+ long long fd, long long changelist, long long nchanges, long long eventlist,
+ long long nevents, long long timeout);
+void __sanitizer_syscall_post_impl_compat_50_kevent(
+ long long res, long long fd, long long changelist, long long nchanges,
+ long long eventlist, long long nevents, long long timeout);
+void __sanitizer_syscall_pre_impl__sched_setparam(long long pid, long long lid,
+ long long policy,
+ long long params);
+void __sanitizer_syscall_post_impl__sched_setparam(long long res, long long pid,
+ long long lid,
+ long long policy,
+ long long params);
+void __sanitizer_syscall_pre_impl__sched_getparam(long long pid, long long lid,
+ long long policy,
+ long long params);
+void __sanitizer_syscall_post_impl__sched_getparam(long long res, long long pid,
+ long long lid,
+ long long policy,
+ long long params);
+void __sanitizer_syscall_pre_impl__sched_setaffinity(long long pid,
+ long long lid,
+ long long size,
+ long long cpuset);
+void __sanitizer_syscall_post_impl__sched_setaffinity(long long res,
+ long long pid,
+ long long lid,
+ long long size,
+ long long cpuset);
+void __sanitizer_syscall_pre_impl__sched_getaffinity(long long pid,
+ long long lid,
+ long long size,
+ long long cpuset);
+void __sanitizer_syscall_post_impl__sched_getaffinity(long long res,
+ long long pid,
+ long long lid,
+ long long size,
+ long long cpuset);
+void __sanitizer_syscall_pre_impl_sched_yield(void);
+void __sanitizer_syscall_post_impl_sched_yield(long long res);
+void __sanitizer_syscall_pre_impl__sched_protect(long long priority);
+void __sanitizer_syscall_post_impl__sched_protect(long long res,
+ long long priority);
+/* syscall 352 has been skipped */
+/* syscall 353 has been skipped */
+void __sanitizer_syscall_pre_impl_fsync_range(long long fd, long long flags,
+ long long start,
+ long long length);
+void __sanitizer_syscall_post_impl_fsync_range(long long res, long long fd,
+ long long flags, long long start,
+ long long length);
+void __sanitizer_syscall_pre_impl_uuidgen(long long store, long long count);
+void __sanitizer_syscall_post_impl_uuidgen(long long res, long long store,
+ long long count);
+void __sanitizer_syscall_pre_impl_getvfsstat(long long buf, long long bufsize,
+ long long flags);
+void __sanitizer_syscall_post_impl_getvfsstat(long long res, long long buf,
+ long long bufsize,
+ long long flags);
+void __sanitizer_syscall_pre_impl_statvfs1(long long path, long long buf,
+ long long flags);
+void __sanitizer_syscall_post_impl_statvfs1(long long res, long long path,
+ long long buf, long long flags);
+void __sanitizer_syscall_pre_impl_fstatvfs1(long long fd, long long buf,
+ long long flags);
+void __sanitizer_syscall_post_impl_fstatvfs1(long long res, long long fd,
+ long long buf, long long flags);
+void __sanitizer_syscall_pre_impl_compat_30_fhstatvfs1(long long fhp,
+ long long buf,
+ long long flags);
+void __sanitizer_syscall_post_impl_compat_30_fhstatvfs1(long long res,
+ long long fhp,
+ long long buf,
+ long long flags);
+void __sanitizer_syscall_pre_impl_extattrctl(long long path, long long cmd,
+ long long filename,
+ long long attrnamespace,
+ long long attrname);
+void __sanitizer_syscall_post_impl_extattrctl(long long res, long long path,
+ long long cmd, long long filename,
+ long long attrnamespace,
+ long long attrname);
+void __sanitizer_syscall_pre_impl_extattr_set_file(long long path,
+ long long attrnamespace,
+ long long attrname,
+ long long data,
+ long long nbytes);
+void __sanitizer_syscall_post_impl_extattr_set_file(
+ long long res, long long path, long long attrnamespace, long long attrname,
+ long long data, long long nbytes);
+void __sanitizer_syscall_pre_impl_extattr_get_file(long long path,
+ long long attrnamespace,
+ long long attrname,
+ long long data,
+ long long nbytes);
+void __sanitizer_syscall_post_impl_extattr_get_file(
+ long long res, long long path, long long attrnamespace, long long attrname,
+ long long data, long long nbytes);
+void __sanitizer_syscall_pre_impl_extattr_delete_file(long long path,
+ long long attrnamespace,
+ long long attrname);
+void __sanitizer_syscall_post_impl_extattr_delete_file(long long res,
+ long long path,
+ long long attrnamespace,
+ long long attrname);
+void __sanitizer_syscall_pre_impl_extattr_set_fd(long long fd,
+ long long attrnamespace,
+ long long attrname,
+ long long data,
+ long long nbytes);
+void __sanitizer_syscall_post_impl_extattr_set_fd(long long res, long long fd,
+ long long attrnamespace,
+ long long attrname,
+ long long data,
+ long long nbytes);
+void __sanitizer_syscall_pre_impl_extattr_get_fd(long long fd,
+ long long attrnamespace,
+ long long attrname,
+ long long data,
+ long long nbytes);
+void __sanitizer_syscall_post_impl_extattr_get_fd(long long res, long long fd,
+ long long attrnamespace,
+ long long attrname,
+ long long data,
+ long long nbytes);
+void __sanitizer_syscall_pre_impl_extattr_delete_fd(long long fd,
+ long long attrnamespace,
+ long long attrname);
+void __sanitizer_syscall_post_impl_extattr_delete_fd(long long res,
+ long long fd,
+ long long attrnamespace,
+ long long attrname);
+void __sanitizer_syscall_pre_impl_extattr_set_link(long long path,
+ long long attrnamespace,
+ long long attrname,
+ long long data,
+ long long nbytes);
+void __sanitizer_syscall_post_impl_extattr_set_link(
+ long long res, long long path, long long attrnamespace, long long attrname,
+ long long data, long long nbytes);
+void __sanitizer_syscall_pre_impl_extattr_get_link(long long path,
+ long long attrnamespace,
+ long long attrname,
+ long long data,
+ long long nbytes);
+void __sanitizer_syscall_post_impl_extattr_get_link(
+ long long res, long long path, long long attrnamespace, long long attrname,
+ long long data, long long nbytes);
+void __sanitizer_syscall_pre_impl_extattr_delete_link(long long path,
+ long long attrnamespace,
+ long long attrname);
+void __sanitizer_syscall_post_impl_extattr_delete_link(long long res,
+ long long path,
+ long long attrnamespace,
+ long long attrname);
+void __sanitizer_syscall_pre_impl_extattr_list_fd(long long fd,
+ long long attrnamespace,
+ long long data,
+ long long nbytes);
+void __sanitizer_syscall_post_impl_extattr_list_fd(long long res, long long fd,
+ long long attrnamespace,
+ long long data,
+ long long nbytes);
+void __sanitizer_syscall_pre_impl_extattr_list_file(long long path,
+ long long attrnamespace,
+ long long data,
+ long long nbytes);
+void __sanitizer_syscall_post_impl_extattr_list_file(long long res,
+ long long path,
+ long long attrnamespace,
+ long long data,
+ long long nbytes);
+void __sanitizer_syscall_pre_impl_extattr_list_link(long long path,
+ long long attrnamespace,
+ long long data,
+ long long nbytes);
+void __sanitizer_syscall_post_impl_extattr_list_link(long long res,
+ long long path,
+ long long attrnamespace,
+ long long data,
+ long long nbytes);
+void __sanitizer_syscall_pre_impl_compat_50_pselect(long long nd, long long in,
+ long long ou, long long ex,
+ long long ts,
+ long long mask);
+void __sanitizer_syscall_post_impl_compat_50_pselect(long long res,
+ long long nd, long long in,
+ long long ou, long long ex,
+ long long ts,
+ long long mask);
+void __sanitizer_syscall_pre_impl_compat_50_pollts(long long fds,
+ long long nfds, long long ts,
+ long long mask);
+void __sanitizer_syscall_post_impl_compat_50_pollts(
+ long long res, long long fds, long long nfds, long long ts, long long mask);
+void __sanitizer_syscall_pre_impl_setxattr(long long path, long long name,
+ long long value, long long size,
+ long long flags);
+void __sanitizer_syscall_post_impl_setxattr(long long res, long long path,
+ long long name, long long value,
+ long long size, long long flags);
+void __sanitizer_syscall_pre_impl_lsetxattr(long long path, long long name,
+ long long value, long long size,
+ long long flags);
+void __sanitizer_syscall_post_impl_lsetxattr(long long res, long long path,
+ long long name, long long value,
+ long long size, long long flags);
+void __sanitizer_syscall_pre_impl_fsetxattr(long long fd, long long name,
+ long long value, long long size,
+ long long flags);
+void __sanitizer_syscall_post_impl_fsetxattr(long long res, long long fd,
+ long long name, long long value,
+ long long size, long long flags);
+void __sanitizer_syscall_pre_impl_getxattr(long long path, long long name,
+ long long value, long long size);
+void __sanitizer_syscall_post_impl_getxattr(long long res, long long path,
+ long long name, long long value,
+ long long size);
+void __sanitizer_syscall_pre_impl_lgetxattr(long long path, long long name,
+ long long value, long long size);
+void __sanitizer_syscall_post_impl_lgetxattr(long long res, long long path,
+ long long name, long long value,
+ long long size);
+void __sanitizer_syscall_pre_impl_fgetxattr(long long fd, long long name,
+ long long value, long long size);
+void __sanitizer_syscall_post_impl_fgetxattr(long long res, long long fd,
+ long long name, long long value,
+ long long size);
+void __sanitizer_syscall_pre_impl_listxattr(long long path, long long list,
+ long long size);
+void __sanitizer_syscall_post_impl_listxattr(long long res, long long path,
+ long long list, long long size);
+void __sanitizer_syscall_pre_impl_llistxattr(long long path, long long list,
+ long long size);
+void __sanitizer_syscall_post_impl_llistxattr(long long res, long long path,
+ long long list, long long size);
+void __sanitizer_syscall_pre_impl_flistxattr(long long fd, long long list,
+ long long size);
+void __sanitizer_syscall_post_impl_flistxattr(long long res, long long fd,
+ long long list, long long size);
+void __sanitizer_syscall_pre_impl_removexattr(long long path, long long name);
+void __sanitizer_syscall_post_impl_removexattr(long long res, long long path,
+ long long name);
+void __sanitizer_syscall_pre_impl_lremovexattr(long long path, long long name);
+void __sanitizer_syscall_post_impl_lremovexattr(long long res, long long path,
+ long long name);
+void __sanitizer_syscall_pre_impl_fremovexattr(long long fd, long long name);
+void __sanitizer_syscall_post_impl_fremovexattr(long long res, long long fd,
+ long long name);
+void __sanitizer_syscall_pre_impl_compat_50___stat30(long long path,
+ long long ub);
+void __sanitizer_syscall_post_impl_compat_50___stat30(long long res,
+ long long path,
+ long long ub);
+void __sanitizer_syscall_pre_impl_compat_50___fstat30(long long fd,
+ long long sb);
+void __sanitizer_syscall_post_impl_compat_50___fstat30(long long res,
+ long long fd,
+ long long sb);
+void __sanitizer_syscall_pre_impl_compat_50___lstat30(long long path,
+ long long ub);
+void __sanitizer_syscall_post_impl_compat_50___lstat30(long long res,
+ long long path,
+ long long ub);
+void __sanitizer_syscall_pre_impl___getdents30(long long fd, long long buf,
+ long long count);
+void __sanitizer_syscall_post_impl___getdents30(long long res, long long fd,
+ long long buf, long long count);
+void __sanitizer_syscall_pre_impl_posix_fadvise(long long);
+void __sanitizer_syscall_post_impl_posix_fadvise(long long res, long long);
+void __sanitizer_syscall_pre_impl_compat_30___fhstat30(long long fhp,
+ long long sb);
+void __sanitizer_syscall_post_impl_compat_30___fhstat30(long long res,
+ long long fhp,
+ long long sb);
+void __sanitizer_syscall_pre_impl_compat_50___ntp_gettime30(long long ntvp);
+void __sanitizer_syscall_post_impl_compat_50___ntp_gettime30(long long res,
+ long long ntvp);
+void __sanitizer_syscall_pre_impl___socket30(long long domain, long long type,
+ long long protocol);
+void __sanitizer_syscall_post_impl___socket30(long long res, long long domain,
+ long long type,
+ long long protocol);
+void __sanitizer_syscall_pre_impl___getfh30(long long fname, long long fhp,
+ long long fh_size);
+void __sanitizer_syscall_post_impl___getfh30(long long res, long long fname,
+ long long fhp, long long fh_size);
+void __sanitizer_syscall_pre_impl___fhopen40(long long fhp, long long fh_size,
+ long long flags);
+void __sanitizer_syscall_post_impl___fhopen40(long long res, long long fhp,
+ long long fh_size,
+ long long flags);
+void __sanitizer_syscall_pre_impl___fhstatvfs140(long long fhp,
+ long long fh_size,
+ long long buf,
+ long long flags);
+void __sanitizer_syscall_post_impl___fhstatvfs140(long long res, long long fhp,
+ long long fh_size,
+ long long buf,
+ long long flags);
+void __sanitizer_syscall_pre_impl_compat_50___fhstat40(long long fhp,
+ long long fh_size,
+ long long sb);
+void __sanitizer_syscall_post_impl_compat_50___fhstat40(long long res,
+ long long fhp,
+ long long fh_size,
+ long long sb);
+void __sanitizer_syscall_pre_impl_aio_cancel(long long fildes,
+ long long aiocbp);
+void __sanitizer_syscall_post_impl_aio_cancel(long long res, long long fildes,
+ long long aiocbp);
+void __sanitizer_syscall_pre_impl_aio_error(long long aiocbp);
+void __sanitizer_syscall_post_impl_aio_error(long long res, long long aiocbp);
+void __sanitizer_syscall_pre_impl_aio_fsync(long long op, long long aiocbp);
+void __sanitizer_syscall_post_impl_aio_fsync(long long res, long long op,
+ long long aiocbp);
+void __sanitizer_syscall_pre_impl_aio_read(long long aiocbp);
+void __sanitizer_syscall_post_impl_aio_read(long long res, long long aiocbp);
+void __sanitizer_syscall_pre_impl_aio_return(long long aiocbp);
+void __sanitizer_syscall_post_impl_aio_return(long long res, long long aiocbp);
+void __sanitizer_syscall_pre_impl_compat_50_aio_suspend(long long list,
+ long long nent,
+ long long timeout);
+void __sanitizer_syscall_post_impl_compat_50_aio_suspend(long long res,
+ long long list,
+ long long nent,
+ long long timeout);
+void __sanitizer_syscall_pre_impl_aio_write(long long aiocbp);
+void __sanitizer_syscall_post_impl_aio_write(long long res, long long aiocbp);
+void __sanitizer_syscall_pre_impl_lio_listio(long long mode, long long list,
+ long long nent, long long sig);
+void __sanitizer_syscall_post_impl_lio_listio(long long res, long long mode,
+ long long list, long long nent,
+ long long sig);
+/* syscall 407 has been skipped */
+/* syscall 408 has been skipped */
+/* syscall 409 has been skipped */
+void __sanitizer_syscall_pre_impl___mount50(long long type, long long path,
+ long long flags, long long data,
+ long long data_len);
+void __sanitizer_syscall_post_impl___mount50(long long res, long long type,
+ long long path, long long flags,
+ long long data,
+ long long data_len);
+void __sanitizer_syscall_pre_impl_mremap(long long old_address,
+ long long old_size,
+ long long new_address,
+ long long new_size, long long flags);
+void __sanitizer_syscall_post_impl_mremap(long long res, long long old_address,
+ long long old_size,
+ long long new_address,
+ long long new_size, long long flags);
+void __sanitizer_syscall_pre_impl_pset_create(long long psid);
+void __sanitizer_syscall_post_impl_pset_create(long long res, long long psid);
+void __sanitizer_syscall_pre_impl_pset_destroy(long long psid);
+void __sanitizer_syscall_post_impl_pset_destroy(long long res, long long psid);
+void __sanitizer_syscall_pre_impl_pset_assign(long long psid, long long cpuid,
+ long long opsid);
+void __sanitizer_syscall_post_impl_pset_assign(long long res, long long psid,
+ long long cpuid,
+ long long opsid);
+void __sanitizer_syscall_pre_impl__pset_bind(long long idtype,
+ long long first_id,
+ long long second_id,
+ long long psid, long long opsid);
+void __sanitizer_syscall_post_impl__pset_bind(long long res, long long idtype,
+ long long first_id,
+ long long second_id,
+ long long psid, long long opsid);
+void __sanitizer_syscall_pre_impl___posix_fadvise50(long long fd, long long PAD,
+ long long offset,
+ long long len,
+ long long advice);
+void __sanitizer_syscall_post_impl___posix_fadvise50(
+ long long res, long long fd, long long PAD, long long offset, long long len,
+ long long advice);
+void __sanitizer_syscall_pre_impl___select50(long long nd, long long in,
+ long long ou, long long ex,
+ long long tv);
+void __sanitizer_syscall_post_impl___select50(long long res, long long nd,
+ long long in, long long ou,
+ long long ex, long long tv);
+void __sanitizer_syscall_pre_impl___gettimeofday50(long long tp, long long tzp);
+void __sanitizer_syscall_post_impl___gettimeofday50(long long res, long long tp,
+ long long tzp);
+void __sanitizer_syscall_pre_impl___settimeofday50(long long tv, long long tzp);
+void __sanitizer_syscall_post_impl___settimeofday50(long long res, long long tv,
+ long long tzp);
+void __sanitizer_syscall_pre_impl___utimes50(long long path, long long tptr);
+void __sanitizer_syscall_post_impl___utimes50(long long res, long long path,
+ long long tptr);
+void __sanitizer_syscall_pre_impl___adjtime50(long long delta,
+ long long olddelta);
+void __sanitizer_syscall_post_impl___adjtime50(long long res, long long delta,
+ long long olddelta);
+void __sanitizer_syscall_pre_impl___lfs_segwait50(long long fsidp,
+ long long tv);
+void __sanitizer_syscall_post_impl___lfs_segwait50(long long res,
+ long long fsidp,
+ long long tv);
+void __sanitizer_syscall_pre_impl___futimes50(long long fd, long long tptr);
+void __sanitizer_syscall_post_impl___futimes50(long long res, long long fd,
+ long long tptr);
+void __sanitizer_syscall_pre_impl___lutimes50(long long path, long long tptr);
+void __sanitizer_syscall_post_impl___lutimes50(long long res, long long path,
+ long long tptr);
+void __sanitizer_syscall_pre_impl___setitimer50(long long which, long long itv,
+ long long oitv);
+void __sanitizer_syscall_post_impl___setitimer50(long long res, long long which,
+ long long itv, long long oitv);
+void __sanitizer_syscall_pre_impl___getitimer50(long long which, long long itv);
+void __sanitizer_syscall_post_impl___getitimer50(long long res, long long which,
+ long long itv);
+void __sanitizer_syscall_pre_impl___clock_gettime50(long long clock_id,
+ long long tp);
+void __sanitizer_syscall_post_impl___clock_gettime50(long long res,
+ long long clock_id,
+ long long tp);
+void __sanitizer_syscall_pre_impl___clock_settime50(long long clock_id,
+ long long tp);
+void __sanitizer_syscall_post_impl___clock_settime50(long long res,
+ long long clock_id,
+ long long tp);
+void __sanitizer_syscall_pre_impl___clock_getres50(long long clock_id,
+ long long tp);
+void __sanitizer_syscall_post_impl___clock_getres50(long long res,
+ long long clock_id,
+ long long tp);
+void __sanitizer_syscall_pre_impl___nanosleep50(long long rqtp, long long rmtp);
+void __sanitizer_syscall_post_impl___nanosleep50(long long res, long long rqtp,
+ long long rmtp);
+void __sanitizer_syscall_pre_impl_____sigtimedwait50(long long set,
+ long long info,
+ long long timeout);
+void __sanitizer_syscall_post_impl_____sigtimedwait50(long long res,
+ long long set,
+ long long info,
+ long long timeout);
+void __sanitizer_syscall_pre_impl___mq_timedsend50(long long mqdes,
+ long long msg_ptr,
+ long long msg_len,
+ long long msg_prio,
+ long long abs_timeout);
+void __sanitizer_syscall_post_impl___mq_timedsend50(
+ long long res, long long mqdes, long long msg_ptr, long long msg_len,
+ long long msg_prio, long long abs_timeout);
+void __sanitizer_syscall_pre_impl___mq_timedreceive50(long long mqdes,
+ long long msg_ptr,
+ long long msg_len,
+ long long msg_prio,
+ long long abs_timeout);
+void __sanitizer_syscall_post_impl___mq_timedreceive50(
+ long long res, long long mqdes, long long msg_ptr, long long msg_len,
+ long long msg_prio, long long abs_timeout);
+void __sanitizer_syscall_pre_impl_compat_60__lwp_park(long long ts,
+ long long unpark,
+ long long hint,
+ long long unparkhint);
+void __sanitizer_syscall_post_impl_compat_60__lwp_park(long long res,
+ long long ts,
+ long long unpark,
+ long long hint,
+ long long unparkhint);
+void __sanitizer_syscall_pre_impl___kevent50(long long fd, long long changelist,
+ long long nchanges,
+ long long eventlist,
+ long long nevents,
+ long long timeout);
+void __sanitizer_syscall_post_impl___kevent50(
+ long long res, long long fd, long long changelist, long long nchanges,
+ long long eventlist, long long nevents, long long timeout);
+void __sanitizer_syscall_pre_impl___pselect50(long long nd, long long in,
+ long long ou, long long ex,
+ long long ts, long long mask);
+void __sanitizer_syscall_post_impl___pselect50(long long res, long long nd,
+ long long in, long long ou,
+ long long ex, long long ts,
+ long long mask);
+void __sanitizer_syscall_pre_impl___pollts50(long long fds, long long nfds,
+ long long ts, long long mask);
+void __sanitizer_syscall_post_impl___pollts50(long long res, long long fds,
+ long long nfds, long long ts,
+ long long mask);
+void __sanitizer_syscall_pre_impl___aio_suspend50(long long list,
+ long long nent,
+ long long timeout);
+void __sanitizer_syscall_post_impl___aio_suspend50(long long res,
+ long long list,
+ long long nent,
+ long long timeout);
+void __sanitizer_syscall_pre_impl___stat50(long long path, long long ub);
+void __sanitizer_syscall_post_impl___stat50(long long res, long long path,
+ long long ub);
+void __sanitizer_syscall_pre_impl___fstat50(long long fd, long long sb);
+void __sanitizer_syscall_post_impl___fstat50(long long res, long long fd,
+ long long sb);
+void __sanitizer_syscall_pre_impl___lstat50(long long path, long long ub);
+void __sanitizer_syscall_post_impl___lstat50(long long res, long long path,
+ long long ub);
+void __sanitizer_syscall_pre_impl_____semctl50(long long semid,
+ long long semnum, long long cmd,
+ long long arg);
+void __sanitizer_syscall_post_impl_____semctl50(long long res, long long semid,
+ long long semnum, long long cmd,
+ long long arg);
+void __sanitizer_syscall_pre_impl___shmctl50(long long shmid, long long cmd,
+ long long buf);
+void __sanitizer_syscall_post_impl___shmctl50(long long res, long long shmid,
+ long long cmd, long long buf);
+void __sanitizer_syscall_pre_impl___msgctl50(long long msqid, long long cmd,
+ long long buf);
+void __sanitizer_syscall_post_impl___msgctl50(long long res, long long msqid,
+ long long cmd, long long buf);
+void __sanitizer_syscall_pre_impl___getrusage50(long long who,
+ long long rusage);
+void __sanitizer_syscall_post_impl___getrusage50(long long res, long long who,
+ long long rusage);
+void __sanitizer_syscall_pre_impl___timer_settime50(long long timerid,
+ long long flags,
+ long long value,
+ long long ovalue);
+void __sanitizer_syscall_post_impl___timer_settime50(long long res,
+ long long timerid,
+ long long flags,
+ long long value,
+ long long ovalue);
+void __sanitizer_syscall_pre_impl___timer_gettime50(long long timerid,
+ long long value);
+void __sanitizer_syscall_post_impl___timer_gettime50(long long res,
+ long long timerid,
+ long long value);
+#if defined(NTP) || !defined(_KERNEL_OPT)
+void __sanitizer_syscall_pre_impl___ntp_gettime50(long long ntvp);
+void __sanitizer_syscall_post_impl___ntp_gettime50(long long res,
+ long long ntvp);
+#else
+/* syscall 448 has been skipped */
+#endif
+void __sanitizer_syscall_pre_impl___wait450(long long pid, long long status,
+ long long options,
+ long long rusage);
+void __sanitizer_syscall_post_impl___wait450(long long res, long long pid,
+ long long status,
+ long long options,
+ long long rusage);
+void __sanitizer_syscall_pre_impl___mknod50(long long path, long long mode,
+ long long dev);
+void __sanitizer_syscall_post_impl___mknod50(long long res, long long path,
+ long long mode, long long dev);
+void __sanitizer_syscall_pre_impl___fhstat50(long long fhp, long long fh_size,
+ long long sb);
+void __sanitizer_syscall_post_impl___fhstat50(long long res, long long fhp,
+ long long fh_size, long long sb);
+/* syscall 452 has been skipped */
+void __sanitizer_syscall_pre_impl_pipe2(long long fildes, long long flags);
+void __sanitizer_syscall_post_impl_pipe2(long long res, long long fildes,
+ long long flags);
+void __sanitizer_syscall_pre_impl_dup3(long long from, long long to,
+ long long flags);
+void __sanitizer_syscall_post_impl_dup3(long long res, long long from,
+ long long to, long long flags);
+void __sanitizer_syscall_pre_impl_kqueue1(long long flags);
+void __sanitizer_syscall_post_impl_kqueue1(long long res, long long flags);
+void __sanitizer_syscall_pre_impl_paccept(long long s, long long name,
+ long long anamelen, long long mask,
+ long long flags);
+void __sanitizer_syscall_post_impl_paccept(long long res, long long s,
+ long long name, long long anamelen,
+ long long mask, long long flags);
+void __sanitizer_syscall_pre_impl_linkat(long long fd1, long long name1,
+ long long fd2, long long name2,
+ long long flags);
+void __sanitizer_syscall_post_impl_linkat(long long res, long long fd1,
+ long long name1, long long fd2,
+ long long name2, long long flags);
+void __sanitizer_syscall_pre_impl_renameat(long long fromfd, long long from,
+ long long tofd, long long to);
+void __sanitizer_syscall_post_impl_renameat(long long res, long long fromfd,
+ long long from, long long tofd,
+ long long to);
+void __sanitizer_syscall_pre_impl_mkfifoat(long long fd, long long path,
+ long long mode);
+void __sanitizer_syscall_post_impl_mkfifoat(long long res, long long fd,
+ long long path, long long mode);
+void __sanitizer_syscall_pre_impl_mknodat(long long fd, long long path,
+ long long mode, long long PAD,
+ long long dev);
+void __sanitizer_syscall_post_impl_mknodat(long long res, long long fd,
+ long long path, long long mode,
+ long long PAD, long long dev);
+void __sanitizer_syscall_pre_impl_mkdirat(long long fd, long long path,
+ long long mode);
+void __sanitizer_syscall_post_impl_mkdirat(long long res, long long fd,
+ long long path, long long mode);
+void __sanitizer_syscall_pre_impl_faccessat(long long fd, long long path,
+ long long amode, long long flag);
+void __sanitizer_syscall_post_impl_faccessat(long long res, long long fd,
+ long long path, long long amode,
+ long long flag);
+void __sanitizer_syscall_pre_impl_fchmodat(long long fd, long long path,
+ long long mode, long long flag);
+void __sanitizer_syscall_post_impl_fchmodat(long long res, long long fd,
+ long long path, long long mode,
+ long long flag);
+void __sanitizer_syscall_pre_impl_fchownat(long long fd, long long path,
+ long long owner, long long group,
+ long long flag);
+void __sanitizer_syscall_post_impl_fchownat(long long res, long long fd,
+ long long path, long long owner,
+ long long group, long long flag);
+void __sanitizer_syscall_pre_impl_fexecve(long long fd, long long argp,
+ long long envp);
+void __sanitizer_syscall_post_impl_fexecve(long long res, long long fd,
+ long long argp, long long envp);
+void __sanitizer_syscall_pre_impl_fstatat(long long fd, long long path,
+ long long buf, long long flag);
+void __sanitizer_syscall_post_impl_fstatat(long long res, long long fd,
+ long long path, long long buf,
+ long long flag);
+void __sanitizer_syscall_pre_impl_utimensat(long long fd, long long path,
+ long long tptr, long long flag);
+void __sanitizer_syscall_post_impl_utimensat(long long res, long long fd,
+ long long path, long long tptr,
+ long long flag);
+void __sanitizer_syscall_pre_impl_openat(long long fd, long long path,
+ long long oflags, long long mode);
+void __sanitizer_syscall_post_impl_openat(long long res, long long fd,
+ long long path, long long oflags,
+ long long mode);
+void __sanitizer_syscall_pre_impl_readlinkat(long long fd, long long path,
+ long long buf, long long bufsize);
+void __sanitizer_syscall_post_impl_readlinkat(long long res, long long fd,
+ long long path, long long buf,
+ long long bufsize);
+void __sanitizer_syscall_pre_impl_symlinkat(long long path1, long long fd,
+ long long path2);
+void __sanitizer_syscall_post_impl_symlinkat(long long res, long long path1,
+ long long fd, long long path2);
+void __sanitizer_syscall_pre_impl_unlinkat(long long fd, long long path,
+ long long flag);
+void __sanitizer_syscall_post_impl_unlinkat(long long res, long long fd,
+ long long path, long long flag);
+void __sanitizer_syscall_pre_impl_futimens(long long fd, long long tptr);
+void __sanitizer_syscall_post_impl_futimens(long long res, long long fd,
+ long long tptr);
+void __sanitizer_syscall_pre_impl___quotactl(long long path, long long args);
+void __sanitizer_syscall_post_impl___quotactl(long long res, long long path,
+ long long args);
+void __sanitizer_syscall_pre_impl_posix_spawn(long long pid, long long path,
+ long long file_actions,
+ long long attrp, long long argv,
+ long long envp);
+void __sanitizer_syscall_post_impl_posix_spawn(long long res, long long pid,
+ long long path,
+ long long file_actions,
+ long long attrp, long long argv,
+ long long envp);
+void __sanitizer_syscall_pre_impl_recvmmsg(long long s, long long mmsg,
+ long long vlen, long long flags,
+ long long timeout);
+void __sanitizer_syscall_post_impl_recvmmsg(long long res, long long s,
+ long long mmsg, long long vlen,
+ long long flags, long long timeout);
+void __sanitizer_syscall_pre_impl_sendmmsg(long long s, long long mmsg,
+ long long vlen, long long flags);
+void __sanitizer_syscall_post_impl_sendmmsg(long long res, long long s,
+ long long mmsg, long long vlen,
+ long long flags);
+void __sanitizer_syscall_pre_impl_clock_nanosleep(long long clock_id,
+ long long flags,
+ long long rqtp,
+ long long rmtp);
+void __sanitizer_syscall_post_impl_clock_nanosleep(long long res,
+ long long clock_id,
+ long long flags,
+ long long rqtp,
+ long long rmtp);
+void __sanitizer_syscall_pre_impl____lwp_park60(long long clock_id,
+ long long flags, long long ts,
+ long long unpark,
+ long long hint,
+ long long unparkhint);
+void __sanitizer_syscall_post_impl____lwp_park60(
+ long long res, long long clock_id, long long flags, long long ts,
+ long long unpark, long long hint, long long unparkhint);
+void __sanitizer_syscall_pre_impl_posix_fallocate(long long fd, long long PAD,
+ long long pos, long long len);
+void __sanitizer_syscall_post_impl_posix_fallocate(long long res, long long fd,
+ long long PAD, long long pos,
+ long long len);
+void __sanitizer_syscall_pre_impl_fdiscard(long long fd, long long PAD,
+ long long pos, long long len);
+void __sanitizer_syscall_post_impl_fdiscard(long long res, long long fd,
+ long long PAD, long long pos,
+ long long len);
+void __sanitizer_syscall_pre_impl_wait6(long long idtype, long long id,
+ long long status, long long options,
+ long long wru, long long info);
+void __sanitizer_syscall_post_impl_wait6(long long res, long long idtype,
+ long long id, long long status,
+ long long options, long long wru,
+ long long info);
+void __sanitizer_syscall_pre_impl_clock_getcpuclockid2(long long idtype,
+ long long id,
+ long long clock_id);
+void __sanitizer_syscall_post_impl_clock_getcpuclockid2(long long res,
+ long long idtype,
+ long long id,
+ long long clock_id);
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+// DO NOT EDIT! THIS FILE HAS BEEN GENERATED!
+
+#endif // SANITIZER_NETBSD_SYSCALL_HOOKS_H
diff --git a/include/sanitizer/scudo_interface.h b/include/sanitizer/scudo_interface.h
index ec7a9e4e150c..be605f1d7fd9 100644
--- a/include/sanitizer/scudo_interface.h
+++ b/include/sanitizer/scudo_interface.h
@@ -26,7 +26,12 @@ extern "C" {
// the hard limit (HardLimit=1) or the soft limit (HardLimit=0). The limit
// can be removed by setting LimitMb to 0. This function's parameters should
// be fully trusted to avoid security mishaps.
- void __scudo_set_rss_limit(unsigned long LimitMb, int HardLimit);
+ void __scudo_set_rss_limit(size_t LimitMb, int HardLimit);
+
+ // This function outputs various allocator statistics for both the Primary
+ // and Secondary allocators, including memory usage, number of allocations
+ // and deallocations.
+ void __scudo_print_stats(void);
#ifdef __cplusplus
} // extern "C"
#endif
diff --git a/include/xray/xray_interface.h b/include/xray/xray_interface.h
index d08039a67fa2..ba4c0e81269d 100644
--- a/include/xray/xray_interface.h
+++ b/include/xray/xray_interface.h
@@ -27,6 +27,7 @@ enum XRayEntryType {
TAIL = 2,
LOG_ARGS_ENTRY = 3,
CUSTOM_EVENT = 4,
+ TYPED_EVENT = 5,
};
/// Provide a function to invoke for when instrumentation points are hit. This
@@ -68,12 +69,23 @@ extern int __xray_set_handler_arg1(void (*entry)(int32_t, XRayEntryType,
extern int __xray_remove_handler_arg1();
/// Provide a function to invoke when XRay encounters a custom event.
-extern int __xray_set_customevent_handler(void (*entry)(void*, std::size_t));
+extern int __xray_set_customevent_handler(void (*entry)(void *, std::size_t));
/// This removes whatever the currently provided custom event handler is.
/// Returns 1 on success, 0 on error.
extern int __xray_remove_customevent_handler();
+/// Set a handler for xray typed event logging. The first parameter is a type
+/// identifier, the second is a payload, and the third is the payload size.
+extern int __xray_set_typedevent_handler(void (*entry)(uint16_t, const void *,
+ std::size_t));
+
+/// Removes the currently set typed event handler.
+/// Returns 1 on success, 0 on error.
+extern int __xray_remove_typedevent_handler();
+
+extern uint16_t __xray_register_event_type(const char *event_type);
+
enum XRayPatchingStatus {
NOT_INITIALIZED = 0,
SUCCESS = 1,
diff --git a/include/xray/xray_log_interface.h b/include/xray/xray_log_interface.h
index 6c53cdaebfe2..5f8b3a4a06a4 100644
--- a/include/xray/xray_log_interface.h
+++ b/include/xray/xray_log_interface.h
@@ -21,27 +21,29 @@
///
/// The high-level usage pattern for these APIs look like the following:
///
-/// // Before we try initializing the log implementation, we must set it as
-/// // the log implementation. We provide the function pointers that define
-/// // the various initialization, finalization, and other pluggable hooks
-/// // that we need.
-/// __xray_set_log_impl({...});
-///
-/// // Once that's done, we can now initialize the implementation. Each
-/// // implementation has a chance to let users customize the implementation
-/// // with a struct that their implementation supports. Roughly this might
-/// // look like:
-/// MyImplementationOptions opts;
-/// opts.enable_feature = true;
-/// ...
-/// auto init_status = __xray_log_init(
-/// BufferSize, MaxBuffers, &opts, sizeof opts);
-/// if (init_status != XRayLogInitStatus::XRAY_LOG_INITIALIZED) {
+/// // We choose the mode which we'd like to install, and check whether this
+/// // has succeeded. Each mode will have their own set of flags they will
+/// // support, outside of the global XRay configuration options that are
+/// // defined in the XRAY_OPTIONS environment variable.
+/// auto select_status = __xray_log_select_mode("xray-fdr");
+/// if (select_status != XRayLogRegisterStatus::XRAY_REGISTRATION_OK) {
+/// // This failed, we should not proceed with attempting to initialise
+/// // the currently selected mode.
+/// return;
+/// }
+///
+/// // Once that's done, we can now attempt to configure the implementation.
+/// // To do this, we provide the string flags configuration for the mode.
+/// auto config_status = __xray_log_init_mode(
+/// "xray-fdr", "verbosity=1 some_flag=1 another_flag=2");
+/// if (config_status != XRayLogInitStatus::XRAY_LOG_INITIALIZED) {
/// // deal with the error here, if there is one.
/// }
///
/// // When the log implementation has had the chance to initialize, we can
-/// // now patch the sleds.
+/// // now patch the instrumentation points. Note that we could have patched
+/// // the instrumentation points first, but there's no strict ordering to
+/// // these operations.
/// auto patch_status = __xray_patch();
/// if (patch_status != XRayPatchingStatus::SUCCESS) {
/// // deal with the error here, if it is an error.
@@ -56,12 +58,12 @@
///
/// // We can optionally wait before flushing the log to give other threads a
/// // chance to see that the implementation is already finalized. Also, at
-/// // this point we can optionally unpatch the sleds to reduce overheads at
-/// // runtime.
+/// // this point we can optionally unpatch the instrumentation points to
+/// // reduce overheads at runtime.
/// auto unpatch_status = __xray_unpatch();
/// if (unpatch_status != XRayPatchingStatus::SUCCESS) {
-// // deal with the error here, if it is an error.
-// }
+/// // deal with the error here, if it is an error.
+/// }
///
/// // If there are logs or data to be flushed somewhere, we can do so only
/// // after we've finalized the log. Some implementations may not actually
@@ -72,6 +74,17 @@
/// // deal with the error here, if it is an error.
/// }
///
+/// // Alternatively, we can go through the buffers ourselves without
+/// // relying on the implementations' flushing semantics (if the
+/// // implementation supports exporting this data directly).
+/// auto MyBufferProcessor = +[](const char* mode, XRayBuffer buffer) {
+/// // Check the "mode" to see if it's something we know how to handle...
+/// // and/or do something with an XRayBuffer instance.
+/// };
+/// auto process_status = __xray_log_process_buffers(MyBufferProcessor);
+/// if (process_status != XRayLogFlushStatus::XRAY_LOG_FLUSHED) {
+/// // deal with the error here, if it is an error.
+/// }
///
/// NOTE: Before calling __xray_patch() again, consider re-initializing the
/// implementation first. Some implementations might stay in an "off" state when
@@ -182,9 +195,13 @@ struct XRayLogImpl {
XRayLogFlushStatus (*flush_log)();
};
+/// DEPRECATED: Use the mode registration workflow instead with
+/// __xray_log_register_mode(...) and __xray_log_select_mode(...). See the
+/// documentation for those function.
+///
/// This function installs a new logging implementation that XRay will use. In
/// case there are any nullptr members in Impl, XRay will *uninstall any
-/// existing implementations*. It does NOT patch the instrumentation sleds.
+/// existing implementations*. It does NOT patch the instrumentation points.
///
/// NOTE: This function does NOT attempt to finalize the currently installed
/// implementation. Use with caution.
@@ -227,9 +244,14 @@ XRayLogRegisterStatus __xray_log_register_mode(const char *Mode,
/// does not update the currently installed implementation.
XRayLogRegisterStatus __xray_log_select_mode(const char *Mode);
+/// Returns an identifier for the currently selected XRay mode chosen through
+/// the __xray_log_select_mode(...) function call. Returns nullptr if there is
+/// no currently installed mode.
+const char *__xray_log_get_current_mode();
+
/// This function removes the currently installed implementation. It will also
/// uninstall any handlers that have been previously installed. It does NOT
-/// unpatch the instrumentation sleds.
+/// unpatch the instrumentation points.
///
/// NOTE: This function does NOT attempt to finalize the currently installed
/// implementation. Use with caution.
@@ -244,11 +266,37 @@ XRayLogRegisterStatus __xray_log_select_mode(const char *Mode);
/// called while in any other states.
void __xray_remove_log_impl();
+/// DEPRECATED: Use __xray_log_init_mode() instead, and provide all the options
+/// in string form.
/// Invokes the installed implementation initialization routine. See
/// XRayLogInitStatus for what the return values mean.
XRayLogInitStatus __xray_log_init(size_t BufferSize, size_t MaxBuffers,
void *Args, size_t ArgsSize);
+/// Invokes the installed initialization routine, which *must* support the
+/// string based form.
+///
+/// NOTE: When this API is used, we still invoke the installed initialization
+/// routine, but we will call it with the following convention to signal that we
+/// are using the string form:
+///
+/// - BufferSize = 0
+/// - MaxBuffers = 0
+/// - ArgsSize = 0
+/// - Args will be the pointer to the character buffer representing the
+/// configuration.
+///
+/// FIXME: Updating the XRayLogImpl struct is an ABI breaking change. When we
+/// are ready to make a breaking change, we should clean this up appropriately.
+XRayLogInitStatus __xray_log_init_mode(const char *Mode, const char *Config);
+
+/// Like __xray_log_init_mode(...) this version allows for providing
+/// configurations that might have non-null-terminated strings. This will
+/// operate similarly to __xray_log_init_mode, with the exception that
+/// |ArgsSize| will be what |ConfigSize| is.
+XRayLogInitStatus __xray_log_init_mode_bin(const char *Mode, const char *Config,
+ size_t ConfigSize);
+
/// Invokes the installed implementation finalization routine. See
/// XRayLogInitStatus for what the return values mean.
XRayLogInitStatus __xray_log_finalize();
@@ -257,16 +305,68 @@ XRayLogInitStatus __xray_log_finalize();
/// XRayLogFlushStatus for what the return values mean.
XRayLogFlushStatus __xray_log_flushLog();
+/// An XRayBuffer represents a section of memory which can be treated by log
+/// processing functions as bytes stored in the logging implementation's
+/// buffers.
+struct XRayBuffer {
+ const void *Data;
+ size_t Size;
+};
+
+/// Registers an iterator function which takes an XRayBuffer argument, then
+/// returns another XRayBuffer function representing the next buffer. When the
+/// Iterator function returns an empty XRayBuffer (Data = nullptr, Size = 0),
+/// this signifies the end of the buffers.
+///
+/// The first invocation of this Iterator function will always take an empty
+/// XRayBuffer (Data = nullptr, Size = 0).
+void __xray_log_set_buffer_iterator(XRayBuffer (*Iterator)(XRayBuffer));
+
+/// Removes the currently registered buffer iterator function.
+void __xray_log_remove_buffer_iterator();
+
+/// Invokes the provided handler to process data maintained by the logging
+/// handler. This API will be provided raw access to the data available in
+/// memory from the logging implementation. The callback function must:
+///
+/// 1) Not modify the data, to avoid running into undefined behaviour.
+///
+/// 2) Either know the data layout, or treat the data as raw bytes for later
+/// interpretation.
+///
+/// This API is best used in place of the `__xray_log_flushLog()` implementation
+/// above to enable the caller to provide an alternative means of extracting the
+/// data from the XRay implementation.
+///
+/// Implementations MUST then provide:
+///
+/// 1) A function that will return an XRayBuffer. Functions that return an
+/// "empty" XRayBuffer signifies that there are no more buffers to be
+/// processed. This function should be registered through the
+/// `__xray_log_set_buffer_iterator(...)` function.
+///
+/// 2) Its own means of converting data it holds in memory into an XRayBuffer
+/// structure.
+///
+/// See XRayLogFlushStatus for what the return values mean.
+///
+XRayLogFlushStatus __xray_log_process_buffers(void (*Processor)(const char *,
+ 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;
diff --git a/include/xray/xray_records.h b/include/xray/xray_records.h
index d4b7b4c31a9a..8cfdeee8cf2b 100644
--- a/include/xray/xray_records.h
+++ b/include/xray/xray_records.h
@@ -54,7 +54,7 @@ struct alignas(32) XRayFileHeader {
union {
char FreeForm[16];
- // The current civiltime timestamp, as retrived from 'clock_gettime'. This
+ // The current civiltime timestamp, as retrieved from 'clock_gettime'. This
// allows readers of the file to determine when the file was created or
// written down.
struct timespec TS;
@@ -95,8 +95,11 @@ struct alignas(32) XRayRecord {
// The thread ID for the currently running thread.
uint32_t TId = 0;
+ // The ID of process that is currently running
+ uint32_t PId = 0;
+
// Use some bytes in the end of the record for buffers.
- char Buffer[4] = {};
+ char Buffer[8] = {};
} __attribute__((packed));
static_assert(sizeof(XRayRecord) == 32, "XRayRecord != 32 bytes");
@@ -115,8 +118,8 @@ struct alignas(32) XRayArgPayload {
// The thread ID for the currently running thread.
uint32_t TId = 0;
- // Add more padding.
- uint8_t Padding2[4] = {};
+ // The ID of process that is currently running
+ uint32_t PId = 0;
// The argument payload.
uint64_t Arg = 0;
diff --git a/lib/asan/.clang-format b/lib/asan/.clang-format
index f6cb8ad931f5..560308c91dee 100644
--- a/lib/asan/.clang-format
+++ b/lib/asan/.clang-format
@@ -1 +1,2 @@
BasedOnStyle: Google
+AllowShortIfStatementsOnASingleLine: false
diff --git a/lib/asan/CMakeLists.txt b/lib/asan/CMakeLists.txt
index fbd72f69298f..2ae5c85ecefb 100644
--- a/lib/asan/CMakeLists.txt
+++ b/lib/asan/CMakeLists.txt
@@ -23,6 +23,7 @@ set(ASAN_SOURCES
asan_posix.cc
asan_premap_shadow.cc
asan_report.cc
+ asan_rtems.cc
asan_rtl.cc
asan_shadow_setup.cc
asan_stack.cc
@@ -37,6 +38,34 @@ set(ASAN_CXX_SOURCES
set(ASAN_PREINIT_SOURCES
asan_preinit.cc)
+SET(ASAN_HEADERS
+ asan_activation.h
+ asan_activation_flags.inc
+ asan_allocator.h
+ asan_descriptions.h
+ asan_errors.h
+ asan_fake_stack.h
+ asan_flags.h
+ asan_flags.inc
+ asan_init_version.h
+ asan_interceptors.h
+ asan_interceptors_memintrinsics.h
+ asan_interface.inc
+ asan_interface_internal.h
+ asan_internal.h
+ asan_lock.h
+ asan_malloc_local.h
+ asan_mapping.h
+ asan_mapping_myriad.h
+ asan_poisoning.h
+ asan_premap_shadow.h
+ asan_report.h
+ asan_scariness_score.h
+ asan_stack.h
+ asan_stats.h
+ asan_suppressions.h
+ asan_thread.h)
+
include_directories(..)
set(ASAN_CFLAGS ${SANITIZER_COMMON_CFLAGS})
@@ -46,20 +75,6 @@ append_rtti_flag(OFF ASAN_CFLAGS)
set(ASAN_DYNAMIC_LINK_FLAGS ${SANITIZER_COMMON_LINK_FLAGS})
-if(ANDROID)
-# On Android, -z global does not do what it is documented to do.
-# On Android, -z global moves the library ahead in the lookup order,
-# placing it right after the LD_PRELOADs. This is used to compensate for the fact
-# that Android linker does not look at the dependencies of the main executable
-# that aren't dependencies of the current DSO when resolving symbols from said DSO.
-# As a net result, this allows running ASan executables without LD_PRELOAD-ing the
-# ASan runtime library.
-# The above is applicable to L MR1 or newer.
- if (COMPILER_RT_HAS_Z_GLOBAL)
- list(APPEND ASAN_DYNAMIC_LINK_FLAGS -Wl,-z,global)
- endif()
-endif()
-
set(ASAN_DYNAMIC_DEFINITIONS
${ASAN_COMMON_DEFINITIONS} ASAN_DYNAMIC=1)
append_list_if(WIN32 INTERCEPTION_DYNAMIC_CRT ASAN_DYNAMIC_DEFINITIONS)
@@ -83,21 +98,28 @@ add_compiler_rt_object_libraries(RTAsan_dynamic
OS ${SANITIZER_COMMON_SUPPORTED_OS}
ARCHS ${ASAN_SUPPORTED_ARCH}
SOURCES ${ASAN_SOURCES} ${ASAN_CXX_SOURCES}
+ ADDITIONAL_HEADERS ${ASAN_HEADERS}
CFLAGS ${ASAN_DYNAMIC_CFLAGS}
DEFS ${ASAN_DYNAMIC_DEFINITIONS})
if(NOT APPLE)
add_compiler_rt_object_libraries(RTAsan
ARCHS ${ASAN_SUPPORTED_ARCH}
- SOURCES ${ASAN_SOURCES} CFLAGS ${ASAN_CFLAGS}
+ SOURCES ${ASAN_SOURCES}
+ ADDITIONAL_HEADERS ${ASAN_HEADERS}
+ CFLAGS ${ASAN_CFLAGS}
DEFS ${ASAN_COMMON_DEFINITIONS})
add_compiler_rt_object_libraries(RTAsan_cxx
ARCHS ${ASAN_SUPPORTED_ARCH}
- SOURCES ${ASAN_CXX_SOURCES} CFLAGS ${ASAN_CFLAGS}
+ SOURCES ${ASAN_CXX_SOURCES}
+ ADDITIONAL_HEADERS ${ASAN_HEADERS}
+ CFLAGS ${ASAN_CFLAGS}
DEFS ${ASAN_COMMON_DEFINITIONS})
add_compiler_rt_object_libraries(RTAsan_preinit
ARCHS ${ASAN_SUPPORTED_ARCH}
- SOURCES ${ASAN_PREINIT_SOURCES} CFLAGS ${ASAN_CFLAGS}
+ SOURCES ${ASAN_PREINIT_SOURCES}
+ ADDITIONAL_HEADERS ${ASAN_HEADERS}
+ CFLAGS ${ASAN_CFLAGS}
DEFS ${ASAN_COMMON_DEFINITIONS})
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/dummy.cc "")
@@ -125,6 +147,8 @@ if(APPLE)
RTInterception
RTSanitizerCommon
RTSanitizerCommonLibc
+ RTSanitizerCommonCoverage
+ RTSanitizerCommonSymbolizer
RTLSanCommon
RTUbsan
CFLAGS ${ASAN_DYNAMIC_CFLAGS}
@@ -138,6 +162,8 @@ else()
RTInterception
RTSanitizerCommon
RTSanitizerCommonLibc
+ RTSanitizerCommonCoverage
+ RTSanitizerCommonSymbolizer
RTLSanCommon
RTUbsan)
@@ -223,7 +249,7 @@ else()
DEFS ${ASAN_DYNAMIC_DEFINITIONS}
PARENT_TARGET asan)
- if (UNIX AND NOT ${arch} STREQUAL "i386")
+ if (SANITIZER_USE_SYMBOLS AND NOT ${arch} STREQUAL "i386")
add_sanitizer_rt_symbols(clang_rt.asan_cxx
ARCHS ${arch})
add_dependencies(asan clang_rt.asan_cxx-${arch}-symbols)
diff --git a/lib/asan/asan_allocator.cc b/lib/asan/asan_allocator.cc
index a437ae1cd3b1..c0fad4fa042b 100644
--- a/lib/asan/asan_allocator.cc
+++ b/lib/asan/asan_allocator.cc
@@ -134,8 +134,9 @@ struct AsanChunk: ChunkBase {
};
struct QuarantineCallback {
- explicit QuarantineCallback(AllocatorCache *cache)
- : cache_(cache) {
+ QuarantineCallback(AllocatorCache *cache, BufferedStackTrace *stack)
+ : cache_(cache),
+ stack_(stack) {
}
void Recycle(AsanChunk *m) {
@@ -168,7 +169,7 @@ struct QuarantineCallback {
void *res = get_allocator().Allocate(cache_, size, 1);
// TODO(alekseys): Consider making quarantine OOM-friendly.
if (UNLIKELY(!res))
- return DieOnFailure::OnOOM();
+ ReportOutOfMemory(size, stack_);
return res;
}
@@ -176,7 +177,9 @@ struct QuarantineCallback {
get_allocator().Deallocate(cache_, p);
}
- AllocatorCache *cache_;
+ private:
+ AllocatorCache* const cache_;
+ BufferedStackTrace* const stack_;
};
typedef Quarantine<QuarantineCallback, AsanChunk> AsanQuarantine;
@@ -397,8 +400,11 @@ struct Allocator {
AllocType alloc_type, bool can_fill) {
if (UNLIKELY(!asan_inited))
AsanInitFromRtl();
- if (RssLimitExceeded())
- return AsanAllocator::FailureHandler::OnOOM();
+ if (RssLimitExceeded()) {
+ if (AllocatorMayReturnNull())
+ return nullptr;
+ ReportRssLimitExceeded(stack);
+ }
Flags &fl = *flags();
CHECK(stack);
const uptr min_alignment = SHADOW_GRANULARITY;
@@ -431,9 +437,13 @@ struct Allocator {
}
CHECK(IsAligned(needed_size, min_alignment));
if (size > kMaxAllowedMallocSize || needed_size > kMaxAllowedMallocSize) {
- Report("WARNING: AddressSanitizer failed to allocate 0x%zx bytes\n",
- (void*)size);
- return AsanAllocator::FailureHandler::OnBadRequest();
+ if (AllocatorMayReturnNull()) {
+ Report("WARNING: AddressSanitizer failed to allocate 0x%zx bytes\n",
+ (void*)size);
+ return nullptr;
+ }
+ ReportAllocationSizeTooBig(size, needed_size, kMaxAllowedMallocSize,
+ stack);
}
AsanThread *t = GetCurrentThread();
@@ -446,8 +456,12 @@ struct Allocator {
AllocatorCache *cache = &fallback_allocator_cache;
allocated = allocator.Allocate(cache, needed_size, 8);
}
- if (!allocated)
- return nullptr;
+ if (UNLIKELY(!allocated)) {
+ SetAllocatorOutOfMemory();
+ if (AllocatorMayReturnNull())
+ return nullptr;
+ ReportOutOfMemory(size, stack);
+ }
if (*(u8 *)MEM_TO_SHADOW((uptr)allocated) == 0 && CanPoisonMemory()) {
// Heap poisoning is enabled, but the allocator provides an unpoisoned
@@ -583,13 +597,13 @@ struct Allocator {
if (t) {
AsanThreadLocalMallocStorage *ms = &t->malloc_storage();
AllocatorCache *ac = GetAllocatorCache(ms);
- quarantine.Put(GetQuarantineCache(ms), QuarantineCallback(ac), m,
- m->UsedSize());
+ quarantine.Put(GetQuarantineCache(ms), QuarantineCallback(ac, stack), m,
+ m->UsedSize());
} else {
SpinMutexLock l(&fallback_mutex);
AllocatorCache *ac = &fallback_allocator_cache;
- quarantine.Put(&fallback_quarantine_cache, QuarantineCallback(ac), m,
- m->UsedSize());
+ quarantine.Put(&fallback_quarantine_cache, QuarantineCallback(ac, stack),
+ m, m->UsedSize());
}
}
@@ -660,8 +674,11 @@ struct Allocator {
}
void *Calloc(uptr nmemb, uptr size, BufferedStackTrace *stack) {
- if (CheckForCallocOverflow(size, nmemb))
- return AsanAllocator::FailureHandler::OnBadRequest();
+ if (UNLIKELY(CheckForCallocOverflow(size, nmemb))) {
+ if (AllocatorMayReturnNull())
+ return nullptr;
+ ReportCallocOverflow(nmemb, size, stack);
+ }
void *ptr = Allocate(nmemb * size, 8, stack, FROM_MALLOC, false);
// If the memory comes from the secondary allocator no need to clear it
// as it comes directly from mmap.
@@ -677,9 +694,9 @@ struct Allocator {
ReportFreeNotMalloced((uptr)ptr, stack);
}
- void CommitBack(AsanThreadLocalMallocStorage *ms) {
+ void CommitBack(AsanThreadLocalMallocStorage *ms, BufferedStackTrace *stack) {
AllocatorCache *ac = GetAllocatorCache(ms);
- quarantine.Drain(GetQuarantineCache(ms), QuarantineCallback(ac));
+ quarantine.Drain(GetQuarantineCache(ms), QuarantineCallback(ac, stack));
allocator.SwallowCache(ac);
}
@@ -739,17 +756,19 @@ struct Allocator {
return AsanChunkView(m1);
}
- void Purge() {
+ void Purge(BufferedStackTrace *stack) {
AsanThread *t = GetCurrentThread();
if (t) {
AsanThreadLocalMallocStorage *ms = &t->malloc_storage();
quarantine.DrainAndRecycle(GetQuarantineCache(ms),
- QuarantineCallback(GetAllocatorCache(ms)));
+ QuarantineCallback(GetAllocatorCache(ms),
+ stack));
}
{
SpinMutexLock l(&fallback_mutex);
quarantine.DrainAndRecycle(&fallback_quarantine_cache,
- QuarantineCallback(&fallback_allocator_cache));
+ QuarantineCallback(&fallback_allocator_cache,
+ stack));
}
allocator.ForceReleaseToOS();
@@ -836,7 +855,8 @@ AsanChunkView FindHeapChunkByAllocBeg(uptr addr) {
}
void AsanThreadLocalMallocStorage::CommitBack() {
- instance.CommitBack(this);
+ GET_STACK_TRACE_MALLOC;
+ instance.CommitBack(this, &stack);
}
void PrintInternalAllocatorStats() {
@@ -883,7 +903,9 @@ void *asan_pvalloc(uptr size, BufferedStackTrace *stack) {
uptr PageSize = GetPageSizeCached();
if (UNLIKELY(CheckForPvallocOverflow(size, PageSize))) {
errno = errno_ENOMEM;
- return AsanAllocator::FailureHandler::OnBadRequest();
+ if (AllocatorMayReturnNull())
+ return nullptr;
+ ReportPvallocOverflow(size, stack);
}
// pvalloc(0) should allocate one page.
size = size ? RoundUpTo(size, PageSize) : PageSize;
@@ -895,20 +917,35 @@ void *asan_memalign(uptr alignment, uptr size, BufferedStackTrace *stack,
AllocType alloc_type) {
if (UNLIKELY(!IsPowerOfTwo(alignment))) {
errno = errno_EINVAL;
- return AsanAllocator::FailureHandler::OnBadRequest();
+ if (AllocatorMayReturnNull())
+ return nullptr;
+ ReportInvalidAllocationAlignment(alignment, stack);
}
return SetErrnoOnNull(
instance.Allocate(size, alignment, stack, alloc_type, true));
}
+void *asan_aligned_alloc(uptr alignment, uptr size, BufferedStackTrace *stack) {
+ if (UNLIKELY(!CheckAlignedAllocAlignmentAndSize(alignment, size))) {
+ errno = errno_EINVAL;
+ if (AllocatorMayReturnNull())
+ return nullptr;
+ ReportInvalidAlignedAllocAlignment(size, alignment, stack);
+ }
+ return SetErrnoOnNull(
+ instance.Allocate(size, alignment, stack, FROM_MALLOC, true));
+}
+
int asan_posix_memalign(void **memptr, uptr alignment, uptr size,
BufferedStackTrace *stack) {
if (UNLIKELY(!CheckPosixMemalignAlignment(alignment))) {
- AsanAllocator::FailureHandler::OnBadRequest();
- return errno_EINVAL;
+ if (AllocatorMayReturnNull())
+ return errno_EINVAL;
+ ReportInvalidPosixMemalignAlignment(alignment, stack);
}
void *ptr = instance.Allocate(size, alignment, stack, FROM_MALLOC, true);
if (UNLIKELY(!ptr))
+ // OOM error is already taken care of by Allocate.
return errno_ENOMEM;
CHECK(IsAligned((uptr)ptr, alignment));
*memptr = ptr;
@@ -1054,7 +1091,8 @@ uptr __sanitizer_get_allocated_size(const void *p) {
}
void __sanitizer_purge_allocator() {
- instance.Purge();
+ GET_STACK_TRACE_MALLOC;
+ instance.Purge(&stack);
}
#if !SANITIZER_SUPPORTS_WEAK_HOOKS
diff --git a/lib/asan/asan_allocator.h b/lib/asan/asan_allocator.h
index 26483db4c60e..93d6f29c5bf5 100644
--- a/lib/asan/asan_allocator.h
+++ b/lib/asan/asan_allocator.h
@@ -125,11 +125,12 @@ const uptr kAllocatorSpace = ~(uptr)0;
const uptr kAllocatorSize = 0x40000000000ULL; // 4T.
typedef DefaultSizeClassMap SizeClassMap;
# elif defined(__powerpc64__)
-const uptr kAllocatorSpace = 0xa0000000000ULL;
+const uptr kAllocatorSpace = ~(uptr)0;
const uptr kAllocatorSize = 0x20000000000ULL; // 2T.
typedef DefaultSizeClassMap SizeClassMap;
# elif defined(__aarch64__) && SANITIZER_ANDROID
-const uptr kAllocatorSpace = 0x3000000000ULL;
+// Android needs to support 39, 42 and 48 bit VMA.
+const uptr kAllocatorSpace = ~(uptr)0;
const uptr kAllocatorSize = 0x2000000000ULL; // 128G.
typedef VeryCompactSizeClassMap SizeClassMap;
# elif defined(__aarch64__)
@@ -207,6 +208,7 @@ void *asan_realloc(void *p, uptr size, BufferedStackTrace *stack);
void *asan_valloc(uptr size, BufferedStackTrace *stack);
void *asan_pvalloc(uptr size, BufferedStackTrace *stack);
+void *asan_aligned_alloc(uptr alignment, uptr size, BufferedStackTrace *stack);
int asan_posix_memalign(void **memptr, uptr alignment, uptr size,
BufferedStackTrace *stack);
uptr asan_malloc_usable_size(const void *ptr, uptr pc, uptr bp);
diff --git a/lib/asan/asan_debugging.cc b/lib/asan/asan_debugging.cc
index 37c5922dc0fc..7c877ded30cf 100644
--- a/lib/asan/asan_debugging.cc
+++ b/lib/asan/asan_debugging.cc
@@ -27,7 +27,8 @@ using namespace __asan;
static void FindInfoForStackVar(uptr addr, const char *frame_descr, uptr offset,
char *name, uptr name_size,
uptr &region_address, uptr &region_size) {
- InternalMmapVector<StackVarDescr> vars(16);
+ InternalMmapVector<StackVarDescr> vars;
+ vars.reserve(16);
if (!ParseFrameDescription(frame_descr, &vars)) {
return;
}
diff --git a/lib/asan/asan_descriptions.cc b/lib/asan/asan_descriptions.cc
index 86c6af7d9f75..cdb562d975ff 100644
--- a/lib/asan/asan_descriptions.cc
+++ b/lib/asan/asan_descriptions.cc
@@ -20,23 +20,25 @@
namespace __asan {
-// Return " (thread_name) " or an empty string if the name is empty.
-const char *ThreadNameWithParenthesis(AsanThreadContext *t, char buff[],
- uptr buff_len) {
- const char *name = t->name;
- if (name[0] == '\0') return "";
- buff[0] = 0;
- internal_strncat(buff, " (", 3);
- internal_strncat(buff, name, buff_len - 4);
- internal_strncat(buff, ")", 2);
- return buff;
+AsanThreadIdAndName::AsanThreadIdAndName(AsanThreadContext *t) {
+ Init(t->tid, t->name);
}
-const char *ThreadNameWithParenthesis(u32 tid, char buff[], uptr buff_len) {
- if (tid == kInvalidTid) return "";
- asanThreadRegistry().CheckLocked();
- AsanThreadContext *t = GetThreadContextByTidLocked(tid);
- return ThreadNameWithParenthesis(t, buff, buff_len);
+AsanThreadIdAndName::AsanThreadIdAndName(u32 tid) {
+ if (tid == kInvalidTid) {
+ Init(tid, "");
+ } else {
+ asanThreadRegistry().CheckLocked();
+ AsanThreadContext *t = GetThreadContextByTidLocked(tid);
+ Init(tid, t->name);
+ }
+}
+
+void AsanThreadIdAndName::Init(u32 tid, const char *tname) {
+ int len = internal_snprintf(name, sizeof(name), "T%d", tid);
+ CHECK(((unsigned int)len) < sizeof(name));
+ if (tname[0] != '\0')
+ internal_snprintf(&name[len], sizeof(name) - len, " (%s)", tname);
}
void DescribeThread(AsanThreadContext *context) {
@@ -47,18 +49,15 @@ void DescribeThread(AsanThreadContext *context) {
return;
}
context->announced = true;
- char tname[128];
InternalScopedString str(1024);
- str.append("Thread T%d%s", context->tid,
- ThreadNameWithParenthesis(context->tid, tname, sizeof(tname)));
+ str.append("Thread %s", AsanThreadIdAndName(context).c_str());
if (context->parent_tid == kInvalidTid) {
str.append(" created by unknown thread\n");
Printf("%s", str.data());
return;
}
- str.append(
- " created by T%d%s here:\n", context->parent_tid,
- ThreadNameWithParenthesis(context->parent_tid, tname, sizeof(tname)));
+ str.append(" created by %s here:\n",
+ AsanThreadIdAndName(context->parent_tid).c_str());
Printf("%s", str.data());
StackDepotGet(context->stack_id).Print();
// Recursively described parent thread if needed.
@@ -358,10 +357,9 @@ bool GlobalAddressDescription::PointsInsideTheSameVariable(
void StackAddressDescription::Print() const {
Decorator d;
- char tname[128];
Printf("%s", d.Location());
- Printf("Address %p is located in stack of thread T%d%s", addr, tid,
- ThreadNameWithParenthesis(tid, tname, sizeof(tname)));
+ Printf("Address %p is located in stack of thread %s", addr,
+ AsanThreadIdAndName(tid).c_str());
if (!frame_descr) {
Printf("%s\n", d.Default());
@@ -380,7 +378,8 @@ void StackAddressDescription::Print() const {
StackTrace alloca_stack(&frame_pc, 1);
alloca_stack.Print();
- InternalMmapVector<StackVarDescr> vars(16);
+ InternalMmapVector<StackVarDescr> vars;
+ vars.reserve(16);
if (!ParseFrameDescription(frame_descr, &vars)) {
Printf(
"AddressSanitizer can't parse the stack frame "
@@ -402,7 +401,7 @@ void StackAddressDescription::Print() const {
}
Printf(
"HINT: this may be a false positive if your program uses "
- "some custom stack unwind mechanism or swapcontext\n");
+ "some custom stack unwind mechanism, swapcontext or vfork\n");
if (SANITIZER_WINDOWS)
Printf(" (longjmp, SEH and C++ exceptions *are* supported)\n");
else
@@ -418,26 +417,19 @@ void HeapAddressDescription::Print() const {
AsanThreadContext *alloc_thread = GetThreadContextByTidLocked(alloc_tid);
StackTrace alloc_stack = GetStackTraceFromId(alloc_stack_id);
- char tname[128];
Decorator d;
AsanThreadContext *free_thread = nullptr;
if (free_tid != kInvalidTid) {
free_thread = GetThreadContextByTidLocked(free_tid);
- Printf("%sfreed by thread T%d%s here:%s\n", d.Allocation(),
- free_thread->tid,
- ThreadNameWithParenthesis(free_thread, tname, sizeof(tname)),
- d.Default());
+ Printf("%sfreed by thread %s here:%s\n", d.Allocation(),
+ AsanThreadIdAndName(free_thread).c_str(), d.Default());
StackTrace free_stack = GetStackTraceFromId(free_stack_id);
free_stack.Print();
- Printf("%spreviously allocated by thread T%d%s here:%s\n", d.Allocation(),
- alloc_thread->tid,
- ThreadNameWithParenthesis(alloc_thread, tname, sizeof(tname)),
- d.Default());
+ Printf("%spreviously allocated by thread %s here:%s\n", d.Allocation(),
+ AsanThreadIdAndName(alloc_thread).c_str(), d.Default());
} else {
- Printf("%sallocated by thread T%d%s here:%s\n", d.Allocation(),
- alloc_thread->tid,
- ThreadNameWithParenthesis(alloc_thread, tname, sizeof(tname)),
- d.Default());
+ Printf("%sallocated by thread %s here:%s\n", d.Allocation(),
+ AsanThreadIdAndName(alloc_thread).c_str(), d.Default());
}
alloc_stack.Print();
DescribeThread(GetCurrentThread());
diff --git a/lib/asan/asan_descriptions.h b/lib/asan/asan_descriptions.h
index 1a1b01cf20cd..5c2d7662a35a 100644
--- a/lib/asan/asan_descriptions.h
+++ b/lib/asan/asan_descriptions.h
@@ -26,9 +26,20 @@ void DescribeThread(AsanThreadContext *context);
static inline void DescribeThread(AsanThread *t) {
if (t) DescribeThread(t->context());
}
-const char *ThreadNameWithParenthesis(AsanThreadContext *t, char buff[],
- uptr buff_len);
-const char *ThreadNameWithParenthesis(u32 tid, char buff[], uptr buff_len);
+
+class AsanThreadIdAndName {
+ public:
+ explicit AsanThreadIdAndName(AsanThreadContext *t);
+ explicit AsanThreadIdAndName(u32 tid);
+
+ // Contains "T%tid (%name)" or "T%tid" if the name is empty.
+ const char *c_str() const { return &name[0]; }
+
+ private:
+ void Init(u32 tid, const char *tname);
+
+ char name[128];
+};
class Decorator : public __sanitizer::SanitizerCommonDecorator {
public:
diff --git a/lib/asan/asan_errors.cc b/lib/asan/asan_errors.cc
index 0f4a3abff9a7..33d0613f79f4 100644
--- a/lib/asan/asan_errors.cc
+++ b/lib/asan/asan_errors.cc
@@ -45,13 +45,11 @@ void ErrorDeadlySignal::Print() {
void ErrorDoubleFree::Print() {
Decorator d;
- Printf("%s", d.Warning());
- char tname[128];
+ Printf("%s", d.Error());
Report(
- "ERROR: AddressSanitizer: attempting %s on %p in "
- "thread T%d%s:\n",
- scariness.GetDescription(), addr_description.addr, tid,
- ThreadNameWithParenthesis(tid, tname, sizeof(tname)));
+ "ERROR: AddressSanitizer: attempting %s on %p in thread %s:\n",
+ scariness.GetDescription(), addr_description.addr,
+ AsanThreadIdAndName(tid).c_str());
Printf("%s", d.Default());
scariness.Print();
GET_STACK_TRACE_FATAL(second_free_stack->trace[0],
@@ -63,13 +61,11 @@ void ErrorDoubleFree::Print() {
void ErrorNewDeleteTypeMismatch::Print() {
Decorator d;
- Printf("%s", d.Warning());
- char tname[128];
+ Printf("%s", d.Error());
Report(
- "ERROR: AddressSanitizer: %s on %p in thread "
- "T%d%s:\n",
- scariness.GetDescription(), addr_description.addr, tid,
- ThreadNameWithParenthesis(tid, tname, sizeof(tname)));
+ "ERROR: AddressSanitizer: %s on %p in thread %s:\n",
+ scariness.GetDescription(), addr_description.addr,
+ AsanThreadIdAndName(tid).c_str());
Printf("%s object passed to delete has wrong type:\n", d.Default());
if (delete_size != 0) {
Printf(
@@ -106,13 +102,11 @@ void ErrorNewDeleteTypeMismatch::Print() {
void ErrorFreeNotMalloced::Print() {
Decorator d;
- Printf("%s", d.Warning());
- char tname[128];
+ Printf("%s", d.Error());
Report(
"ERROR: AddressSanitizer: attempting free on address "
- "which was not malloc()-ed: %p in thread T%d%s\n",
- addr_description.Address(), tid,
- ThreadNameWithParenthesis(tid, tname, sizeof(tname)));
+ "which was not malloc()-ed: %p in thread %s\n",
+ addr_description.Address(), AsanThreadIdAndName(tid).c_str());
Printf("%s", d.Default());
CHECK_GT(free_stack->size, 0);
scariness.Print();
@@ -129,7 +123,7 @@ void ErrorAllocTypeMismatch::Print() {
"operator delete []"};
CHECK_NE(alloc_type, dealloc_type);
Decorator d;
- Printf("%s", d.Warning());
+ Printf("%s", d.Error());
Report("ERROR: AddressSanitizer: %s (%s vs %s) on %p\n",
scariness.GetDescription(),
alloc_names[alloc_type], dealloc_names[dealloc_type],
@@ -148,7 +142,7 @@ void ErrorAllocTypeMismatch::Print() {
void ErrorMallocUsableSizeNotOwned::Print() {
Decorator d;
- Printf("%s", d.Warning());
+ Printf("%s", d.Error());
Report(
"ERROR: AddressSanitizer: attempting to call malloc_usable_size() for "
"pointer which is not owned: %p\n",
@@ -161,7 +155,7 @@ void ErrorMallocUsableSizeNotOwned::Print() {
void ErrorSanitizerGetAllocatedSizeNotOwned::Print() {
Decorator d;
- Printf("%s", d.Warning());
+ Printf("%s", d.Error());
Report(
"ERROR: AddressSanitizer: attempting to call "
"__sanitizer_get_allocated_size() for pointer which is not owned: %p\n",
@@ -172,11 +166,123 @@ void ErrorSanitizerGetAllocatedSizeNotOwned::Print() {
ReportErrorSummary(scariness.GetDescription(), stack);
}
+void ErrorCallocOverflow::Print() {
+ Decorator d;
+ Printf("%s", d.Error());
+ Report(
+ "ERROR: AddressSanitizer: calloc parameters overflow: count * size "
+ "(%zd * %zd) cannot be represented in type size_t (thread %s)\n",
+ count, size, AsanThreadIdAndName(tid).c_str());
+ Printf("%s", d.Default());
+ stack->Print();
+ PrintHintAllocatorCannotReturnNull();
+ ReportErrorSummary(scariness.GetDescription(), stack);
+}
+
+void ErrorPvallocOverflow::Print() {
+ Decorator d;
+ Printf("%s", d.Error());
+ Report(
+ "ERROR: AddressSanitizer: pvalloc parameters overflow: size 0x%zx "
+ "rounded up to system page size 0x%zx cannot be represented in type "
+ "size_t (thread %s)\n",
+ size, GetPageSizeCached(), AsanThreadIdAndName(tid).c_str());
+ Printf("%s", d.Default());
+ stack->Print();
+ PrintHintAllocatorCannotReturnNull();
+ ReportErrorSummary(scariness.GetDescription(), stack);
+}
+
+void ErrorInvalidAllocationAlignment::Print() {
+ Decorator d;
+ Printf("%s", d.Error());
+ Report(
+ "ERROR: AddressSanitizer: invalid allocation alignment: %zd, "
+ "alignment must be a power of two (thread %s)\n",
+ alignment, AsanThreadIdAndName(tid).c_str());
+ Printf("%s", d.Default());
+ stack->Print();
+ PrintHintAllocatorCannotReturnNull();
+ ReportErrorSummary(scariness.GetDescription(), stack);
+}
+
+void ErrorInvalidAlignedAllocAlignment::Print() {
+ Decorator d;
+ Printf("%s", d.Error());
+#if SANITIZER_POSIX
+ Report("ERROR: AddressSanitizer: invalid alignment requested in "
+ "aligned_alloc: %zd, alignment must be a power of two and the "
+ "requested size 0x%zx must be a multiple of alignment "
+ "(thread %s)\n", alignment, size, AsanThreadIdAndName(tid).c_str());
+#else
+ Report("ERROR: AddressSanitizer: invalid alignment requested in "
+ "aligned_alloc: %zd, the requested size 0x%zx must be a multiple of "
+ "alignment (thread %s)\n", alignment, size,
+ AsanThreadIdAndName(tid).c_str());
+#endif
+ Printf("%s", d.Default());
+ stack->Print();
+ PrintHintAllocatorCannotReturnNull();
+ ReportErrorSummary(scariness.GetDescription(), stack);
+}
+
+void ErrorInvalidPosixMemalignAlignment::Print() {
+ Decorator d;
+ Printf("%s", d.Error());
+ Report(
+ "ERROR: AddressSanitizer: invalid alignment requested in posix_memalign: "
+ "%zd, alignment must be a power of two and a multiple of sizeof(void*) "
+ "== %zd (thread %s)\n",
+ alignment, sizeof(void*), AsanThreadIdAndName(tid).c_str()); // NOLINT
+ Printf("%s", d.Default());
+ stack->Print();
+ PrintHintAllocatorCannotReturnNull();
+ ReportErrorSummary(scariness.GetDescription(), stack);
+}
+
+void ErrorAllocationSizeTooBig::Print() {
+ Decorator d;
+ Printf("%s", d.Error());
+ Report(
+ "ERROR: AddressSanitizer: requested allocation size 0x%zx (0x%zx after "
+ "adjustments for alignment, red zones etc.) exceeds maximum supported "
+ "size of 0x%zx (thread %s)\n",
+ user_size, total_size, max_size, AsanThreadIdAndName(tid).c_str());
+ Printf("%s", d.Default());
+ stack->Print();
+ PrintHintAllocatorCannotReturnNull();
+ ReportErrorSummary(scariness.GetDescription(), stack);
+}
+
+void ErrorRssLimitExceeded::Print() {
+ Decorator d;
+ Printf("%s", d.Error());
+ Report(
+ "ERROR: AddressSanitizer: specified RSS limit exceeded, currently set to "
+ "soft_rss_limit_mb=%zd\n", common_flags()->soft_rss_limit_mb);
+ Printf("%s", d.Default());
+ stack->Print();
+ PrintHintAllocatorCannotReturnNull();
+ ReportErrorSummary(scariness.GetDescription(), stack);
+}
+
+void ErrorOutOfMemory::Print() {
+ Decorator d;
+ Printf("%s", d.Error());
+ Report(
+ "ERROR: AddressSanitizer: allocator is out of memory trying to allocate "
+ "0x%zx bytes\n", requested_size);
+ Printf("%s", d.Default());
+ stack->Print();
+ PrintHintAllocatorCannotReturnNull();
+ ReportErrorSummary(scariness.GetDescription(), stack);
+}
+
void ErrorStringFunctionMemoryRangesOverlap::Print() {
Decorator d;
char bug_type[100];
internal_snprintf(bug_type, sizeof(bug_type), "%s-param-overlap", function);
- Printf("%s", d.Warning());
+ Printf("%s", d.Error());
Report(
"ERROR: AddressSanitizer: %s: memory ranges [%p,%p) and [%p, %p) "
"overlap\n",
@@ -193,7 +299,7 @@ void ErrorStringFunctionMemoryRangesOverlap::Print() {
void ErrorStringFunctionSizeOverflow::Print() {
Decorator d;
- Printf("%s", d.Warning());
+ Printf("%s", d.Error());
Report("ERROR: AddressSanitizer: %s: (size=%zd)\n",
scariness.GetDescription(), size);
Printf("%s", d.Default());
@@ -221,7 +327,7 @@ void ErrorBadParamsToAnnotateContiguousContainer::Print() {
void ErrorODRViolation::Print() {
Decorator d;
- Printf("%s", d.Warning());
+ Printf("%s", d.Error());
Report("ERROR: AddressSanitizer: %s (%p):\n", scariness.GetDescription(),
global1.beg);
Printf("%s", d.Default());
@@ -250,7 +356,7 @@ void ErrorODRViolation::Print() {
void ErrorInvalidPointerPair::Print() {
Decorator d;
- Printf("%s", d.Warning());
+ Printf("%s", d.Error());
Report("ERROR: AddressSanitizer: %s: %p %p\n", scariness.GetDescription(),
addr1_description.Address(), addr2_description.Address());
Printf("%s", d.Default());
@@ -414,6 +520,7 @@ static void PrintLegend(InternalScopedString *str) {
PrintShadowByte(str, " ASan internal: ", kAsanInternalHeapMagic);
PrintShadowByte(str, " Left alloca redzone: ", kAsanAllocaLeftMagic);
PrintShadowByte(str, " Right alloca redzone: ", kAsanAllocaRightMagic);
+ PrintShadowByte(str, " Shadow gap: ", kAsanShadowGap);
}
static void PrintShadowBytes(InternalScopedString *str, const char *before,
@@ -453,17 +560,15 @@ static void PrintShadowMemoryForAddress(uptr addr) {
void ErrorGeneric::Print() {
Decorator d;
- Printf("%s", d.Warning());
+ Printf("%s", d.Error());
uptr addr = addr_description.Address();
Report("ERROR: AddressSanitizer: %s on address %p at pc %p bp %p sp %p\n",
bug_descr, (void *)addr, pc, bp, sp);
Printf("%s", d.Default());
- char tname[128];
- Printf("%s%s of size %zu at %p thread T%d%s%s\n", d.Access(),
+ Printf("%s%s of size %zu at %p thread %s%s\n", d.Access(),
access_size ? (is_write ? "WRITE" : "READ") : "ACCESS", access_size,
- (void *)addr, tid,
- ThreadNameWithParenthesis(tid, tname, sizeof(tname)), d.Default());
+ (void *)addr, AsanThreadIdAndName(tid).c_str(), d.Default());
scariness.Print();
GET_STACK_TRACE_FATAL(pc, bp);
diff --git a/lib/asan/asan_errors.h b/lib/asan/asan_errors.h
index 518ba0c6945e..574197ebff86 100644
--- a/lib/asan/asan_errors.h
+++ b/lib/asan/asan_errors.h
@@ -20,20 +20,30 @@
namespace __asan {
+// (*) VS2013 does not implement unrestricted unions, so we need a trivial
+// default constructor explicitly defined for each particular error.
+
+// None of the error classes own the stack traces mentioned in them.
+
struct ErrorBase {
- ErrorBase() = default;
- explicit ErrorBase(u32 tid_) : tid(tid_) {}
ScarinessScoreBase scariness;
u32 tid;
+
+ ErrorBase() = default; // (*)
+ explicit ErrorBase(u32 tid_) : tid(tid_) {}
+ ErrorBase(u32 tid_, int initial_score, const char *reason) : tid(tid_) {
+ scariness.Clear();
+ scariness.Scare(initial_score, reason);
+ }
};
struct ErrorDeadlySignal : ErrorBase {
SignalContext signal;
- // VS2013 doesn't implement unrestricted unions, so we need a trivial default
- // constructor
- ErrorDeadlySignal() = default;
+
+ ErrorDeadlySignal() = default; // (*)
ErrorDeadlySignal(u32 tid, const SignalContext &sig)
- : ErrorBase(tid), signal(sig) {
+ : ErrorBase(tid),
+ signal(sig) {
scariness.Clear();
if (signal.IsStackOverflow()) {
scariness.Scare(10, "stack-overflow");
@@ -55,125 +65,206 @@ struct ErrorDeadlySignal : ErrorBase {
};
struct ErrorDoubleFree : ErrorBase {
- // ErrorDoubleFree doesn't own the stack trace.
const BufferedStackTrace *second_free_stack;
HeapAddressDescription addr_description;
- // VS2013 doesn't implement unrestricted unions, so we need a trivial default
- // constructor
- ErrorDoubleFree() = default;
+
+ ErrorDoubleFree() = default; // (*)
ErrorDoubleFree(u32 tid, BufferedStackTrace *stack, uptr addr)
- : ErrorBase(tid), second_free_stack(stack) {
+ : ErrorBase(tid, 42, "double-free"),
+ second_free_stack(stack) {
CHECK_GT(second_free_stack->size, 0);
GetHeapAddressInformation(addr, 1, &addr_description);
- scariness.Clear();
- scariness.Scare(42, "double-free");
}
void Print();
};
struct ErrorNewDeleteTypeMismatch : ErrorBase {
- // ErrorNewDeleteTypeMismatch doesn't own the stack trace.
const BufferedStackTrace *free_stack;
HeapAddressDescription addr_description;
uptr delete_size;
uptr delete_alignment;
- // VS2013 doesn't implement unrestricted unions, so we need a trivial default
- // constructor
- ErrorNewDeleteTypeMismatch() = default;
+
+ ErrorNewDeleteTypeMismatch() = default; // (*)
ErrorNewDeleteTypeMismatch(u32 tid, BufferedStackTrace *stack, uptr addr,
uptr delete_size_, uptr delete_alignment_)
- : ErrorBase(tid), free_stack(stack), delete_size(delete_size_),
+ : ErrorBase(tid, 10, "new-delete-type-mismatch"),
+ free_stack(stack),
+ delete_size(delete_size_),
delete_alignment(delete_alignment_) {
GetHeapAddressInformation(addr, 1, &addr_description);
- scariness.Clear();
- scariness.Scare(10, "new-delete-type-mismatch");
}
void Print();
};
struct ErrorFreeNotMalloced : ErrorBase {
- // ErrorFreeNotMalloced doesn't own the stack trace.
const BufferedStackTrace *free_stack;
AddressDescription addr_description;
- // VS2013 doesn't implement unrestricted unions, so we need a trivial default
- // constructor
- ErrorFreeNotMalloced() = default;
+
+ ErrorFreeNotMalloced() = default; // (*)
ErrorFreeNotMalloced(u32 tid, BufferedStackTrace *stack, uptr addr)
- : ErrorBase(tid),
+ : ErrorBase(tid, 40, "bad-free"),
free_stack(stack),
- addr_description(addr, /*shouldLockThreadRegistry=*/false) {
- scariness.Clear();
- scariness.Scare(40, "bad-free");
- }
+ addr_description(addr, /*shouldLockThreadRegistry=*/false) {}
void Print();
};
struct ErrorAllocTypeMismatch : ErrorBase {
- // ErrorAllocTypeMismatch doesn't own the stack trace.
const BufferedStackTrace *dealloc_stack;
HeapAddressDescription addr_description;
AllocType alloc_type, dealloc_type;
- // VS2013 doesn't implement unrestricted unions, so we need a trivial default
- // constructor
- ErrorAllocTypeMismatch() = default;
+
+ ErrorAllocTypeMismatch() = default; // (*)
ErrorAllocTypeMismatch(u32 tid, BufferedStackTrace *stack, uptr addr,
AllocType alloc_type_, AllocType dealloc_type_)
- : ErrorBase(tid),
+ : ErrorBase(tid, 10, "alloc-dealloc-mismatch"),
dealloc_stack(stack),
alloc_type(alloc_type_),
dealloc_type(dealloc_type_) {
GetHeapAddressInformation(addr, 1, &addr_description);
- scariness.Clear();
- scariness.Scare(10, "alloc-dealloc-mismatch");
};
void Print();
};
struct ErrorMallocUsableSizeNotOwned : ErrorBase {
- // ErrorMallocUsableSizeNotOwned doesn't own the stack trace.
const BufferedStackTrace *stack;
AddressDescription addr_description;
- // VS2013 doesn't implement unrestricted unions, so we need a trivial default
- // constructor
- ErrorMallocUsableSizeNotOwned() = default;
+
+ ErrorMallocUsableSizeNotOwned() = default; // (*)
ErrorMallocUsableSizeNotOwned(u32 tid, BufferedStackTrace *stack_, uptr addr)
- : ErrorBase(tid),
+ : ErrorBase(tid, 10, "bad-malloc_usable_size"),
stack(stack_),
- addr_description(addr, /*shouldLockThreadRegistry=*/false) {
- scariness.Clear();
- scariness.Scare(10, "bad-malloc_usable_size");
- }
+ addr_description(addr, /*shouldLockThreadRegistry=*/false) {}
void Print();
};
struct ErrorSanitizerGetAllocatedSizeNotOwned : ErrorBase {
- // ErrorSanitizerGetAllocatedSizeNotOwned doesn't own the stack trace.
const BufferedStackTrace *stack;
AddressDescription addr_description;
- // VS2013 doesn't implement unrestricted unions, so we need a trivial default
- // constructor
- ErrorSanitizerGetAllocatedSizeNotOwned() = default;
+
+ ErrorSanitizerGetAllocatedSizeNotOwned() = default; // (*)
ErrorSanitizerGetAllocatedSizeNotOwned(u32 tid, BufferedStackTrace *stack_,
uptr addr)
- : ErrorBase(tid),
+ : ErrorBase(tid, 10, "bad-__sanitizer_get_allocated_size"),
stack(stack_),
- addr_description(addr, /*shouldLockThreadRegistry=*/false) {
- scariness.Clear();
- scariness.Scare(10, "bad-__sanitizer_get_allocated_size");
- }
+ addr_description(addr, /*shouldLockThreadRegistry=*/false) {}
+ void Print();
+};
+
+struct ErrorCallocOverflow : ErrorBase {
+ const BufferedStackTrace *stack;
+ uptr count;
+ uptr size;
+
+ ErrorCallocOverflow() = default; // (*)
+ ErrorCallocOverflow(u32 tid, BufferedStackTrace *stack_, uptr count_,
+ uptr size_)
+ : ErrorBase(tid, 10, "calloc-overflow"),
+ stack(stack_),
+ count(count_),
+ size(size_) {}
+ void Print();
+};
+
+struct ErrorPvallocOverflow : ErrorBase {
+ const BufferedStackTrace *stack;
+ uptr size;
+
+ ErrorPvallocOverflow() = default; // (*)
+ ErrorPvallocOverflow(u32 tid, BufferedStackTrace *stack_, uptr size_)
+ : ErrorBase(tid, 10, "pvalloc-overflow"),
+ stack(stack_),
+ size(size_) {}
+ void Print();
+};
+
+struct ErrorInvalidAllocationAlignment : ErrorBase {
+ const BufferedStackTrace *stack;
+ uptr alignment;
+
+ ErrorInvalidAllocationAlignment() = default; // (*)
+ ErrorInvalidAllocationAlignment(u32 tid, BufferedStackTrace *stack_,
+ uptr alignment_)
+ : ErrorBase(tid, 10, "invalid-allocation-alignment"),
+ stack(stack_),
+ alignment(alignment_) {}
+ void Print();
+};
+
+struct ErrorInvalidAlignedAllocAlignment : ErrorBase {
+ const BufferedStackTrace *stack;
+ uptr size;
+ uptr alignment;
+
+ ErrorInvalidAlignedAllocAlignment() = default; // (*)
+ ErrorInvalidAlignedAllocAlignment(u32 tid, BufferedStackTrace *stack_,
+ uptr size_, uptr alignment_)
+ : ErrorBase(tid, 10, "invalid-aligned-alloc-alignment"),
+ stack(stack_),
+ size(size_),
+ alignment(alignment_) {}
+ void Print();
+};
+
+struct ErrorInvalidPosixMemalignAlignment : ErrorBase {
+ const BufferedStackTrace *stack;
+ uptr alignment;
+
+ ErrorInvalidPosixMemalignAlignment() = default; // (*)
+ ErrorInvalidPosixMemalignAlignment(u32 tid, BufferedStackTrace *stack_,
+ uptr alignment_)
+ : ErrorBase(tid, 10, "invalid-posix-memalign-alignment"),
+ stack(stack_),
+ alignment(alignment_) {}
+ void Print();
+};
+
+struct ErrorAllocationSizeTooBig : ErrorBase {
+ const BufferedStackTrace *stack;
+ uptr user_size;
+ uptr total_size;
+ uptr max_size;
+
+ ErrorAllocationSizeTooBig() = default; // (*)
+ ErrorAllocationSizeTooBig(u32 tid, BufferedStackTrace *stack_,
+ uptr user_size_, uptr total_size_, uptr max_size_)
+ : ErrorBase(tid, 10, "allocation-size-too-big"),
+ stack(stack_),
+ user_size(user_size_),
+ total_size(total_size_),
+ max_size(max_size_) {}
+ void Print();
+};
+
+struct ErrorRssLimitExceeded : ErrorBase {
+ const BufferedStackTrace *stack;
+
+ ErrorRssLimitExceeded() = default; // (*)
+ ErrorRssLimitExceeded(u32 tid, BufferedStackTrace *stack_)
+ : ErrorBase(tid, 10, "rss-limit-exceeded"),
+ stack(stack_) {}
+ void Print();
+};
+
+struct ErrorOutOfMemory : ErrorBase {
+ const BufferedStackTrace *stack;
+ uptr requested_size;
+
+ ErrorOutOfMemory() = default; // (*)
+ ErrorOutOfMemory(u32 tid, BufferedStackTrace *stack_, uptr requested_size_)
+ : ErrorBase(tid, 10, "out-of-memory"),
+ stack(stack_),
+ requested_size(requested_size_) {}
void Print();
};
struct ErrorStringFunctionMemoryRangesOverlap : ErrorBase {
- // ErrorStringFunctionMemoryRangesOverlap doesn't own the stack trace.
const BufferedStackTrace *stack;
uptr length1, length2;
AddressDescription addr1_description;
AddressDescription addr2_description;
const char *function;
- // VS2013 doesn't implement unrestricted unions, so we need a trivial default
- // constructor
- ErrorStringFunctionMemoryRangesOverlap() = default;
+
+ ErrorStringFunctionMemoryRangesOverlap() = default; // (*)
ErrorStringFunctionMemoryRangesOverlap(u32 tid, BufferedStackTrace *stack_,
uptr addr1, uptr length1_, uptr addr2,
uptr length2_, const char *function_)
@@ -193,65 +284,51 @@ struct ErrorStringFunctionMemoryRangesOverlap : ErrorBase {
};
struct ErrorStringFunctionSizeOverflow : ErrorBase {
- // ErrorStringFunctionSizeOverflow doesn't own the stack trace.
const BufferedStackTrace *stack;
AddressDescription addr_description;
uptr size;
- // VS2013 doesn't implement unrestricted unions, so we need a trivial default
- // constructor
- ErrorStringFunctionSizeOverflow() = default;
+
+ ErrorStringFunctionSizeOverflow() = default; // (*)
ErrorStringFunctionSizeOverflow(u32 tid, BufferedStackTrace *stack_,
uptr addr, uptr size_)
- : ErrorBase(tid),
+ : ErrorBase(tid, 10, "negative-size-param"),
stack(stack_),
addr_description(addr, /*shouldLockThreadRegistry=*/false),
- size(size_) {
- scariness.Clear();
- scariness.Scare(10, "negative-size-param");
- }
+ size(size_) {}
void Print();
};
struct ErrorBadParamsToAnnotateContiguousContainer : ErrorBase {
- // ErrorBadParamsToAnnotateContiguousContainer doesn't own the stack trace.
const BufferedStackTrace *stack;
uptr beg, end, old_mid, new_mid;
- // VS2013 doesn't implement unrestricted unions, so we need a trivial default
- // constructor
- ErrorBadParamsToAnnotateContiguousContainer() = default;
+
+ ErrorBadParamsToAnnotateContiguousContainer() = default; // (*)
// PS4: Do we want an AddressDescription for beg?
ErrorBadParamsToAnnotateContiguousContainer(u32 tid,
BufferedStackTrace *stack_,
uptr beg_, uptr end_,
uptr old_mid_, uptr new_mid_)
- : ErrorBase(tid),
+ : ErrorBase(tid, 10, "bad-__sanitizer_annotate_contiguous_container"),
stack(stack_),
beg(beg_),
end(end_),
old_mid(old_mid_),
- new_mid(new_mid_) {
- scariness.Clear();
- scariness.Scare(10, "bad-__sanitizer_annotate_contiguous_container");
- }
+ new_mid(new_mid_) {}
void Print();
};
struct ErrorODRViolation : ErrorBase {
__asan_global global1, global2;
u32 stack_id1, stack_id2;
- // VS2013 doesn't implement unrestricted unions, so we need a trivial default
- // constructor
- ErrorODRViolation() = default;
+
+ ErrorODRViolation() = default; // (*)
ErrorODRViolation(u32 tid, const __asan_global *g1, u32 stack_id1_,
const __asan_global *g2, u32 stack_id2_)
- : ErrorBase(tid),
+ : ErrorBase(tid, 10, "odr-violation"),
global1(*g1),
global2(*g2),
stack_id1(stack_id1_),
- stack_id2(stack_id2_) {
- scariness.Clear();
- scariness.Scare(10, "odr-violation");
- }
+ stack_id2(stack_id2_) {}
void Print();
};
@@ -259,20 +336,16 @@ struct ErrorInvalidPointerPair : ErrorBase {
uptr pc, bp, sp;
AddressDescription addr1_description;
AddressDescription addr2_description;
- // VS2013 doesn't implement unrestricted unions, so we need a trivial default
- // constructor
- ErrorInvalidPointerPair() = default;
+
+ ErrorInvalidPointerPair() = default; // (*)
ErrorInvalidPointerPair(u32 tid, uptr pc_, uptr bp_, uptr sp_, uptr p1,
uptr p2)
- : ErrorBase(tid),
+ : ErrorBase(tid, 10, "invalid-pointer-pair"),
pc(pc_),
bp(bp_),
sp(sp_),
addr1_description(p1, 1, /*shouldLockThreadRegistry=*/false),
- addr2_description(p2, 1, /*shouldLockThreadRegistry=*/false) {
- scariness.Clear();
- scariness.Scare(10, "invalid-pointer-pair");
- }
+ addr2_description(p2, 1, /*shouldLockThreadRegistry=*/false) {}
void Print();
};
@@ -283,9 +356,8 @@ struct ErrorGeneric : ErrorBase {
const char *bug_descr;
bool is_write;
u8 shadow_val;
- // VS2013 doesn't implement unrestricted unions, so we need a trivial default
- // constructor
- ErrorGeneric() = default;
+
+ ErrorGeneric() = default; // (*)
ErrorGeneric(u32 tid, uptr addr, uptr pc_, uptr bp_, uptr sp_, bool is_write_,
uptr access_size_);
void Print();
@@ -300,6 +372,14 @@ struct ErrorGeneric : ErrorBase {
macro(AllocTypeMismatch) \
macro(MallocUsableSizeNotOwned) \
macro(SanitizerGetAllocatedSizeNotOwned) \
+ macro(CallocOverflow) \
+ macro(PvallocOverflow) \
+ macro(InvalidAllocationAlignment) \
+ macro(InvalidAlignedAllocAlignment) \
+ macro(InvalidPosixMemalignAlignment) \
+ macro(AllocationSizeTooBig) \
+ macro(RssLimitExceeded) \
+ macro(OutOfMemory) \
macro(StringFunctionMemoryRangesOverlap) \
macro(StringFunctionSizeOverflow) \
macro(BadParamsToAnnotateContiguousContainer) \
@@ -334,6 +414,7 @@ struct ErrorDescription {
};
ErrorDescription() { internal_memset(this, 0, sizeof(*this)); }
+ explicit ErrorDescription(LinkerInitialized) {}
ASAN_FOR_EACH_ERROR_KIND(ASAN_ERROR_DESCRIPTION_CONSTRUCTOR)
bool IsValid() { return kind != kErrorKindInvalid; }
diff --git a/lib/asan/asan_flags.cc b/lib/asan/asan_flags.cc
index 562168e6d428..5682ab4eb476 100644
--- a/lib/asan/asan_flags.cc
+++ b/lib/asan/asan_flags.cc
@@ -33,10 +33,7 @@ static const char *MaybeCallAsanDefaultOptions() {
static const char *MaybeUseAsanDefaultOptionsCompileDefinition() {
#ifdef ASAN_DEFAULT_OPTIONS
-// Stringize the macro value.
-# define ASAN_STRINGIZE(x) #x
-# define ASAN_STRINGIZE_OPTIONS(options) ASAN_STRINGIZE(options)
- return ASAN_STRINGIZE_OPTIONS(ASAN_DEFAULT_OPTIONS);
+ return SANITIZER_STRINGIFY(ASAN_DEFAULT_OPTIONS);
#else
return "";
#endif
@@ -163,6 +160,10 @@ void InitializeFlags() {
CHECK_LE(f->max_redzone, 2048);
CHECK(IsPowerOfTwo(f->redzone));
CHECK(IsPowerOfTwo(f->max_redzone));
+ if (SANITIZER_RTEMS) {
+ CHECK(!f->unmap_shadow_on_exit);
+ CHECK(!f->protect_shadow_gap);
+ }
// quarantine_size is deprecated but we still honor it.
// quarantine_size can not be used together with quarantine_size_mb.
diff --git a/lib/asan/asan_flags.inc b/lib/asan/asan_flags.inc
index 00071d39f041..4af94c56fca0 100644
--- a/lib/asan/asan_flags.inc
+++ b/lib/asan/asan_flags.inc
@@ -88,7 +88,8 @@ ASAN_FLAG(bool, check_malloc_usable_size, true,
"295.*.")
ASAN_FLAG(bool, unmap_shadow_on_exit, false,
"If set, explicitly unmaps the (huge) shadow at exit.")
-ASAN_FLAG(bool, protect_shadow_gap, true, "If set, mprotect the shadow gap")
+ASAN_FLAG(bool, protect_shadow_gap, !SANITIZER_RTEMS,
+ "If set, mprotect the shadow gap")
ASAN_FLAG(bool, print_stats, false,
"Print various statistics after printing an error message or if "
"atexit=1.")
@@ -136,9 +137,9 @@ ASAN_FLAG(
"Android. ")
ASAN_FLAG(
int, detect_invalid_pointer_pairs, 0,
- "If non-zero, try to detect operations like <, <=, >, >= and - on "
- "invalid pointer pairs (e.g. when pointers belong to different objects). "
- "The bigger the value the harder we try.")
+ "If >= 2, detect operations like <, <=, >, >= and - on invalid pointer "
+ "pairs (e.g. when pointers belong to different objects); "
+ "If == 1, detect invalid operations only when both pointers are non-null.")
ASAN_FLAG(
bool, detect_container_overflow, true,
"If true, honor the container overflow annotations. See "
diff --git a/lib/asan/asan_globals.cc b/lib/asan/asan_globals.cc
index 0db65d010349..898f7f40d31b 100644
--- a/lib/asan/asan_globals.cc
+++ b/lib/asan/asan_globals.cc
@@ -224,8 +224,9 @@ static void RegisterGlobal(const Global *g) {
list_of_all_globals = l;
if (g->has_dynamic_init) {
if (!dynamic_init_globals) {
- dynamic_init_globals = new(allocator_for_globals)
- VectorOfGlobals(kDynamicInitGlobalsInitialCapacity);
+ dynamic_init_globals =
+ new (allocator_for_globals) VectorOfGlobals; // NOLINT
+ dynamic_init_globals->reserve(kDynamicInitGlobalsInitialCapacity);
}
DynInitGlobal dyn_global = { *g, false };
dynamic_init_globals->push_back(dyn_global);
@@ -358,9 +359,11 @@ void __asan_register_globals(__asan_global *globals, uptr n) {
GET_STACK_TRACE_MALLOC;
u32 stack_id = StackDepotPut(stack);
BlockingMutexLock lock(&mu_for_globals);
- if (!global_registration_site_vector)
+ if (!global_registration_site_vector) {
global_registration_site_vector =
- new(allocator_for_globals) GlobalRegistrationSiteVector(128);
+ new (allocator_for_globals) GlobalRegistrationSiteVector; // NOLINT
+ global_registration_site_vector->reserve(128);
+ }
GlobalRegistrationSite site = {stack_id, &globals[0], &globals[n - 1]};
global_registration_site_vector->push_back(site);
if (flags()->report_globals >= 2) {
diff --git a/lib/asan/asan_globals_win.cc b/lib/asan/asan_globals_win.cc
index 261762b63e2c..29ab5ebf16d4 100644
--- a/lib/asan/asan_globals_win.cc
+++ b/lib/asan/asan_globals_win.cc
@@ -19,9 +19,9 @@ namespace __asan {
#pragma section(".ASAN$GA", read, write) // NOLINT
#pragma section(".ASAN$GZ", read, write) // NOLINT
extern "C" __declspec(allocate(".ASAN$GA"))
-__asan_global __asan_globals_start = {};
+ ALIGNED(sizeof(__asan_global)) __asan_global __asan_globals_start = {};
extern "C" __declspec(allocate(".ASAN$GZ"))
-__asan_global __asan_globals_end = {};
+ ALIGNED(sizeof(__asan_global)) __asan_global __asan_globals_end = {};
#pragma comment(linker, "/merge:.ASAN=.data")
static void call_on_globals(void (*hook)(__asan_global *, uptr)) {
diff --git a/lib/asan/asan_interceptors.cc b/lib/asan/asan_interceptors.cc
index cb7dcb3b1ca8..aac2bb8a6bbf 100644
--- a/lib/asan/asan_interceptors.cc
+++ b/lib/asan/asan_interceptors.cc
@@ -24,15 +24,20 @@
#include "lsan/lsan_common.h"
#include "sanitizer_common/sanitizer_libc.h"
-// There is no general interception at all on Fuchsia.
+// There is no general interception at all on Fuchsia and RTEMS.
// Only the functions in asan_interceptors_memintrinsics.cc are
// really defined to replace libc functions.
-#if !SANITIZER_FUCHSIA
+#if !SANITIZER_FUCHSIA && !SANITIZER_RTEMS
#if SANITIZER_POSIX
#include "sanitizer_common/sanitizer_posix.h"
#endif
+#if ASAN_INTERCEPT__UNWIND_RAISEEXCEPTION || \
+ ASAN_INTERCEPT__SJLJ_UNWIND_RAISEEXCEPTION
+#include <unwind.h>
+#endif
+
#if defined(__i386) && SANITIZER_LINUX
#define ASAN_PTHREAD_CREATE_VERSION "GLIBC_2.1"
#elif defined(__mips__) && SANITIZER_LINUX
@@ -178,6 +183,7 @@ DECLARE_REAL_AND_INTERCEPTOR(void, free, void *)
(void)(s); \
} while (false)
#include "sanitizer_common/sanitizer_common_syscalls.inc"
+#include "sanitizer_common/sanitizer_syscalls_netbsd.inc"
struct ThreadStartParam {
atomic_uintptr_t t;
@@ -269,7 +275,15 @@ INTERCEPTOR(int, swapcontext, struct ucontext_t *oucp,
uptr stack, ssize;
ReadContextStack(ucp, &stack, &ssize);
ClearShadowMemoryForContextStack(stack, ssize);
+#if __has_attribute(__indirect_return__) && \
+ (defined(__x86_64__) || defined(__i386__))
+ int (*real_swapcontext)(struct ucontext_t *, struct ucontext_t *)
+ __attribute__((__indirect_return__))
+ = REAL(swapcontext);
+ int res = real_swapcontext(oucp, ucp);
+#else
int res = REAL(swapcontext)(oucp, ucp);
+#endif
// swapcontext technically does not return, but program may swap context to
// "oucp" later, that would look as if swapcontext() returned 0.
// We need to clear shadow for ucp once again, as it may be in arbitrary
@@ -318,6 +332,32 @@ INTERCEPTOR(void, __cxa_throw, void *a, void *b, void *c) {
}
#endif
+#if ASAN_INTERCEPT___CXA_RETHROW_PRIMARY_EXCEPTION
+INTERCEPTOR(void, __cxa_rethrow_primary_exception, void *a) {
+ CHECK(REAL(__cxa_rethrow_primary_exception));
+ __asan_handle_no_return();
+ REAL(__cxa_rethrow_primary_exception)(a);
+}
+#endif
+
+#if ASAN_INTERCEPT__UNWIND_RAISEEXCEPTION
+INTERCEPTOR(_Unwind_Reason_Code, _Unwind_RaiseException,
+ _Unwind_Exception *object) {
+ CHECK(REAL(_Unwind_RaiseException));
+ __asan_handle_no_return();
+ return REAL(_Unwind_RaiseException)(object);
+}
+#endif
+
+#if ASAN_INTERCEPT__SJLJ_UNWIND_RAISEEXCEPTION
+INTERCEPTOR(_Unwind_Reason_Code, _Unwind_SjLj_RaiseException,
+ _Unwind_Exception *object) {
+ CHECK(REAL(_Unwind_SjLj_RaiseException));
+ __asan_handle_no_return();
+ return REAL(_Unwind_SjLj_RaiseException)(object);
+}
+#endif
+
#if ASAN_INTERCEPT_INDEX
# if ASAN_USE_ALIAS_ATTRIBUTE_FOR_INDEX
INTERCEPTOR(char*, index, const char *string, int c)
@@ -540,14 +580,6 @@ INTERCEPTOR(int, __cxa_atexit, void (*func)(void *), void *arg,
}
#endif // ASAN_INTERCEPT___CXA_ATEXIT
-#if ASAN_INTERCEPT_FORK
-INTERCEPTOR(int, fork, void) {
- ENSURE_ASAN_INITED();
- int pid = REAL(fork)();
- return pid;
-}
-#endif // ASAN_INTERCEPT_FORK
-
// ---------------------- InitializeAsanInterceptors ---------------- {{{1
namespace __asan {
void InitializeAsanInterceptors() {
@@ -598,6 +630,17 @@ void InitializeAsanInterceptors() {
#if ASAN_INTERCEPT___CXA_THROW
ASAN_INTERCEPT_FUNC(__cxa_throw);
#endif
+#if ASAN_INTERCEPT___CXA_RETHROW_PRIMARY_EXCEPTION
+ ASAN_INTERCEPT_FUNC(__cxa_rethrow_primary_exception);
+#endif
+ // Indirectly intercept std::rethrow_exception.
+#if ASAN_INTERCEPT__UNWIND_RAISEEXCEPTION
+ INTERCEPT_FUNCTION(_Unwind_RaiseException);
+#endif
+ // Indirectly intercept std::rethrow_exception.
+#if ASAN_INTERCEPT__UNWIND_SJLJ_RAISEEXCEPTION
+ INTERCEPT_FUNCTION(_Unwind_SjLj_RaiseException);