pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
compiler-rt-netbsd: Sync patches with my local copy
Module Name: pkgsrc-wip
Committed By: Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By: kamil
Date: Wed Dec 27 11:21:56 2017 +0100
Changeset: c6da26d0581175e7d1f7299103e937f76c1f3041
Modified Files:
compiler-rt-netbsd/distinfo
compiler-rt-netbsd/patches/patch-cmake_config-ix.cmake
compiler-rt-netbsd/patches/patch-include_CMakeLists.txt
compiler-rt-netbsd/patches/patch-include_sanitizer_netbsd__syscall__hooks.h
compiler-rt-netbsd/patches/patch-lib_hwasan_hwasan__interceptors.cc
compiler-rt-netbsd/patches/patch-lib_msan_msan__interceptors.cc
compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__netbsd__syscalls.inc
compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.cc
compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.h
compiler-rt-netbsd/patches/patch-lib_scudo_scudo__platform.h
compiler-rt-netbsd/patches/patch-utils_generate__netbsd__syscalls.awk
Log Message:
compiler-rt-netbsd: Sync patches with my local copy
Update patches for NetBSD syscall hooks.
Majority of that is pending upstream in review:
Add NetBSD syscall hooks in sanitizers
https://reviews.llvm.org/D41588
Sponsored by <The NetBSD Foundation>
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=c6da26d0581175e7d1f7299103e937f76c1f3041
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
compiler-rt-netbsd/distinfo | 20 +-
.../patches/patch-cmake_config-ix.cmake | 2 +-
.../patches/patch-include_CMakeLists.txt | 2 +-
...atch-include_sanitizer_netbsd__syscall__hooks.h | 5976 +++++++++++---------
.../patch-lib_hwasan_hwasan__interceptors.cc | 2 +-
.../patches/patch-lib_msan_msan__interceptors.cc | 2 +-
...nitizer__common_sanitizer__netbsd__syscalls.inc | 3262 ++++++++---
...__common_sanitizer__platform__limits__netbsd.cc | 33 +-
...r__common_sanitizer__platform__limits__netbsd.h | 40 +-
.../patches/patch-lib_scudo_scudo__platform.h | 2 +-
.../patch-utils_generate__netbsd__syscalls.awk | 2936 ++++++----
11 files changed, 7644 insertions(+), 4633 deletions(-)
diffs:
diff --git a/compiler-rt-netbsd/distinfo b/compiler-rt-netbsd/distinfo
index ac8a675e13..01f1f54ac4 100644
--- a/compiler-rt-netbsd/distinfo
+++ b/compiler-rt-netbsd/distinfo
@@ -1,21 +1,21 @@
$NetBSD: distinfo,v 1.35 2015/09/11 01:21:57 tnn Exp $
-SHA1 (patch-cmake_config-ix.cmake) = 1ff2ff48e4a2fd369c3f228095b006bc54b8e9ff
-SHA1 (patch-include_CMakeLists.txt) = d1a6b40de80538913d15ea83c1bd2a792abe2908
-SHA1 (patch-include_sanitizer_netbsd__syscall__hooks.h) = 4c73fb00985872252943d0fa0916da3f04139bde
+SHA1 (patch-cmake_config-ix.cmake) = b863945f74990e30c6ae902953334f1324efc06d
+SHA1 (patch-include_CMakeLists.txt) = b6f2713b7e5337aed542442936b6f747efe0a607
+SHA1 (patch-include_sanitizer_netbsd__syscall__hooks.h) = e10307266bc776ee4c497160a64be9809b423840
SHA1 (patch-lib_asan_asan__interceptors.cc) = ea4005ce02775060ff52af76d568c450892067b5
SHA1 (patch-lib_esan_esan__interceptors.cpp) = a7103ca053e92a810c87c593262bb386f3d02606
SHA1 (patch-lib_fuzzer_tests_CMakeLists.txt) = 38ca750154dfc9843a56748078235824b772a147
-SHA1 (patch-lib_hwasan_hwasan__interceptors.cc) = 40dba8febc86459f377560deef17c2f8544df61f
-SHA1 (patch-lib_msan_msan__interceptors.cc) = 427ec92b758557ce636508f6e1d1394917157f0a
+SHA1 (patch-lib_hwasan_hwasan__interceptors.cc) = 45fd48ae7bb21878432f925dea7af8d9f0ee0b02
+SHA1 (patch-lib_msan_msan__interceptors.cc) = efb82ddfc80b750b92364b30c602050288578b39
SHA1 (patch-lib_msan_msan__linux.cc) = d75d7587071a9e7a3f6a08a3008af55319e62cab
SHA1 (patch-lib_sanitizer__common_CMakeLists.txt) = e6f0ecddd946981e9a4b76fd5325f56c2343edcd
-SHA1 (patch-lib_sanitizer__common_sanitizer__netbsd__syscalls.inc) = 66267b8768eaee05052dbc969b0edd71e7ee0d3c
-SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.cc) = 45191d5cb499508072df3dce50e503d69d2410cd
-SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.h) = e2cbba648338976f264d432a398cab227a823bd4
-SHA1 (patch-lib_scudo_scudo__platform.h) = e15e4cfab7e53006940673d2b17c22ec899a7fa7
+SHA1 (patch-lib_sanitizer__common_sanitizer__netbsd__syscalls.inc) = 02c3cf328d6171abe4eabcf07690be14150b29e4
+SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.cc) = 1bdd5c7d1585c93d3bc3bd9bc7b9be93123dd24d
+SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.h) = 16cbbce3952f8a7fc408509a7204d2d324b184d5
+SHA1 (patch-lib_scudo_scudo__platform.h) = 6b07d34d5f1209c7f1bf21fdf0cda5cbe88b802f
SHA1 (patch-lib_tsan_rtl_tsan__interceptors.cc) = 4fbaa64e3f8d28cdbab6783c296dfd31cecb45a5
SHA1 (patch-test_asan_lit.cfg) = 121fb6db88a17b8b588a40ee022a9a219d84493f
SHA1 (patch-test_lsan_lit.common.cfg) = 10dc251f80efb96d015a22c740dc20b1843b9a11
SHA1 (patch-test_scudo_lit.cfg) = 171f340505f7c87f74a7814b9c4d12d7fcbc5690
-SHA1 (patch-utils_generate__netbsd__syscalls.awk) = 65e4c5deab1bcbe83387a212501e38a87d0f7f5e
+SHA1 (patch-utils_generate__netbsd__syscalls.awk) = a60ac92188529958f7cba83dcf909719b326d7a6
diff --git a/compiler-rt-netbsd/patches/patch-cmake_config-ix.cmake b/compiler-rt-netbsd/patches/patch-cmake_config-ix.cmake
index 9d8f82d185..ad59a3c3ff 100644
--- a/compiler-rt-netbsd/patches/patch-cmake_config-ix.cmake
+++ b/compiler-rt-netbsd/patches/patch-cmake_config-ix.cmake
@@ -1,6 +1,6 @@
$NetBSD$
---- cmake/config-ix.cmake.orig 2017-12-21 18:53:10.252295200 +0000
+--- cmake/config-ix.cmake.orig 2017-12-21 18:53:10.000000000 +0000
+++ cmake/config-ix.cmake
@@ -542,7 +542,7 @@ else()
endif()
diff --git a/compiler-rt-netbsd/patches/patch-include_CMakeLists.txt b/compiler-rt-netbsd/patches/patch-include_CMakeLists.txt
index b21e8748de..1ccb2b7313 100644
--- a/compiler-rt-netbsd/patches/patch-include_CMakeLists.txt
+++ b/compiler-rt-netbsd/patches/patch-include_CMakeLists.txt
@@ -1,6 +1,6 @@
$NetBSD$
---- include/CMakeLists.txt.orig 2017-12-21 18:53:10.254474103 +0000
+--- include/CMakeLists.txt.orig 2017-12-21 18:53:10.000000000 +0000
+++ include/CMakeLists.txt
@@ -10,6 +10,7 @@ if (COMPILER_RT_BUILD_SANITIZERS)
sanitizer/linux_syscall_hooks.h
diff --git a/compiler-rt-netbsd/patches/patch-include_sanitizer_netbsd__syscall__hooks.h b/compiler-rt-netbsd/patches/patch-include_sanitizer_netbsd__syscall__hooks.h
index 400e261f86..48bd1759e2 100644
--- a/compiler-rt-netbsd/patches/patch-include_sanitizer_netbsd__syscall__hooks.h
+++ b/compiler-rt-netbsd/patches/patch-include_sanitizer_netbsd__syscall__hooks.h
@@ -1,8 +1,8 @@
$NetBSD$
---- include/sanitizer/netbsd_syscall_hooks.h.orig 2017-12-21 18:53:40.994511998 +0000
+--- include/sanitizer/netbsd_syscall_hooks.h.orig 2017-12-27 10:21:12.199662146 +0000
+++ include/sanitizer/netbsd_syscall_hooks.h
-@@ -0,0 +1,3938 @@
+@@ -0,0 +1,4730 @@
+//===-- netbsd_syscall_hooks.h --------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
@@ -20,13 +20,13 @@ $NetBSD$
+// actions for the active sanitizer.
+// Usage:
+// __sanitizer_syscall_pre_getfoo(...args...);
-+// long res = syscall(SYS_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: 2017-12-21
++// Generated date: 2017-12-26
+// Generated from: syscalls.master,v 1.290 2017/12/19 19:40:03 kamil Exp
+//
+//===----------------------------------------------------------------------===//
@@ -36,116 +36,128 @@ $NetBSD$
+#define __sanitizer_syscall_pre_syscall(code, arg0, arg1, arg2, arg3, arg4, \
+ arg5, arg6, arg7) \
+ __sanitizer_syscall_pre_impl_syscall( \
-+ (long)(code), (long)(arg0), (long)(arg1), (long)(arg2), (long)(arg3), \
-+ (long)(arg4), (long)(arg5), (long)(arg6), (long)(arg7))
++ (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)(code), (long)(arg0), (long)(arg1), (long)(arg2), \
-+ (long)(arg3), (long)(arg4), (long)(arg5), (long)(arg6), (long)(arg7))
++ 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)(rval))
++ __sanitizer_syscall_pre_impl_exit((long long)(rval))
+#define __sanitizer_syscall_post_exit(res, rval) \
-+ __sanitizer_syscall_post_impl_exit(res, (long)(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)(fd), (long)(buf), (long)(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)(fd), (long)(buf), \
-+ (long)(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)(fd), (long)(buf), (long)(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)(fd), (long)(buf), \
-+ (long)(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)(path), (long)(flags), (long)(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)(path), (long)(flags), \
-+ (long)(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)(fd))
++ __sanitizer_syscall_pre_impl_close((long long)(fd))
+#define __sanitizer_syscall_post_close(res, fd) \
-+ __sanitizer_syscall_post_impl_close(res, (long)(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)(pid), (long)(status), (long)(options), (long)(rusage))
++ (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)(pid), (long)(status), (long)(options), (long)(rusage))
++ 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)(path), (long)(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)(path), \
-+ (long)(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)(path), (long)(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)(path), (long)(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)(path))
++ __sanitizer_syscall_pre_impl_unlink((long long)(path))
+#define __sanitizer_syscall_post_unlink(res, path) \
-+ __sanitizer_syscall_post_impl_unlink(res, (long)(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)(path))
++ __sanitizer_syscall_pre_impl_chdir((long long)(path))
+#define __sanitizer_syscall_post_chdir(res, path) \
-+ __sanitizer_syscall_post_impl_chdir(res, (long)(path))
++ __sanitizer_syscall_post_impl_chdir(res, (long long)(path))
+#define __sanitizer_syscall_pre_fchdir(fd) \
-+ __sanitizer_syscall_pre_impl_fchdir((long)(fd))
++ __sanitizer_syscall_pre_impl_fchdir((long long)(fd))
+#define __sanitizer_syscall_post_fchdir(res, fd) \
-+ __sanitizer_syscall_post_impl_fchdir(res, (long)(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)(path), (long)(mode), \
-+ (long)(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)(path), \
-+ (long)(mode), (long)(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)(path), (long)(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)(path), (long)(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)(path), (long)(uid), (long)(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)(path), (long)(uid), \
-+ (long)(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)(nsize))
++ __sanitizer_syscall_pre_impl_break((long long)(nsize))
+#define __sanitizer_syscall_post_break(res, nsize) \
-+ __sanitizer_syscall_post_impl_break(res, (long)(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)(buf), (long)(bufsize), (long)(flags))
++ (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)(buf), (long)(bufsize), (long)(flags))
++ 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)(fd), (long)(offset), \
-+ (long)(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)(fd), (long)(offset), (long)(whence))
++ 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)(type), (long)(path), \
-+ (long)(flags), (long)(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)(type), (long)(path), (long)(flags), (long)(data))
++ 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)(path), (long)(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)(path), (long)(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)(uid))
++ __sanitizer_syscall_pre_impl_setuid((long long)(uid))
+#define __sanitizer_syscall_post_setuid(res, uid) \
-+ __sanitizer_syscall_post_impl_setuid(res, (long)(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)
@@ -153,82 +165,93 @@ $NetBSD$
+#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)(req), (long)(pid), (long)(addr), \
-+ (long)(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)(req), (long)(pid), \
-+ (long)(addr), (long)(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)(s), (long)(msg), (long)(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)(s), (long)(msg), \
-+ (long)(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)(s), (long)(msg), (long)(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)(s), (long)(msg), \
-+ (long)(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)(s), (long)(buf), (long)(len), \
-+ (long)(flags), (long)(from), \
-+ (long)(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)(s), (long)(buf), \
-+ (long)(len), (long)(flags), \
-+ (long)(from), (long)(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)(s), (long)(name), (long)(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)(s), (long)(name), \
-+ (long)(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)(fdes), (long)(asa), \
-+ (long)(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)(fdes), (long)(asa), \
-+ (long)(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)(fdes), (long)(asa), \
-+ (long)(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)(fdes), (long)(asa), \
-+ (long)(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)(path), (long)(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)(path), (long)(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)(path), (long)(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)(path), (long)(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)(fd), (long)(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)(fd), (long)(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)(pid), (long)(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)(pid), (long)(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)(path), (long)(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)(path), (long)(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)(path), (long)(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)(path), (long)(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)(fd))
++ __sanitizer_syscall_pre_impl_dup((long long)(fd))
+#define __sanitizer_syscall_post_dup(res, fd) \
-+ __sanitizer_syscall_post_impl_dup(res, (long)(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)
@@ -236,109 +259,122 @@ $NetBSD$
+#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)(samples), (long)(size), \
-+ (long)(offset), (long)(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)(samples), (long)(size), \
-+ (long)(offset), (long)(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)(fname), (long)(ops), \
-+ (long)(facs), (long)(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)(fname), (long)(ops), \
-+ (long)(facs), (long)(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)(signum), \
-+ (long)(nsa), (long)(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)(signum), (long)(nsa), (long)(osa))
++ 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)(how), \
-+ (long)(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)(how), \
-+ (long)(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)(namebuf), (long)(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)(namebuf), \
-+ (long)(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)(namebuf))
++ __sanitizer_syscall_pre_impl___setlogin((long long)(namebuf))
+#define __sanitizer_syscall_post___setlogin(res, namebuf) \
-+ __sanitizer_syscall_post_impl___setlogin(res, (long)(namebuf))
++ __sanitizer_syscall_post_impl___setlogin(res, (long long)(namebuf))
+#define __sanitizer_syscall_pre_acct(path) \
-+ __sanitizer_syscall_pre_impl_acct((long)(path))
++ __sanitizer_syscall_pre_impl_acct((long long)(path))
+#define __sanitizer_syscall_post_acct(res, path) \
-+ __sanitizer_syscall_post_impl_acct(res, (long)(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)(nss), (long)(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)(nss), \
-+ (long)(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)(fd), (long)(com), (long)(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)(fd), (long)(com), \
-+ (long)(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)(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)(opt))
++ __sanitizer_syscall_post_impl_compat_12_oreboot(res, (long long)(opt))
+#define __sanitizer_syscall_pre_revoke(path) \
-+ __sanitizer_syscall_pre_impl_revoke((long)(path))
++ __sanitizer_syscall_pre_impl_revoke((long long)(path))
+#define __sanitizer_syscall_post_revoke(res, path) \
-+ __sanitizer_syscall_post_impl_revoke(res, (long)(path))
++ __sanitizer_syscall_post_impl_revoke(res, (long long)(path))
+#define __sanitizer_syscall_pre_symlink(path, link) \
-+ __sanitizer_syscall_pre_impl_symlink((long)(path), (long)(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)(path), (long)(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)(path), (long)(buf), \
-+ (long)(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)(path), (long)(buf), \
-+ (long)(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)(path), (long)(argp), (long)(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)(path), (long)(argp), \
-+ (long)(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)(newmask))
++ __sanitizer_syscall_pre_impl_umask((long long)(newmask))
+#define __sanitizer_syscall_post_umask(res, newmask) \
-+ __sanitizer_syscall_post_impl_umask(res, (long)(newmask))
++ __sanitizer_syscall_post_impl_umask(res, (long long)(newmask))
+#define __sanitizer_syscall_pre_chroot(path) \
-+ __sanitizer_syscall_pre_impl_chroot((long)(path))
++ __sanitizer_syscall_pre_impl_chroot((long long)(path))
+#define __sanitizer_syscall_post_chroot(res, path) \
-+ __sanitizer_syscall_post_impl_chroot(res, (long)(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)(fd), (long)(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)(fd), (long)(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)(op), (long)(where), (long)(size), (long)(arg))
++ (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)(op), (long)(where), (long)(size), (long)(arg))
++ 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)(addr), (long)(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)(addr), (long)(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)
@@ -348,485 +384,539 @@ $NetBSD$
+/* 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)(addr), (long)(len), \
-+ (long)(prot), (long)(flags), \
-+ (long)(fd), (long)(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)(addr), (long)(len), (long)(prot), (long)(flags), (long)(fd), \
-+ (long)(pos))
++ res, (long long)(addr), (long long)(len), (long long)(prot), \
++ (long long)(flags), (long long)(fd), (long long)(pos))
+/* syscall 72 has been skipped */
+#define __sanitizer_syscall_pre_munmap(addr, len) \
-+ __sanitizer_syscall_pre_impl_munmap((long)(addr), (long)(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)(addr), (long)(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)(addr), (long)(len), (long)(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)(addr), (long)(len), \
-+ (long)(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)(addr), (long)(len), (long)(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)(addr), (long)(len), \
-+ (long)(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)(addr), (long)(len), (long)(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)(addr), (long)(len), \
-+ (long)(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)(gidsetsize), (long)(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)(gidsetsize), \
-+ (long)(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)(gidsetsize), (long)(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)(gidsetsize), \
-+ (long)(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)(pid), (long)(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)(pid), (long)(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)(which), (long)(itv), \
-+ (long)(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)(which), \
-+ (long)(itv), (long)(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)(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)(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)(which), (long)(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)(which), \
-+ (long)(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)(hostname), \
-+ (long)(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)(hostname), \
-+ (long)(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)(hostname), \
-+ (long)(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)(hostname), \
-+ (long)(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)(from), (long)(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)(from), (long)(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)(fd), (long)(cmd), (long)(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)(fd), (long)(cmd), (long)(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)(nd), (long)(in), (long)(ou), (long)(ex), (long)(tv))
++ (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)(nd), (long)(in), (long)(ou), (long)(ex), (long)(tv))
++ 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)(fd))
++ __sanitizer_syscall_pre_impl_fsync((long long)(fd))
+#define __sanitizer_syscall_post_fsync(res, fd) \
-+ __sanitizer_syscall_post_impl_fsync(res, (long)(fd))
++ __sanitizer_syscall_post_impl_fsync(res, (long long)(fd))
+#define __sanitizer_syscall_pre_setpriority(which, who, prio) \
-+ __sanitizer_syscall_pre_impl_setpriority((long)(which), (long)(who), \
-+ (long)(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)(which), (long)(who), \
-+ (long)(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)(domain), (long)(type), \
-+ (long)(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)(domain), (long)(type), (long)(protocol))
++ res, (long long)(domain), (long long)(type), (long long)(protocol))
+#define __sanitizer_syscall_pre_connect(s, name, namelen) \
-+ __sanitizer_syscall_pre_impl_connect((long)(s), (long)(name), (long)(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)(s), (long)(name), \
-+ (long)(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)(s), (long)(name), \
-+ (long)(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)(s), (long)(name), (long)(anamelen))
++ res, (long long)(s), (long long)(name), (long long)(anamelen))
+#define __sanitizer_syscall_pre_getpriority(which, who) \
-+ __sanitizer_syscall_pre_impl_getpriority((long)(which), (long)(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)(which), (long)(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)(s), (long)(buf), \
-+ (long)(len), (long)(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)(s), (long)(buf), \
-+ (long)(len), (long)(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)(s), (long)(buf), \
-+ (long)(len), (long)(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)(s), (long)(buf), \
-+ (long)(len), (long)(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)(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)(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)(s), (long)(name), (long)(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)(s), (long)(name), \
-+ (long)(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)(s), (long)(level), (long)(name), (long)(val), (long)(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)(s), (long)(level), \
-+ (long)(name), (long)(val), \
-+ (long)(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)(s), (long)(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)(s), (long)(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)(signum), (long)(nsv), \
-+ (long)(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)(signum), \
-+ (long)(nsv), (long)(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)(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)(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)(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)(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)(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)(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)(nss), (long)(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)(nss), \
-+ (long)(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)(s), (long)(msg), \
-+ (long)(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)(s), \
-+ (long)(msg), (long)(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)(s), (long)(msg), \
-+ (long)(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)(s), \
-+ (long)(msg), (long)(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)(tp), (long)(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)(tp), \
-+ (long)(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)(who), (long)(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)(who), \
-+ (long)(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)(s), (long)(level), (long)(name), (long)(val), (long)(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)(s), (long)(level), \
-+ (long)(name), (long)(val), \
-+ (long)(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)(fd), (long)(iovp), (long)(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)(fd), (long)(iovp), \
-+ (long)(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)(fd), (long)(iovp), (long)(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)(fd), (long)(iovp), \
-+ (long)(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)(tv), (long)(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)(tv), \
-+ (long)(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)(fd), (long)(uid), (long)(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)(fd), (long)(uid), \
-+ (long)(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)(fd), (long)(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)(fd), (long)(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)(s), (long)(buf), (long)(len), (long)(flags), (long)(from), \
-+ (long)(fromlenaddr))
++ (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)(s), (long)(buf), (long)(len), (long)(flags), (long)(from), \
-+ (long)(fromlenaddr))
++ 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)(ruid), (long)(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)(ruid), (long)(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)(rgid), (long)(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)(rgid), (long)(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)(from), (long)(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)(from), (long)(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)(path), (long)(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)(path), \
-+ (long)(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)(fd), (long)(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)(fd), \
-+ (long)(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)(fd), (long)(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)(fd), (long)(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)(path), (long)(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)(path), (long)(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)(s), (long)(buf), (long)(len), \
-+ (long)(flags), (long)(to), \
-+ (long)(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)(s), (long)(buf), \
-+ (long)(len), (long)(flags), (long)(to), \
-+ (long)(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)(s), (long)(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)(s), (long)(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)(domain), (long)(type), \
-+ (long)(protocol), (long)(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)(domain), (long)(type), \
-+ (long)(protocol), (long)(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)(path), (long)(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)(path), (long)(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)(path))
++ __sanitizer_syscall_pre_impl_rmdir((long long)(path))
+#define __sanitizer_syscall_post_rmdir(res, path) \
-+ __sanitizer_syscall_post_impl_rmdir(res, (long)(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)(path), (long)(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)(path), \
-+ (long)(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)(delta), \
-+ (long)(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)(delta), \
-+ (long)(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)(fdes), (long)(asa), (long)(alen))
++ (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)(fdes), (long)(asa), (long)(alen))
++ 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)(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)(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)(which), (long)(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)(which), \
-+ (long)(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)(which), (long)(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)(which), \
-+ (long)(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)(pgid), (long)(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)(pgid), \
-+ (long)(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)(path), (long)(cmd), \
-+ (long)(uid), (long)(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)(path), (long)(cmd), (long)(uid), (long)(arg))
++ 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)(fdec), (long)(asa), (long)(alen))
++ (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)(fdec), (long)(asa), (long)(alen))
++ 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)(flag), (long)(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)(flag), (long)(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)(fd), (long)(buf), (long)(count), (long)(basep))
++ (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)(fd), (long)(buf), (long)(count), (long)(basep))
++ 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)(path), (long)(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)(path), (long)(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)(fd), (long)(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)(fd), (long)(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)(fname), (long)(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)(fname), (long)(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)(domainname), \
-+ (long)(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)(domainname), (long)(len))
++ res, (long long)(domainname), (long long)(len))
+#define __sanitizer_syscall_pre_compat_09_osetdomainname(domainname, len) \
-+ __sanitizer_syscall_pre_impl_compat_09_osetdomainname((long)(domainname), \
-+ (long)(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)(domainname), (long)(len))
++ res, (long long)(domainname), (long long)(len))
+#define __sanitizer_syscall_pre_compat_09_ouname(name) \
-+ __sanitizer_syscall_pre_impl_compat_09_ouname((long)(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)(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)(op), (long)(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)(op), (long)(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)(which), (long)(a2), (long)(a3), (long)(a4), (long)(a5))
++ (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)(which), (long)(a2), (long)(a3), (long)(a4), (long)(a5))
++ 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)(which), (long)(a2), \
-+ (long)(a3), (long)(a4), \
-+ (long)(a5), (long)(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)(which), (long)(a2), (long)(a3), (long)(a4), (long)(a5), \
-+ (long)(a6))
++ 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)(which), (long)(a2), \
-+ (long)(a3), (long)(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)(which), (long)(a2), (long)(a3), (long)(a4))
++ 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)(fd), (long)(buf), (long)(nbyte), \
-+ (long)(PAD), (long)(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)(fd), (long)(buf), \
-+ (long)(nbyte), (long)(PAD), \
-+ (long)(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)(fd), (long)(buf), (long)(nbyte), \
-+ (long)(PAD), (long)(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)(fd), (long)(buf), \
-+ (long)(nbyte), (long)(PAD), \
-+ (long)(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)(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)(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)(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)(tp))
++ __sanitizer_syscall_post_impl_ntp_adjtime(res, (long long)(tp))
+#else
+/* syscall 176 has been skipped */
+#endif
@@ -835,159 +925,181 @@ $NetBSD$
+/* syscall 179 has been skipped */
+/* syscall 180 has been skipped */
+#define __sanitizer_syscall_pre_setgid(gid) \
-+ __sanitizer_syscall_pre_impl_setgid((long)(gid))
++ __sanitizer_syscall_pre_impl_setgid((long long)(gid))
+#define __sanitizer_syscall_post_setgid(res, gid) \
-+ __sanitizer_syscall_post_impl_setgid(res, (long)(gid))
++ __sanitizer_syscall_post_impl_setgid(res, (long long)(gid))
+#define __sanitizer_syscall_pre_setegid(egid) \
-+ __sanitizer_syscall_pre_impl_setegid((long)(egid))
++ __sanitizer_syscall_pre_impl_setegid((long long)(egid))
+#define __sanitizer_syscall_post_setegid(res, egid) \
-+ __sanitizer_syscall_post_impl_setegid(res, (long)(egid))
++ __sanitizer_syscall_post_impl_setegid(res, (long long)(egid))
+#define __sanitizer_syscall_pre_seteuid(euid) \
-+ __sanitizer_syscall_pre_impl_seteuid((long)(euid))
++ __sanitizer_syscall_pre_impl_seteuid((long long)(euid))
+#define __sanitizer_syscall_post_seteuid(res, euid) \
-+ __sanitizer_syscall_post_impl_seteuid(res, (long)(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)(fsidp), (long)(blkiov), \
-+ (long)(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)(fsidp), (long)(blkiov), \
-+ (long)(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)(fsidp), (long)(blkiov), \
-+ (long)(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)(fsidp), (long)(blkiov), \
-+ (long)(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)(fsidp), (long)(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)(fsidp), \
-+ (long)(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)(fsidp), (long)(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)(fsidp), \
-+ (long)(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)(path), (long)(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)(path), (long)(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)(fd), (long)(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)(fd), (long)(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)(path), (long)(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)(path), (long)(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)(path), (long)(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)(path), (long)(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)(fd), (long)(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)(fd), (long)(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)(which), (long)(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)(which), (long)(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)(which), (long)(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)(which), (long)(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)(fd), (long)(buf), (long)(count), (long)(basep))
++ (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)(fd), (long)(buf), (long)(count), (long)(basep))
++ 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)(addr), (long)(len), (long)(prot), \
-+ (long)(flags), (long)(fd), (long)(PAD), \
-+ (long)(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)(addr), (long)(len), \
-+ (long)(prot), (long)(flags), (long)(fd), \
-+ (long)(PAD), (long)(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)(code), (long)(arg0), (long)(arg1), (long)(arg2), (long)(arg3), \
-+ (long)(arg4), (long)(arg5), (long)(arg6), (long)(arg7))
++ (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)(code), (long)(arg0), (long)(arg1), (long)(arg2), \
-+ (long)(arg3), (long)(arg4), (long)(arg5), (long)(arg6), (long)(arg7))
++ 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)(fd), (long)(PAD), (long)(offset), \
-+ (long)(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)(fd), (long)(PAD), \
-+ (long)(offset), (long)(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)(path), (long)(PAD), \
-+ (long)(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)(path), (long)(PAD), \
-+ (long)(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)(fd), (long)(PAD), \
-+ (long)(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)(fd), (long)(PAD), \
-+ (long)(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)(name), (long)(namelen), \
-+ (long)(oldv), (long)(oldlenp), \
-+ (long)(newv), (long)(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)(name), (long)(namelen), \
-+ (long)(oldv), (long)(oldlenp), \
-+ (long)(newv), (long)(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)(addr), (long)(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)(addr), (long)(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)(addr), (long)(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)(addr), (long)(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)(path))
++ __sanitizer_syscall_pre_impl_undelete((long long)(path))
+#define __sanitizer_syscall_post_undelete(res, path) \
-+ __sanitizer_syscall_post_impl_undelete(res, (long)(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)(fd), (long)(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)(fd), (long)(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)(pid))
++ __sanitizer_syscall_pre_impl_getpgid((long long)(pid))
+#define __sanitizer_syscall_post_getpgid(res, pid) \
-+ __sanitizer_syscall_post_impl_getpgid(res, (long)(pid))
++ __sanitizer_syscall_post_impl_getpgid(res, (long long)(pid))
+#define __sanitizer_syscall_pre_reboot(opt, bootstr) \
-+ __sanitizer_syscall_pre_impl_reboot((long)(opt), (long)(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)(opt), (long)(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)(fds), (long)(nfds), (long)(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)(fds), (long)(nfds), \
-+ (long)(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)(id), (long)(a1), (long)(a2), \
-+ (long)(a3), (long)(a4), (long)(a5), \
-+ (long)(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)(id), (long)(a1), \
-+ (long)(a2), (long)(a3), (long)(a4), \
-+ (long)(a5), (long)(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 */
@@ -999,464 +1111,513 @@ $NetBSD$
+/* syscall 219 has been skipped */
+#define __sanitizer_syscall_pre_compat_14___semctl(semid, semnum, cmd, arg) \
+ __sanitizer_syscall_pre_impl_compat_14___semctl( \
-+ (long)(semid), (long)(semnum), (long)(cmd), (long)(arg))
++ (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)(semid), (long)(semnum), (long)(cmd), (long)(arg))
++ 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)(key), (long)(nsems), \
-+ (long)(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)(key), (long)(nsems), \
-+ (long)(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)(semid), (long)(sops), (long)(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)(semid), (long)(sops), \
-+ (long)(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)(flag))
++ __sanitizer_syscall_pre_impl_semconfig((long long)(flag))
+#define __sanitizer_syscall_post_semconfig(res, flag) \
-+ __sanitizer_syscall_post_impl_semconfig(res, (long)(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)(msqid), (long)(cmd), \
-+ (long)(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)(msqid), \
-+ (long)(cmd), (long)(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)(key), (long)(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)(key), (long)(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)(msqid), (long)(msgp), \
-+ (long)(msgsz), (long)(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)(msqid), (long)(msgp), \
-+ (long)(msgsz), (long)(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)(msqid), (long)(msgp), \
-+ (long)(msgsz), (long)(msgtyp), \
-+ (long)(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)(msqid), (long)(msgp), \
-+ (long)(msgsz), (long)(msgtyp), \
-+ (long)(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)(shmid), (long)(shmaddr), \
-+ (long)(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)(shmid), (long)(shmaddr), \
-+ (long)(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)(shmid), (long)(cmd), \
-+ (long)(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)(shmid), \
-+ (long)(cmd), (long)(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)(shmaddr))
++ __sanitizer_syscall_pre_impl_shmdt((long long)(shmaddr))
+#define __sanitizer_syscall_post_shmdt(res, shmaddr) \
-+ __sanitizer_syscall_post_impl_shmdt(res, (long)(shmaddr))
++ __sanitizer_syscall_post_impl_shmdt(res, (long long)(shmaddr))
+#define __sanitizer_syscall_pre_shmget(key, size, shmflg) \
-+ __sanitizer_syscall_pre_impl_shmget((long)(key), (long)(size), (long)(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)(key), (long)(size), \
-+ (long)(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)(clock_id), \
-+ (long)(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)(clock_id), \
-+ (long)(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)(clock_id), \
-+ (long)(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)(clock_id), \
-+ (long)(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)(clock_id), \
-+ (long)(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)(clock_id), \
-+ (long)(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)(clock_id), (long)(evp), \
-+ (long)(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)(clock_id), \
-+ (long)(evp), (long)(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)(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)(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)(timerid), (long)(flags), (long)(value), (long)(ovalue))
++ (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)(timerid), (long)(flags), (long)(value), (long)(ovalue))
++ 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)(timerid), \
-+ (long)(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)(timerid), \
-+ (long)(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)(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)(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)(rqtp), (long)(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)(rqtp), \
-+ (long)(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)(fd))
++ __sanitizer_syscall_pre_impl_fdatasync((long long)(fd))
+#define __sanitizer_syscall_post_fdatasync(res, fd) \
-+ __sanitizer_syscall_post_impl_fdatasync(res, (long)(fd))
++ __sanitizer_syscall_post_impl_fdatasync(res, (long long)(fd))
+#define __sanitizer_syscall_pre_mlockall(flags) \
-+ __sanitizer_syscall_pre_impl_mlockall((long)(flags))
++ __sanitizer_syscall_pre_impl_mlockall((long long)(flags))
+#define __sanitizer_syscall_post_mlockall(res, flags) \
-+ __sanitizer_syscall_post_impl_mlockall(res, (long)(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)(set), (long)(info), (long)(timeout))
++ (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)(set), (long)(info), (long)(timeout))
++ res, (long long)(set), (long long)(info), (long long)(timeout))
+#define __sanitizer_syscall_pre_sigqueueinfo(pid, info) \
-+ __sanitizer_syscall_pre_impl_sigqueueinfo((long)(pid), (long)(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)(pid), (long)(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)(cmd), (long)(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)(cmd), (long)(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)(value), (long)(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)(value), (long)(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)(name), (long)(oflag), (long)(mode), (long)(value), (long)(idp))
++ (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)(name), (long)(oflag), \
-+ (long)(mode), (long)(value), \
-+ (long)(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)(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)(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)(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)(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)(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)(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)(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)(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)(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)(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)(id), (long)(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)(id), (long)(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)(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)(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)(id), (long)(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)(id), \
-+ (long)(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)(name), (long)(oflag), \
-+ (long)(mode), (long)(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)(name), (long)(oflag), \
-+ (long)(mode), (long)(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)(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)(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)(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)(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)(mqdes), (long)(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)(mqdes), (long)(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)(mqdes), (long)(mqstat), \
-+ (long)(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)(mqdes), (long)(mqstat), \
-+ (long)(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)(mqdes), (long)(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)(mqdes), \
-+ (long)(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)(mqdes), (long)(msg_ptr), \
-+ (long)(msg_len), (long)(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)(mqdes), (long)(msg_ptr), \
-+ (long)(msg_len), (long)(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)(mqdes), (long)(msg_ptr), \
-+ (long)(msg_len), (long)(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)(mqdes), (long)(msg_ptr), (long)(msg_len), (long)(msg_prio))
++ 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)(mqdes), (long)(msg_ptr), (long)(msg_len), (long)(msg_prio), \
-+ (long)(abs_timeout))
++ (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)(mqdes), (long)(msg_ptr), (long)(msg_len), (long)(msg_prio), \
-+ (long)(abs_timeout))
++ 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)(mqdes), (long)(msg_ptr), (long)(msg_len), (long)(msg_prio), \
-+ (long)(abs_timeout))
++ (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)(mqdes), (long)(msg_ptr), (long)(msg_len), (long)(msg_prio), \
-+ (long)(abs_timeout))
++ 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)(from), (long)(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)(from), (long)(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)(cmd), (long)(arg), (long)(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)(cmd), (long)(arg), \
-+ (long)(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)(fd), (long)(buf), \
-+ (long)(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)(fd), \
-+ (long)(buf), (long)(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)(addr), (long)(len), \
-+ (long)(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)(addr), (long)(len), \
-+ (long)(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)(path), (long)(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)(path), (long)(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)(path), (long)(uid), (long)(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)(path), (long)(uid), \
-+ (long)(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)(path), (long)(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)(path), \
-+ (long)(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)(addr), (long)(len), \
-+ (long)(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)(addr), (long)(len), \
-+ (long)(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)(path), (long)(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)(path), \
-+ (long)(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)(fd), (long)(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)(fd), (long)(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)(path), (long)(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)(path), \
-+ (long)(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)(nss), (long)(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)(nss), (long)(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)(path), (long)(uid), \
-+ (long)(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)(path), (long)(uid), \
-+ (long)(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)(fd), (long)(uid), \
-+ (long)(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)(fd), (long)(uid), \
-+ (long)(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)(path), (long)(uid), \
-+ (long)(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)(path), (long)(uid), \
-+ (long)(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)(pid))
++ __sanitizer_syscall_pre_impl_getsid((long long)(pid))
+#define __sanitizer_syscall_post_getsid(res, pid) \
-+ __sanitizer_syscall_post_impl_getsid(res, (long)(pid))
++ __sanitizer_syscall_post_impl_getsid(res, (long long)(pid))
+#define __sanitizer_syscall_pre___clone(flags, stack) \
-+ __sanitizer_syscall_pre_impl___clone((long)(flags), (long)(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)(flags), (long)(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)(fd), (long)(ops), (long)(facs), \
-+ (long)(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)(fd), (long)(ops), \
-+ (long)(facs), (long)(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)(fd), (long)(iovp), (long)(iovcnt), (long)(PAD), (long)(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)(fd), (long)(iovp), \
-+ (long)(iovcnt), (long)(PAD), \
-+ (long)(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)(fd), (long)(iovp), (long)(iovcnt), (long)(PAD), (long)(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)(fd), (long)(iovp), \
-+ (long)(iovcnt), (long)(PAD), \
-+ (long)(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)(signum), (long)(nsa), (long)(osa))
++ (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)(signum), (long)(nsa), (long)(osa))
++ res, (long long)(signum), (long long)(nsa), (long long)(osa))
+#define __sanitizer_syscall_pre___sigpending14(set) \
-+ __sanitizer_syscall_pre_impl___sigpending14((long)(set))
++ __sanitizer_syscall_pre_impl___sigpending14((long long)(set))
+#define __sanitizer_syscall_post___sigpending14(res, set) \
-+ __sanitizer_syscall_post_impl___sigpending14(res, (long)(set))
++ __sanitizer_syscall_post_impl___sigpending14(res, (long long)(set))
+#define __sanitizer_syscall_pre___sigprocmask14(how, set, oset) \
-+ __sanitizer_syscall_pre_impl___sigprocmask14((long)(how), (long)(set), \
-+ (long)(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)(how), (long)(set), \
-+ (long)(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)(set))
++ __sanitizer_syscall_pre_impl___sigsuspend14((long long)(set))
+#define __sanitizer_syscall_post___sigsuspend14(res, set) \
-+ __sanitizer_syscall_post_impl___sigsuspend14(res, (long)(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)(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)(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)(bufp), (long)(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)(bufp), (long)(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)(fd))
++ __sanitizer_syscall_pre_impl_fchroot((long long)(fd))
+#define __sanitizer_syscall_post_fchroot(res, fd) \
-+ __sanitizer_syscall_post_impl_fchroot(res, (long)(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)(fhp), (long)(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)(fhp), \
-+ (long)(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)(fhp), (long)(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)(fhp), (long)(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)(fhp), (long)(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)(fhp), \
-+ (long)(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)(semid), (long)(semnum), (long)(cmd), (long)(arg))
++ (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)(semid), (long)(semnum), (long)(cmd), (long)(arg))
++ 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)(msqid), \
-+ (long)(cmd), (long)(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)(msqid), \
-+ (long)(cmd), (long)(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)(shmid), \
-+ (long)(cmd), (long)(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)(shmid), \
-+ (long)(cmd), (long)(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)(path), (long)(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)(path), (long)(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)(label), (long)(addr), (long)(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)(label), (long)(addr), \
-+ (long)(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)(ucp))
++ __sanitizer_syscall_pre_impl_getcontext((long long)(ucp))
+#define __sanitizer_syscall_post_getcontext(res, ucp) \
-+ __sanitizer_syscall_post_impl_getcontext(res, (long)(ucp))
++ __sanitizer_syscall_post_impl_getcontext(res, (long long)(ucp))
+#define __sanitizer_syscall_pre_setcontext(ucp) \
-+ __sanitizer_syscall_pre_impl_setcontext((long)(ucp))
++ __sanitizer_syscall_pre_impl_setcontext((long long)(ucp))
+#define __sanitizer_syscall_post_setcontext(res, ucp) \
-+ __sanitizer_syscall_post_impl_setcontext(res, (long)(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)(ucp), (long)(flags), \
-+ (long)(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)(ucp), (long)(flags), \
-+ (long)(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) \
@@ -1466,70 +1627,81 @@ $NetBSD$
+#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)(wait_for), (long)(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)(wait_for), \
-+ (long)(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)(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)(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)(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)(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)(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)(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)(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)(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)(target), (long)(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)(target), (long)(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)(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)(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)(ts), (long)(unpark), (long)(hint), (long)(unparkhint))
++ (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)(ts), (long)(unpark), (long)(hint), (long)(unparkhint))
++ 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)(target), (long)(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)(target), (long)(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)(targets), \
-+ (long)(ntargets), (long)(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)(targets), (long)(ntargets), (long)(hint))
++ 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)(target), (long)(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)(target), (long)(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)(target), (long)(name), \
-+ (long)(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)(target), \
-+ (long)(name), (long)(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)(features), (long)(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)(features), (long)(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 */
@@ -1537,34 +1709,37 @@ $NetBSD$
+#define __sanitizer_syscall_pre_compat_60_sa_register(newv, oldv, flags, \
+ stackinfo_offset) \
+ __sanitizer_syscall_pre_impl_compat_60_sa_register( \
-+ (long)(newv), (long)(oldv), (long)(flags), (long)(stackinfo_offset))
++ (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)(newv), (long)(oldv), (long)(flags), \
-+ (long)(stackinfo_offset))
++ 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)(num), (long)(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)(num), \
-+ (long)(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)(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)(concurrency))
++ 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)(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)(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 */
@@ -1572,856 +1747,967 @@ $NetBSD$
+#define __sanitizer_syscall_pre___sigaction_sigtramp(signum, nsa, osa, tramp, \
+ vers) \
+ __sanitizer_syscall_pre_impl___sigaction_sigtramp( \
-+ (long)(signum), (long)(nsa), (long)(osa), (long)(tramp), (long)(vers))
++ (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)(signum), (long)(nsa), (long)(osa), (long)(tramp), \
-+ (long)(vers))
++ 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)(ctr), (long)(op), \
-+ (long)(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)(ctr), (long)(op), \
-+ (long)(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)(ctr), (long)(op), \
-+ (long)(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)(ctr), (long)(op), \
-+ (long)(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)(addr), (long)(len), (long)(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)(addr), (long)(len), \
-+ (long)(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)(fd), (long)(changelist), (long)(nchanges), (long)(eventlist), \
-+ (long)(nevents), (long)(timeout))
++ (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)(fd), (long)(changelist), (long)(nchanges), \
-+ (long)(eventlist), (long)(nevents), (long)(timeout))
++ 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)(pid), (long)(lid), \
-+ (long)(policy), (long)(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)(pid), (long)(lid), (long)(policy), (long)(params))
++ 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)(pid), (long)(lid), \
-+ (long)(policy), (long)(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)(pid), (long)(lid), (long)(policy), (long)(params))
++ 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)(pid), (long)(lid), (long)(size), (long)(cpuset))
++ (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)(pid), (long)(lid), (long)(size), (long)(cpuset))
++ 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)(pid), (long)(lid), (long)(size), (long)(cpuset))
++ (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)(pid), (long)(lid), (long)(size), (long)(cpuset))
++ 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)(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)(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)(fd), (long)(flags), \
-+ (long)(start), (long)(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)(fd), (long)(flags), \
-+ (long)(start), (long)(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)(store), (long)(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)(store), (long)(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)(buf), (long)(bufsize), \
-+ (long)(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)(buf), (long)(bufsize), \
-+ (long)(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)(path), (long)(buf), \
-+ (long)(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)(path), (long)(buf), \
-+ (long)(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)(fd), (long)(buf), (long)(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)(fd), (long)(buf), \
-+ (long)(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)(fhp), (long)(buf), \
-+ (long)(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)(fhp), (long)(buf), (long)(flags))
++ 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)(path), (long)(cmd), (long)(filename), (long)(attrnamespace), \
-+ (long)(attrname))
++ (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)(path), (long)(cmd), (long)(filename), (long)(attrnamespace), \
-+ (long)(attrname))
++ 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)(path), (long)(attrnamespace), (long)(attrname), (long)(data), \
-+ (long)(nbytes))
++ (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)(path), (long)(attrnamespace), (long)(attrname), \
-+ (long)(data), (long)(nbytes))
++ 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)(path), (long)(attrnamespace), (long)(attrname), (long)(data), \
-+ (long)(nbytes))
++ (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)(path), (long)(attrnamespace), (long)(attrname), \
-+ (long)(data), (long)(nbytes))
++ 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)(path), (long)(attrnamespace), (long)(attrname))
++ (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)(path), (long)(attrnamespace), (long)(attrname))
++ 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)(fd), (long)(attrnamespace), (long)(attrname), (long)(data), \
-+ (long)(nbytes))
++ (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)(fd), (long)(attrnamespace), (long)(attrname), (long)(data), \
-+ (long)(nbytes))
++ 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)(fd), (long)(attrnamespace), (long)(attrname), (long)(data), \
-+ (long)(nbytes))
++ (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)(fd), (long)(attrnamespace), (long)(attrname), (long)(data), \
-+ (long)(nbytes))
++ 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)(fd), (long)(attrnamespace), (long)(attrname))
++ (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)(fd), (long)(attrnamespace), (long)(attrname))
++ 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)(path), (long)(attrnamespace), (long)(attrname), (long)(data), \
-+ (long)(nbytes))
++ (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)(path), (long)(attrnamespace), (long)(attrname), \
-+ (long)(data), (long)(nbytes))
++ 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)(path), (long)(attrnamespace), (long)(attrname), (long)(data), \
-+ (long)(nbytes))
++ (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)(path), (long)(attrnamespace), (long)(attrname), \
-+ (long)(data), (long)(nbytes))
++ 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)(path), (long)(attrnamespace), (long)(attrname))
++ (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)(path), (long)(attrnamespace), (long)(attrname))
++ 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)(fd), (long)(attrnamespace), (long)(data), (long)(nbytes))
++ (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)(fd), (long)(attrnamespace), (long)(data), (long)(nbytes))
++ 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)(path), (long)(attrnamespace), (long)(data), (long)(nbytes))
++ (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)(path), (long)(attrnamespace), (long)(data), (long)(nbytes))
++ 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)(path), (long)(attrnamespace), (long)(data), (long)(nbytes))
++ (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)(path), (long)(attrnamespace), (long)(data), (long)(nbytes))
++ 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)(nd), (long)(in), \
-+ (long)(ou), (long)(ex), \
-+ (long)(ts), (long)(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)(nd), (long)(in), \
-+ (long)(ou), (long)(ex), \
-+ (long)(ts), (long)(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)(fds), (long)(nfds), \
-+ (long)(ts), (long)(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)(fds), (long)(nfds), (long)(ts), (long)(mask))
++ 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)(path), (long)(name), (long)(value), (long)(size), (long)(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)(path), (long)(name), \
-+ (long)(value), (long)(size), \
-+ (long)(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)(path), (long)(name), (long)(value), (long)(size), (long)(flags))
++ (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)(path), (long)(name), \
-+ (long)(value), (long)(size), \
-+ (long)(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)(fd), (long)(name), (long)(value), (long)(size), (long)(flags))
++ (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)(fd), (long)(name), \
-+ (long)(value), (long)(size), \
-+ (long)(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)(path), (long)(name), \
-+ (long)(value), (long)(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)(path), (long)(name), \
-+ (long)(value), (long)(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)(path), (long)(name), \
-+ (long)(value), (long)(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)(path), (long)(name), \
-+ (long)(value), (long)(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)(fd), (long)(name), \
-+ (long)(value), (long)(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)(fd), (long)(name), \
-+ (long)(value), (long)(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)(path), (long)(list), \
-+ (long)(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)(path), (long)(list), \
-+ (long)(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)(path), (long)(list), \
-+ (long)(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)(path), (long)(list), \
-+ (long)(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)(fd), (long)(list), \
-+ (long)(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)(fd), (long)(list), \
-+ (long)(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)(path), (long)(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)(path), (long)(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)(path), (long)(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)(path), (long)(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)(fd), (long)(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)(fd), (long)(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)(path), (long)(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)(path), \
-+ (long)(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)(fd), (long)(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)(fd), (long)(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)(path), (long)(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)(path), \
-+ (long)(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)(fd), (long)(buf), \
-+ (long)(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)(fd), (long)(buf), \
-+ (long)(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)())
++ __sanitizer_syscall_pre_impl_posix_fadvise((long long)())
+#define __sanitizer_syscall_post_posix_fadvise(res) \
-+ __sanitizer_syscall_post_impl_posix_fadvise(res, (long)())
++ __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)(fhp), (long)(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)(fhp), \
-+ (long)(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)(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)(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)(domain), (long)(type), \
-+ (long)(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)(domain), (long)(type), \
-+ (long)(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)(fname), (long)(fhp), \
-+ (long)(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)(fname), (long)(fhp), \
-+ (long)(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)(fhp), (long)(fh_size), \
-+ (long)(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)(fhp), (long)(fh_size), \
-+ (long)(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)(fhp), (long)(fh_size), \
-+ (long)(buf), (long)(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)(fhp), (long)(fh_size), (long)(buf), (long)(flags))
++ 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)(fhp), (long)(fh_size), (long)(sb))
++ (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)(fhp), (long)(fh_size), (long)(sb))
++ 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)(fildes), (long)(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)(fildes), (long)(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)(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)(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)(op), (long)(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)(op), (long)(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)(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)(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)(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)(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)(list), (long)(nent), (long)(timeout))
++ (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)(list), (long)(nent), (long)(timeout))
++ res, (long long)(list), (long long)(nent), (long long)(timeout))
+#define __sanitizer_syscall_pre_aio_write(aiocbp) \
-+ __sanitizer_syscall_pre_impl_aio_write((long)(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)(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)(mode), (long)(list), \
-+ (long)(nent), (long)(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)(mode), (long)(list), \
-+ (long)(nent), (long)(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)(type), (long)(path), \
-+ (long)(flags), (long)(data), \
-+ (long)(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)(type), (long)(path), \
-+ (long)(flags), (long)(data), \
-+ (long)(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)(old_address), (long)(old_size), \
-+ (long)(new_address), (long)(new_size), \
-+ (long)(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)(old_address), \
-+ (long)(old_size), (long)(new_address), \
-+ (long)(new_size), (long)(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)(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)(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)(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)(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)(psid), (long)(cpuid), \
-+ (long)(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)(psid), (long)(cpuid), \
-+ (long)(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)(idtype), (long)(first_id), \
-+ (long)(second_id), (long)(psid), \
-+ (long)(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)(idtype), (long)(first_id), (long)(second_id), (long)(psid), \
-+ (long)(opsid))
++ 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)(fd), (long)(PAD), (long)(offset), (long)(len), (long)(advice))
++ (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)(fd), \
-+ (long)(PAD), (long)(offset), \
-+ (long)(len), (long)(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)(nd), (long)(in), (long)(ou), \
-+ (long)(ex), (long)(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)(nd), (long)(in), \
-+ (long)(ou), (long)(ex), (long)(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)(tp), (long)(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)(tp), (long)(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)(tv), (long)(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)(tv), (long)(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)(path), (long)(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)(path), (long)(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)(delta), (long)(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)(delta), \
-+ (long)(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)(fsidp), (long)(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)(fsidp), (long)(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)(fd), (long)(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)(fd), (long)(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)(path), (long)(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)(path), (long)(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)(which), (long)(itv), \
-+ (long)(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)(which), (long)(itv), \
-+ (long)(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)(which), (long)(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)(which), (long)(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)(clock_id), (long)(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)(clock_id), \
-+ (long)(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)(clock_id), (long)(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)(clock_id), \
-+ (long)(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)(clock_id), (long)(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)(clock_id), \
-+ (long)(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)(rqtp), (long)(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)(rqtp), (long)(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)(set), (long)(info), \
-+ (long)(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)(set), (long)(info), (long)(timeout))
++ 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)(mqdes), (long)(msg_ptr), (long)(msg_len), (long)(msg_prio), \
-+ (long)(abs_timeout))
++ (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)(mqdes), (long)(msg_ptr), (long)(msg_len), (long)(msg_prio), \
-+ (long)(abs_timeout))
++ 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)(mqdes), (long)(msg_ptr), (long)(msg_len), (long)(msg_prio), \
-+ (long)(abs_timeout))
++ (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)(mqdes), (long)(msg_ptr), (long)(msg_len), (long)(msg_prio), \
-+ (long)(abs_timeout))
++ 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)(ts), (long)(unpark), (long)(hint), (long)(unparkhint))
++ (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)(ts), (long)(unpark), (long)(hint), (long)(unparkhint))
++ 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)(fd), (long)(changelist), \
-+ (long)(nchanges), (long)(eventlist), \
-+ (long)(nevents), (long)(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)(fd), (long)(changelist), (long)(nchanges), \
-+ (long)(eventlist), (long)(nevents), (long)(timeout))
++ 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)(nd), (long)(in), (long)(ou), \
-+ (long)(ex), (long)(ts), \
-+ (long)(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)(nd), (long)(in), \
-+ (long)(ou), (long)(ex), \
-+ (long)(ts), (long)(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)(fds), (long)(nfds), \
-+ (long)(ts), (long)(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)(fds), (long)(nfds), \
-+ (long)(ts), (long)(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)(list), (long)(nent), \
-+ (long)(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)(list), \
-+ (long)(nent), (long)(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)(path), (long)(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)(path), (long)(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)(fd), (long)(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)(fd), (long)(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)(path), (long)(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)(path), (long)(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)(semid), (long)(semnum), \
-+ (long)(cmd), (long)(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)(semid), (long)(semnum), (long)(cmd), (long)(arg))
++ 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)(shmid), (long)(cmd), \
-+ (long)(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)(shmid), (long)(cmd), \
-+ (long)(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)(msqid), (long)(cmd), \
-+ (long)(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)(msqid), (long)(cmd), \
-+ (long)(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)(who), (long)(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)(who), (long)(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)(timerid), (long)(flags), (long)(value), (long)(ovalue))
++ (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)(timerid), (long)(flags), (long)(value), (long)(ovalue))
++ 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)(timerid), (long)(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)(timerid), \
-+ (long)(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)(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)(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)(pid), (long)(status), \
-+ (long)(options), (long)(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)(pid), (long)(status), \
-+ (long)(options), (long)(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)(path), (long)(mode), \
-+ (long)(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)(path), (long)(mode), \
-+ (long)(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)(fhp), (long)(fh_size), \
-+ (long)(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)(fhp), (long)(fh_size), \
-+ (long)(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)(fildes), (long)(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)(fildes), (long)(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)(from), (long)(to), (long)(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)(from), (long)(to), \
-+ (long)(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)(flags))
++ __sanitizer_syscall_pre_impl_kqueue1((long long)(flags))
+#define __sanitizer_syscall_post_kqueue1(res, flags) \
-+ __sanitizer_syscall_post_impl_kqueue1(res, (long)(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)(s), (long)(name), (long)(anamelen), (long)(mask), (long)(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)(s), (long)(name), \
-+ (long)(anamelen), (long)(mask), \
-+ (long)(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)(fd1), (long)(name1), (long)(fd2), \
-+ (long)(name2), (long)(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)(fd1), (long)(name1), \
-+ (long)(fd2), (long)(name2), \
-+ (long)(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)(fromfd), (long)(from), \
-+ (long)(tofd), (long)(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)(fromfd), (long)(from), \
-+ (long)(tofd), (long)(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)(fd), (long)(path), (long)(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)(fd), (long)(path), \
-+ (long)(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)(fd), (long)(path), (long)(mode), \
-+ (long)(PAD), (long)(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)(fd), (long)(path), (long)(mode), (long)(PAD), (long)(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)(fd), (long)(path), (long)(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)(fd), (long)(path), \
-+ (long)(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)(fd), (long)(path), \
-+ (long)(amode), (long)(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)(fd), (long)(path), \
-+ (long)(amode), (long)(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)(fd), (long)(path), \
-+ (long)(mode), (long)(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)(fd), (long)(path), \
-+ (long)(mode), (long)(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)(fd), (long)(path), (long)(owner), (long)(group), (long)(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)(fd), (long)(path), \
-+ (long)(owner), (long)(group), \
-+ (long)(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)(fd), (long)(argp), (long)(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)(fd), (long)(argp), \
-+ (long)(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)(fd), (long)(path), (long)(buf), \
-+ (long)(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)(fd), (long)(path), \
-+ (long)(buf), (long)(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)(fd), (long)(path), \
-+ (long)(tptr), (long)(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)(fd), (long)(path), \
-+ (long)(tptr), (long)(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)(fd), (long)(path), \
-+ (long)(oflags), (long)(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)(fd), (long)(path), \
-+ (long)(oflags), (long)(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)(fd), (long)(path), \
-+ (long)(buf), (long)(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)(fd), (long)(path), \
-+ (long)(buf), (long)(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)(path1), (long)(fd), \
-+ (long)(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)(path1), (long)(fd), \
-+ (long)(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)(fd), (long)(path), (long)(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)(fd), (long)(path), \
-+ (long)(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)(fd), (long)(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)(fd), (long)(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)(path), (long)(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)(path), (long)(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)(pid), (long)(path), (long)(file_actions), (long)(attrp), \
-+ (long)(argv), (long)(envp))
++ (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)(pid), (long)(path), (long)(file_actions), (long)(attrp), \
-+ (long)(argv), (long)(envp))
++ 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)(s), (long)(mmsg), (long)(vlen), \
-+ (long)(flags), (long)(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)(s), (long)(mmsg), \
-+ (long)(vlen), (long)(flags), \
-+ (long)(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)(s), (long)(mmsg), (long)(vlen), \
-+ (long)(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)(s), (long)(mmsg), \
-+ (long)(vlen), (long)(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)(clock_id), (long)(flags), (long)(rqtp), (long)(rmtp))
++ (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)(clock_id), (long)(flags), (long)(rqtp), (long)(rmtp))
++ 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)(clock_id), (long)(flags), \
-+ (long)(ts), (long)(unpark), \
-+ (long)(hint), (long)(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)(clock_id), (long)(flags), (long)(ts), (long)(unpark), \
-+ (long)(hint), (long)(unparkhint))
++ 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)(fd), (long)(PAD), \
-+ (long)(pos), (long)(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)(fd), (long)(PAD), \
-+ (long)(pos), (long)(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)(fd), (long)(PAD), (long)(pos), \
-+ (long)(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)(fd), (long)(PAD), \
-+ (long)(pos), (long)(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)(idtype), (long)(id), \
-+ (long)(status), (long)(options), \
-+ (long)(wru), (long)(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)(idtype), (long)(id), \
-+ (long)(status), (long)(options), \
-+ (long)(wru), (long)(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)(idtype), (long)(id), (long)(clock_id))
++ (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)(idtype), (long)(id), (long)(clock_id))
++ res, (long long)(idtype), (long long)(id), (long long)(clock_id))
+
+#ifdef __cplusplus
+extern "C" {
@@ -2431,505 +2717,682 @@ $NetBSD$
+
+// DO NOT EDIT! THIS FILE HAS BEEN GENERATED!
+
-+void __sanitizer_syscall_pre_impl_syscall(long code, long arg0, long arg1,
-+ long arg2, long arg3, long arg4,
-+ long arg5, long arg6, long arg7);
-+void __sanitizer_syscall_post_impl_syscall(long res, long code, long arg0,
-+ long arg1, long arg2, long arg3,
-+ long arg4, long arg5, long arg6,
-+ long arg7);
-+void __sanitizer_syscall_pre_impl_exit(long rval);
-+void __sanitizer_syscall_post_impl_exit(long res, long rval);
++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 res);
-+void __sanitizer_syscall_pre_impl_read(long fd, long buf, long nbyte);
-+void __sanitizer_syscall_post_impl_read(long res, long fd, long buf,
-+ long nbyte);
-+void __sanitizer_syscall_pre_impl_write(long fd, long buf, long nbyte);
-+void __sanitizer_syscall_post_impl_write(long res, long fd, long buf,
-+ long nbyte);
-+void __sanitizer_syscall_pre_impl_open(long path, long flags, long mode);
-+void __sanitizer_syscall_post_impl_open(long res, long path, long flags,
-+ long mode);
-+void __sanitizer_syscall_pre_impl_close(long fd);
-+void __sanitizer_syscall_post_impl_close(long res, long fd);
-+void __sanitizer_syscall_pre_impl_compat_50_wait4(long pid, long status,
-+ long options, long rusage);
-+void __sanitizer_syscall_post_impl_compat_50_wait4(long res, long pid,
-+ long status, long options,
-+ long rusage);
-+void __sanitizer_syscall_pre_impl_compat_43_ocreat(long path, long mode);
-+void __sanitizer_syscall_post_impl_compat_43_ocreat(long res, long path,
-+ long mode);
-+void __sanitizer_syscall_pre_impl_link(long path, long link);
-+void __sanitizer_syscall_post_impl_link(long res, long path, long link);
-+void __sanitizer_syscall_pre_impl_unlink(long path);
-+void __sanitizer_syscall_post_impl_unlink(long res, long path);
++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 path);
-+void __sanitizer_syscall_post_impl_chdir(long res, long path);
-+void __sanitizer_syscall_pre_impl_fchdir(long fd);
-+void __sanitizer_syscall_post_impl_fchdir(long res, long fd);
-+void __sanitizer_syscall_pre_impl_compat_50_mknod(long path, long mode,
-+ long dev);
-+void __sanitizer_syscall_post_impl_compat_50_mknod(long res, long path,
-+ long mode, long dev);
-+void __sanitizer_syscall_pre_impl_chmod(long path, long mode);
-+void __sanitizer_syscall_post_impl_chmod(long res, long path, long mode);
-+void __sanitizer_syscall_pre_impl_chown(long path, long uid, long gid);
-+void __sanitizer_syscall_post_impl_chown(long res, long path, long uid,
-+ long gid);
-+void __sanitizer_syscall_pre_impl_break(long nsize);
-+void __sanitizer_syscall_post_impl_break(long res, long nsize);
-+void __sanitizer_syscall_pre_impl_compat_20_getfsstat(long buf, long bufsize,
-+ long flags);
-+void __sanitizer_syscall_post_impl_compat_20_getfsstat(long res, long buf,
-+ long bufsize,
-+ long flags);
-+void __sanitizer_syscall_pre_impl_compat_43_olseek(long fd, long offset,
-+ long whence);
-+void __sanitizer_syscall_post_impl_compat_43_olseek(long res, long fd,
-+ long offset, long whence);
++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 res);
-+void __sanitizer_syscall_pre_impl_compat_40_mount(long type, long path,
-+ long flags, long data);
-+void __sanitizer_syscall_post_impl_compat_40_mount(long res, long type,
-+ long path, long flags,
-+ long data);
-+void __sanitizer_syscall_pre_impl_unmount(long path, long flags);
-+void __sanitizer_syscall_post_impl_unmount(long res, long path, long flags);
-+void __sanitizer_syscall_pre_impl_setuid(long uid);
-+void __sanitizer_syscall_post_impl_setuid(long res, long uid);
++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 res);
++void __sanitizer_syscall_post_impl_getuid(long long res);
+void __sanitizer_syscall_pre_impl_geteuid(void);
-+void __sanitizer_syscall_post_impl_geteuid(long res);
-+void __sanitizer_syscall_pre_impl_ptrace(long req, long pid, long addr,
-+ long data);
-+void __sanitizer_syscall_post_impl_ptrace(long res, long req, long pid,
-+ long addr, long data);
-+void __sanitizer_syscall_pre_impl_recvmsg(long s, long msg, long flags);
-+void __sanitizer_syscall_post_impl_recvmsg(long res, long s, long msg,
-+ long flags);
-+void __sanitizer_syscall_pre_impl_sendmsg(long s, long msg, long flags);
-+void __sanitizer_syscall_post_impl_sendmsg(long res, long s, long msg,
-+ long flags);
-+void __sanitizer_syscall_pre_impl_recvfrom(long s, long buf, long len,
-+ long flags, long from,
-+ long fromlenaddr);
-+void __sanitizer_syscall_post_impl_recvfrom(long res, long s, long buf,
-+ long len, long flags, long from,
-+ long fromlenaddr);
-+void __sanitizer_syscall_pre_impl_accept(long s, long name, long anamelen);
-+void __sanitizer_syscall_post_impl_accept(long res, long s, long name,
-+ long anamelen);
-+void __sanitizer_syscall_pre_impl_getpeername(long fdes, long asa, long alen);
-+void __sanitizer_syscall_post_impl_getpeername(long res, long fdes, long asa,
-+ long alen);
-+void __sanitizer_syscall_pre_impl_getsockname(long fdes, long asa, long alen);
-+void __sanitizer_syscall_post_impl_getsockname(long res, long fdes, long asa,
-+ long alen);
-+void __sanitizer_syscall_pre_impl_access(long path, long flags);
-+void __sanitizer_syscall_post_impl_access(long res, long path, long flags);
-+void __sanitizer_syscall_pre_impl_chflags(long path, long flags);
-+void __sanitizer_syscall_post_impl_chflags(long res, long path, long flags);
-+void __sanitizer_syscall_pre_impl_fchflags(long fd, long flags);
-+void __sanitizer_syscall_post_impl_fchflags(long res, long fd, long flags);
++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 res);
-+void __sanitizer_syscall_pre_impl_kill(long pid, long signum);
-+void __sanitizer_syscall_post_impl_kill(long res, long pid, long signum);
-+void __sanitizer_syscall_pre_impl_compat_43_stat43(long path, long ub);
-+void __sanitizer_syscall_post_impl_compat_43_stat43(long res, long path,
-+ long ub);
++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 res);
-+void __sanitizer_syscall_pre_impl_compat_43_lstat43(long path, long ub);
-+void __sanitizer_syscall_post_impl_compat_43_lstat43(long res, long path,
-+ long ub);
-+void __sanitizer_syscall_pre_impl_dup(long fd);
-+void __sanitizer_syscall_post_impl_dup(long res, long fd);
++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 res);
++void __sanitizer_syscall_post_impl_pipe(long long res);
+void __sanitizer_syscall_pre_impl_getegid(void);
-+void __sanitizer_syscall_post_impl_getegid(long res);
-+void __sanitizer_syscall_pre_impl_profil(long samples, long size, long offset,
-+ long scale);
-+void __sanitizer_syscall_post_impl_profil(long res, long samples, long size,
-+ long offset, long scale);
-+void __sanitizer_syscall_pre_impl_ktrace(long fname, long ops, long facs,
-+ long pid);
-+void __sanitizer_syscall_post_impl_ktrace(long res, long fname, long ops,
-+ long facs, long pid);
-+void __sanitizer_syscall_pre_impl_compat_13_sigaction13(long signum, long nsa,
-+ long osa);
-+void __sanitizer_syscall_post_impl_compat_13_sigaction13(long res, long signum,
-+ long nsa, long osa);
++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 res);
-+void __sanitizer_syscall_pre_impl_compat_13_sigprocmask13(long how, long mask);
-+void __sanitizer_syscall_post_impl_compat_13_sigprocmask13(long res, long how,
-+ long mask);
-+void __sanitizer_syscall_pre_impl___getlogin(long namebuf, long namelen);
-+void __sanitizer_syscall_post_impl___getlogin(long res, long namebuf,
-+ long namelen);
-+void __sanitizer_syscall_pre_impl___setlogin(long namebuf);
-+void __sanitizer_syscall_post_impl___setlogin(long res, long namebuf);
-+void __sanitizer_syscall_pre_impl_acct(long path);
-+void __sanitizer_syscall_post_impl_acct(long res, long path);
++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 res);
-+void __sanitizer_syscall_pre_impl_compat_13_sigaltstack13(long nss, long oss);
-+void __sanitizer_syscall_post_impl_compat_13_sigaltstack13(long res, long nss,
-+ long oss);
-+void __sanitizer_syscall_pre_impl_ioctl(long fd, long com, long data);
-+void __sanitizer_syscall_post_impl_ioctl(long res, long fd, long com,
-+ long data);
-+void __sanitizer_syscall_pre_impl_compat_12_oreboot(long opt);
-+void __sanitizer_syscall_post_impl_compat_12_oreboot(long res, long opt);
-+void __sanitizer_syscall_pre_impl_revoke(long path);
-+void __sanitizer_syscall_post_impl_revoke(long res, long path);
-+void __sanitizer_syscall_pre_impl_symlink(long path, long link);
-+void __sanitizer_syscall_post_impl_symlink(long res, long path, long link);
-+void __sanitizer_syscall_pre_impl_readlink(long path, long buf, long count);
-+void __sanitizer_syscall_post_impl_readlink(long res, long path, long buf,
-+ long count);
-+void __sanitizer_syscall_pre_impl_execve(long path, long argp, long envp);
-+void __sanitizer_syscall_post_impl_execve(long res, long path, long argp,
-+ long envp);
-+void __sanitizer_syscall_pre_impl_umask(long newmask);
-+void __sanitizer_syscall_post_impl_umask(long res, long newmask);
-+void __sanitizer_syscall_pre_impl_chroot(long path);
-+void __sanitizer_syscall_post_impl_chroot(long res, long path);
-+void __sanitizer_syscall_pre_impl_compat_43_fstat43(long fd, long sb);
-+void __sanitizer_syscall_post_impl_compat_43_fstat43(long res, long fd,
-+ long sb);
-+void __sanitizer_syscall_pre_impl_compat_43_ogetkerninfo(long op, long where,
-+ long size, long arg);
-+void __sanitizer_syscall_post_impl_compat_43_ogetkerninfo(long res, long op,
-+ long where, long size,
-+ long arg);
++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 res);
-+void __sanitizer_syscall_pre_impl_compat_12_msync(long addr, long len);
-+void __sanitizer_syscall_post_impl_compat_12_msync(long res, long addr,
-+ long len);
++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 res);
++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 addr, long len,
-+ long prot, long flags,
-+ long fd, long pos);
-+void __sanitizer_syscall_post_impl_compat_43_ommap(long res, long addr,
-+ long len, long prot,
-+ long flags, long fd,
-+ long pos);
++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);
+/* syscall 72 has been skipped */
-+void __sanitizer_syscall_pre_impl_munmap(long addr, long len);
-+void __sanitizer_syscall_post_impl_munmap(long res, long addr, long len);
-+void __sanitizer_syscall_pre_impl_mprotect(long addr, long len, long prot);
-+void __sanitizer_syscall_post_impl_mprotect(long res, long addr, long len,
-+ long prot);
-+void __sanitizer_syscall_pre_impl_madvise(long addr, long len, long behav);
-+void __sanitizer_syscall_post_impl_madvise(long res, long addr, long len,
-+ long behav);
++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 addr, long len, long vec);
-+void __sanitizer_syscall_post_impl_mincore(long res, long addr, long len,
-+ long vec);
-+void __sanitizer_syscall_pre_impl_getgroups(long gidsetsize, long gidset);
-+void __sanitizer_syscall_post_impl_getgroups(long res, long gidsetsize,
-+ long gidset);
-+void __sanitizer_syscall_pre_impl_setgroups(long gidsetsize, long gidset);
-+void __sanitizer_syscall_post_impl_setgroups(long res, long gidsetsize,
-+ long gidset);
++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 res);
-+void __sanitizer_syscall_pre_impl_setpgid(long pid, long pgid);
-+void __sanitizer_syscall_post_impl_setpgid(long res, long pid, long pgid);
-+void __sanitizer_syscall_pre_impl_compat_50_setitimer(long which, long itv,
-+ long oitv);
-+void __sanitizer_syscall_post_impl_compat_50_setitimer(long res, long which,
-+ long itv, long oitv);
++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 res);
-+void __sanitizer_syscall_pre_impl_compat_12_oswapon(long name);
-+void __sanitizer_syscall_post_impl_compat_12_oswapon(long res, long name);
-+void __sanitizer_syscall_pre_impl_compat_50_getitimer(long which, long itv);
-+void __sanitizer_syscall_post_impl_compat_50_getitimer(long res, long which,
-+ long itv);
-+void __sanitizer_syscall_pre_impl_compat_43_ogethostname(long hostname,
-+ long len);
-+void __sanitizer_syscall_post_impl_compat_43_ogethostname(long res,
-+ long hostname,
-+ long len);
-+void __sanitizer_syscall_pre_impl_compat_43_osethostname(long hostname,
-+ long len);
-+void __sanitizer_syscall_post_impl_compat_43_osethostname(long res,
-+ long hostname,
-+ long len);
++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 res);
-+void __sanitizer_syscall_pre_impl_dup2(long from, long to);
-+void __sanitizer_syscall_post_impl_dup2(long res, long from, long to);
++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 fd, long cmd, long arg);
-+void __sanitizer_syscall_post_impl_fcntl(long res, long fd, long cmd, long arg);
-+void __sanitizer_syscall_pre_impl_compat_50_select(long nd, long in, long ou,
-+ long ex, long tv);
-+void __sanitizer_syscall_post_impl_compat_50_select(long res, long nd, long in,
-+ long ou, long ex, long tv);
++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 fd);
-+void __sanitizer_syscall_post_impl_fsync(long res, long fd);
-+void __sanitizer_syscall_pre_impl_setpriority(long which, long who, long prio);
-+void __sanitizer_syscall_post_impl_setpriority(long res, long which, long who,
-+ long prio);
-+void __sanitizer_syscall_pre_impl_compat_30_socket(long domain, long type,
-+ long protocol);
-+void __sanitizer_syscall_post_impl_compat_30_socket(long res, long domain,
-+ long type, long protocol);
-+void __sanitizer_syscall_pre_impl_connect(long s, long name, long namelen);
-+void __sanitizer_syscall_post_impl_connect(long res, long s, long name,
-+ long namelen);
-+void __sanitizer_syscall_pre_impl_compat_43_oaccept(long s, long name,
-+ long anamelen);
-+void __sanitizer_syscall_post_impl_compat_43_oaccept(long res, long s,
-+ long name, long anamelen);
-+void __sanitizer_syscall_pre_impl_getpriority(long which, long who);
-+void __sanitizer_syscall_post_impl_getpriority(long res, long which, long who);
-+void __sanitizer_syscall_pre_impl_compat_43_osend(long s, long buf, long len,
-+ long flags);
-+void __sanitizer_syscall_post_impl_compat_43_osend(long res, long s, long buf,
-+ long len, long flags);
-+void __sanitizer_syscall_pre_impl_compat_43_orecv(long s, long buf, long len,
-+ long flags);
-+void __sanitizer_syscall_post_impl_compat_43_orecv(long res, long s, long buf,
-+ long len, long flags);
-+void __sanitizer_syscall_pre_impl_compat_13_sigreturn13(long sigcntxp);
-+void __sanitizer_syscall_post_impl_compat_13_sigreturn13(long res,
-+ long sigcntxp);
-+void __sanitizer_syscall_pre_impl_bind(long s, long name, long namelen);
-+void __sanitizer_syscall_post_impl_bind(long res, long s, long name,
-+ long namelen);
-+void __sanitizer_syscall_pre_impl_setsockopt(long s, long level, long name,
-+ long val, long valsize);
-+void __sanitizer_syscall_post_impl_setsockopt(long res, long s, long level,
-+ long name, long val,
-+ long valsize);
-+void __sanitizer_syscall_pre_impl_listen(long s, long backlog);
-+void __sanitizer_syscall_post_impl_listen(long res, long s, long backlog);
++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 signum, long nsv,
-+ long osv);
-+void __sanitizer_syscall_post_impl_compat_43_osigvec(long res, long signum,
-+ long nsv, long osv);
-+void __sanitizer_syscall_pre_impl_compat_43_osigblock(long mask);
-+void __sanitizer_syscall_post_impl_compat_43_osigblock(long res, long mask);
-+void __sanitizer_syscall_pre_impl_compat_43_osigsetmask(long mask);
-+void __sanitizer_syscall_post_impl_compat_43_osigsetmask(long res, long mask);
-+void __sanitizer_syscall_pre_impl_compat_13_sigsuspend13(long mask);
-+void __sanitizer_syscall_post_impl_compat_13_sigsuspend13(long res, long mask);
-+void __sanitizer_syscall_pre_impl_compat_43_osigstack(long nss, long oss);
-+void __sanitizer_syscall_post_impl_compat_43_osigstack(long res, long nss,
-+ long oss);
-+void __sanitizer_syscall_pre_impl_compat_43_orecvmsg(long s, long msg,
-+ long flags);
-+void __sanitizer_syscall_post_impl_compat_43_orecvmsg(long res, long s,
-+ long msg, long flags);
-+void __sanitizer_syscall_pre_impl_compat_43_osendmsg(long s, long msg,
-+ long flags);
-+void __sanitizer_syscall_post_impl_compat_43_osendmsg(long res, long s,
-+ long msg, long flags);
++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 tp, long tzp);
-+void __sanitizer_syscall_post_impl_compat_50_gettimeofday(long res, long tp,
-+ long tzp);
-+void __sanitizer_syscall_pre_impl_compat_50_getrusage(long who, long rusage);
-+void __sanitizer_syscall_post_impl_compat_50_getrusage(long res, long who,
-+ long rusage);
-+void __sanitizer_syscall_pre_impl_getsockopt(long s, long level, long name,
-+ long val, long avalsize);
-+void __sanitizer_syscall_post_impl_getsockopt(long res, long s, long level,
-+ long name, long val,
-+ long avalsize);
++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 fd, long iovp, long iovcnt);
-+void __sanitizer_syscall_post_impl_readv(long res, long fd, long iovp,
-+ long iovcnt);
-+void __sanitizer_syscall_pre_impl_writev(long fd, long iovp, long iovcnt);
-+void __sanitizer_syscall_post_impl_writev(long res, long fd, long iovp,
-+ long iovcnt);
-+void __sanitizer_syscall_pre_impl_compat_50_settimeofday(long tv, long tzp);
-+void __sanitizer_syscall_post_impl_compat_50_settimeofday(long res, long tv,
-+ long tzp);
-+void __sanitizer_syscall_pre_impl_fchown(long fd, long uid, long gid);
-+void __sanitizer_syscall_post_impl_fchown(long res, long fd, long uid,
-+ long gid);
-+void __sanitizer_syscall_pre_impl_fchmod(long fd, long mode);
-+void __sanitizer_syscall_post_impl_fchmod(long res, long fd, long mode);
-+void __sanitizer_syscall_pre_impl_compat_43_orecvfrom(long s, long buf,
-+ long len, long flags,
-+ long from,
-+ long fromlenaddr);
-+void __sanitizer_syscall_post_impl_compat_43_orecvfrom(long res, long s,
-+ long buf, long len,
-+ long flags, long from,
-+ long fromlenaddr);
-+void __sanitizer_syscall_pre_impl_setreuid(long ruid, long euid);
-+void __sanitizer_syscall_post_impl_setreuid(long res, long ruid, long euid);
-+void __sanitizer_syscall_pre_impl_setregid(long rgid, long egid);
-+void __sanitizer_syscall_post_impl_setregid(long res, long rgid, long egid);
-+void __sanitizer_syscall_pre_impl_rename(long from, long to);
-+void __sanitizer_syscall_post_impl_rename(long res, long from, long to);
-+void __sanitizer_syscall_pre_impl_compat_43_otruncate(long path, long length);
-+void __sanitizer_syscall_post_impl_compat_43_otruncate(long res, long path,
-+ long length);
-+void __sanitizer_syscall_pre_impl_compat_43_oftruncate(long fd, long length);
-+void __sanitizer_syscall_post_impl_compat_43_oftruncate(long res, long fd,
-+ long length);
-+void __sanitizer_syscall_pre_impl_flock(long fd, long how);
-+void __sanitizer_syscall_post_impl_flock(long res, long fd, long how);
-+void __sanitizer_syscall_pre_impl_mkfifo(long path, long mode);
-+void __sanitizer_syscall_post_impl_mkfifo(long res, long path, long mode);
-+void __sanitizer_syscall_pre_impl_sendto(long s, long buf, long len, long flags,
-+ long to, long tolen);
-+void __sanitizer_syscall_post_impl_sendto(long res, long s, long buf, long len,
-+ long flags, long to, long tolen);
-+void __sanitizer_syscall_pre_impl_shutdown(long s, long how);
-+void __sanitizer_syscall_post_impl_shutdown(long res, long s, long how);
-+void __sanitizer_syscall_pre_impl_socketpair(long domain, long type,
-+ long protocol, long rsv);
-+void __sanitizer_syscall_post_impl_socketpair(long res, long domain, long type,
-+ long protocol, long rsv);
-+void __sanitizer_syscall_pre_impl_mkdir(long path, long mode);
-+void __sanitizer_syscall_post_impl_mkdir(long res, long path, long mode);
-+void __sanitizer_syscall_pre_impl_rmdir(long path);
-+void __sanitizer_syscall_post_impl_rmdir(long res, long path);
-+void __sanitizer_syscall_pre_impl_compat_50_utimes(long path, long tptr);
-+void __sanitizer_syscall_post_impl_compat_50_utimes(long res, long path,
-+ long tptr);
++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 delta, long olddelta);
-+void __sanitizer_syscall_post_impl_compat_50_adjtime(long res, long delta,
-+ long olddelta);
-+void __sanitizer_syscall_pre_impl_compat_43_ogetpeername(long fdes, long asa,
-+ long alen);
-+void __sanitizer_syscall_post_impl_compat_43_ogetpeername(long res, long fdes,
-+ long asa, long alen);
++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 res);
-+void __sanitizer_syscall_pre_impl_compat_43_osethostid(long hostid);
-+void __sanitizer_syscall_post_impl_compat_43_osethostid(long res, long hostid);
-+void __sanitizer_syscall_pre_impl_compat_43_ogetrlimit(long which, long rlp);
-+void __sanitizer_syscall_post_impl_compat_43_ogetrlimit(long res, long which,
-+ long rlp);
-+void __sanitizer_syscall_pre_impl_compat_43_osetrlimit(long which, long rlp);
-+void __sanitizer_syscall_post_impl_compat_43_osetrlimit(long res, long which,
-+ long rlp);
-+void __sanitizer_syscall_pre_impl_compat_43_okillpg(long pgid, long signum);
-+void __sanitizer_syscall_post_impl_compat_43_okillpg(long res, long pgid,
-+ long signum);
++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 res);
-+void __sanitizer_syscall_pre_impl_compat_50_quotactl(long path, long cmd,
-+ long uid, long arg);
-+void __sanitizer_syscall_post_impl_compat_50_quotactl(long res, long path,
-+ long cmd, long uid,
-+ long arg);
++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 res);
-+void __sanitizer_syscall_pre_impl_compat_43_ogetsockname(long fdec, long asa,
-+ long alen);
-+void __sanitizer_syscall_post_impl_compat_43_ogetsockname(long res, long fdec,
-+ long asa, long alen);
++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 flag, long argp);
-+void __sanitizer_syscall_post_impl_nfssvc(long res, long flag, long argp);
-+void __sanitizer_syscall_pre_impl_compat_43_ogetdirentries(long fd, long buf,
-+ long count,
-+ long basep);
-+void __sanitizer_syscall_post_impl_compat_43_ogetdirentries(long res, long fd,
-+ long buf,
-+ long count,
-+ long basep);
-+void __sanitizer_syscall_pre_impl_compat_20_statfs(long path, long buf);
-+void __sanitizer_syscall_post_impl_compat_20_statfs(long res, long path,
-+ long buf);
-+void __sanitizer_syscall_pre_impl_compat_20_fstatfs(long fd, long buf);
-+void __sanitizer_syscall_post_impl_compat_20_fstatfs(long res, long fd,
-+ long buf);
++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 fname, long fhp);
-+void __sanitizer_syscall_post_impl_compat_30_getfh(long res, long fname,
-+ long fhp);
-+void __sanitizer_syscall_pre_impl_compat_09_ogetdomainname(long domainname,
-+ long len);
-+void __sanitizer_syscall_post_impl_compat_09_ogetdomainname(long res,
-+ long domainname,
-+ long len);
-+void __sanitizer_syscall_pre_impl_compat_09_osetdomainname(long domainname,
-+ long len);
-+void __sanitizer_syscall_post_impl_compat_09_osetdomainname(long res,
-+ long domainname,
-+ long len);
-+void __sanitizer_syscall_pre_impl_compat_09_ouname(long name);
-+void __sanitizer_syscall_post_impl_compat_09_ouname(long res, long name);
-+void __sanitizer_syscall_pre_impl_sysarch(long op, long parms);
-+void __sanitizer_syscall_post_impl_sysarch(long res, long op, long parms);
++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 which, long a2,
-+ long a3, long a4, long a5);
-+void __sanitizer_syscall_post_impl_compat_10_osemsys(long res, long which,
-+ long a2, long a3, long a4,
-+ long a5);
++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 which, long a2,
-+ long a3, long a4, long a5,
-+ long a6);
-+void __sanitizer_syscall_post_impl_compat_10_omsgsys(long res, long which,
-+ long a2, long a3, long a4,
-+ long a5, long a6);
++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 which, long a2,
-+ long a3, long a4);
-+void __sanitizer_syscall_post_impl_compat_10_oshmsys(long res, long which,
-+ long a2, long a3, long a4);
++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 fd, long buf, long nbyte, long PAD,
-+ long offset);
-+void __sanitizer_syscall_post_impl_pread(long res, long fd, long buf,
-+ long nbyte, long PAD, long offset);
-+void __sanitizer_syscall_pre_impl_pwrite(long fd, long buf, long nbyte,
-+ long PAD, long offset);
-+void __sanitizer_syscall_post_impl_pwrite(long res, long fd, long buf,
-+ long nbyte, long PAD, long offset);
-+void __sanitizer_syscall_pre_impl_compat_30_ntp_gettime(long ntvp);
-+void __sanitizer_syscall_post_impl_compat_30_ntp_gettime(long res, long ntvp);
++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 tp);
-+void __sanitizer_syscall_post_impl_ntp_adjtime(long res, long tp);
++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
@@ -2937,98 +3400,135 @@ $NetBSD$
+/* syscall 178 has been skipped */
+/* syscall 179 has been skipped */
+/* syscall 180 has been skipped */
-+void __sanitizer_syscall_pre_impl_setgid(long gid);
-+void __sanitizer_syscall_post_impl_setgid(long res, long gid);
-+void __sanitizer_syscall_pre_impl_setegid(long egid);
-+void __sanitizer_syscall_post_impl_setegid(long res, long egid);
-+void __sanitizer_syscall_pre_impl_seteuid(long euid);
-+void __sanitizer_syscall_post_impl_seteuid(long res, long euid);
-+void __sanitizer_syscall_pre_impl_lfs_bmapv(long fsidp, long blkiov,
-+ long blkcnt);
-+void __sanitizer_syscall_post_impl_lfs_bmapv(long res, long fsidp, long blkiov,
-+ long blkcnt);
-+void __sanitizer_syscall_pre_impl_lfs_markv(long fsidp, long blkiov,
-+ long blkcnt);
-+void __sanitizer_syscall_post_impl_lfs_markv(long res, long fsidp, long blkiov,
-+ long blkcnt);
-+void __sanitizer_syscall_pre_impl_lfs_segclean(long fsidp, long segment);
-+void __sanitizer_syscall_post_impl_lfs_segclean(long res, long fsidp,
-+ long segment);
-+void __sanitizer_syscall_pre_impl_compat_50_lfs_segwait(long fsidp, long tv);
-+void __sanitizer_syscall_post_impl_compat_50_lfs_segwait(long res, long fsidp,
-+ long tv);
-+void __sanitizer_syscall_pre_impl_compat_12_stat12(long path, long ub);
-+void __sanitizer_syscall_post_impl_compat_12_stat12(long res, long path,
-+ long ub);
-+void __sanitizer_syscall_pre_impl_compat_12_fstat12(long fd, long sb);
-+void __sanitizer_syscall_post_impl_compat_12_fstat12(long res, long fd,
-+ long sb);
-+void __sanitizer_syscall_pre_impl_compat_12_lstat12(long path, long ub);
-+void __sanitizer_syscall_post_impl_compat_12_lstat12(long res, long path,
-+ long ub);
-+void __sanitizer_syscall_pre_impl_pathconf(long path, long name);
-+void __sanitizer_syscall_post_impl_pathconf(long res, long path, long name);
-+void __sanitizer_syscall_pre_impl_fpathconf(long fd, long name);
-+void __sanitizer_syscall_post_impl_fpathconf(long res, long fd, long name);
++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 which, long rlp);
-+void __sanitizer_syscall_post_impl_getrlimit(long res, long which, long rlp);
-+void __sanitizer_syscall_pre_impl_setrlimit(long which, long rlp);
-+void __sanitizer_syscall_post_impl_setrlimit(long res, long which, long rlp);
-+void __sanitizer_syscall_pre_impl_compat_12_getdirentries(long fd, long buf,
-+ long count,
-+ long basep);
-+void __sanitizer_syscall_post_impl_compat_12_getdirentries(long res, long fd,
-+ long buf, long count,
-+ long basep);
-+void __sanitizer_syscall_pre_impl_mmap(long addr, long len, long prot,
-+ long flags, long fd, long PAD, long pos);
-+void __sanitizer_syscall_post_impl_mmap(long res, long addr, long len,
-+ long prot, long flags, long fd,
-+ long PAD, long pos);
-+void __sanitizer_syscall_pre_impl___syscall(long code, long arg0, long arg1,
-+ long arg2, long arg3, long arg4,
-+ long arg5, long arg6, long arg7);
-+void __sanitizer_syscall_post_impl___syscall(long res, long code, long arg0,
-+ long arg1, long arg2, long arg3,
-+ long arg4, long arg5, long arg6,
-+ long arg7);
-+void __sanitizer_syscall_pre_impl_lseek(long fd, long PAD, long offset,
-+ long whence);
-+void __sanitizer_syscall_post_impl_lseek(long res, long fd, long PAD,
-+ long offset, long whence);
-+void __sanitizer_syscall_pre_impl_truncate(long path, long PAD, long length);
-+void __sanitizer_syscall_post_impl_truncate(long res, long path, long PAD,
-+ long length);
-+void __sanitizer_syscall_pre_impl_ftruncate(long fd, long PAD, long length);
-+void __sanitizer_syscall_post_impl_ftruncate(long res, long fd, long PAD,
-+ long length);
-+void __sanitizer_syscall_pre_impl___sysctl(long name, long namelen, long oldv,
-+ long oldlenp, long newv,
-+ long newlen);
-+void __sanitizer_syscall_post_impl___sysctl(long res, long name, long namelen,
-+ long oldv, long oldlenp, long newv,
-+ long newlen);
-+void __sanitizer_syscall_pre_impl_mlock(long addr, long len);
-+void __sanitizer_syscall_post_impl_mlock(long res, long addr, long len);
-+void __sanitizer_syscall_pre_impl_munlock(long addr, long len);
-+void __sanitizer_syscall_post_impl_munlock(long res, long addr, long len);
-+void __sanitizer_syscall_pre_impl_undelete(long path);
-+void __sanitizer_syscall_post_impl_undelete(long res, long path);
-+void __sanitizer_syscall_pre_impl_compat_50_futimes(long fd, long tptr);
-+void __sanitizer_syscall_post_impl_compat_50_futimes(long res, long fd,
-+ long tptr);
-+void __sanitizer_syscall_pre_impl_getpgid(long pid);
-+void __sanitizer_syscall_post_impl_getpgid(long res, long pid);
-+void __sanitizer_syscall_pre_impl_reboot(long opt, long bootstr);
-+void __sanitizer_syscall_post_impl_reboot(long res, long opt, long bootstr);
-+void __sanitizer_syscall_pre_impl_poll(long fds, long nfds, long timeout);
-+void __sanitizer_syscall_post_impl_poll(long res, long fds, long nfds,
-+ long timeout);
-+void __sanitizer_syscall_pre_impl_afssys(long id, long a1, long a2, long a3,
-+ long a4, long a5, long a6);
-+void __sanitizer_syscall_post_impl_afssys(long res, long id, long a1, long a2,
-+ long a3, long a4, long a5, long a6);
++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 */
@@ -3038,901 +3538,1193 @@ $NetBSD$
+/* syscall 217 has been skipped */
+/* syscall 218 has been skipped */
+/* syscall 219 has been skipped */
-+void __sanitizer_syscall_pre_impl_compat_14___semctl(long semid, long semnum,
-+ long cmd, long arg);
-+void __sanitizer_syscall_post_impl_compat_14___semctl(long res, long semid,
-+ long semnum, long cmd,
-+ long arg);
-+void __sanitizer_syscall_pre_impl_semget(long key, long nsems, long semflg);
-+void __sanitizer_syscall_post_impl_semget(long res, long key, long nsems,
-+ long semflg);
-+void __sanitizer_syscall_pre_impl_semop(long semid, long sops, long nsops);
-+void __sanitizer_syscall_post_impl_semop(long res, long semid, long sops,
-+ long nsops);
-+void __sanitizer_syscall_pre_impl_semconfig(long flag);
-+void __sanitizer_syscall_post_impl_semconfig(long res, long flag);
-+void __sanitizer_syscall_pre_impl_compat_14_msgctl(long msqid, long cmd,
-+ long buf);
-+void __sanitizer_syscall_post_impl_compat_14_msgctl(long res, long msqid,
-+ long cmd, long buf);
-+void __sanitizer_syscall_pre_impl_msgget(long key, long msgflg);
-+void __sanitizer_syscall_post_impl_msgget(long res, long key, long msgflg);
-+void __sanitizer_syscall_pre_impl_msgsnd(long msqid, long msgp, long msgsz,
-+ long msgflg);
-+void __sanitizer_syscall_post_impl_msgsnd(long res, long msqid, long msgp,
-+ long msgsz, long msgflg);
-+void __sanitizer_syscall_pre_impl_msgrcv(long msqid, long msgp, long msgsz,
-+ long msgtyp, long msgflg);
-+void __sanitizer_syscall_post_impl_msgrcv(long res, long msqid, long msgp,
-+ long msgsz, long msgtyp, long msgflg);
-+void __sanitizer_syscall_pre_impl_shmat(long shmid, long shmaddr, long shmflg);
-+void __sanitizer_syscall_post_impl_shmat(long res, long shmid, long shmaddr,
-+ long shmflg);
-+void __sanitizer_syscall_pre_impl_compat_14_shmctl(long shmid, long cmd,
-+ long buf);
-+void __sanitizer_syscall_post_impl_compat_14_shmctl(long res, long shmid,
-+ long cmd, long buf);
-+void __sanitizer_syscall_pre_impl_shmdt(long shmaddr);
-+void __sanitizer_syscall_post_impl_shmdt(long res, long shmaddr);
-+void __sanitizer_syscall_pre_impl_shmget(long key, long size, long shmflg);
-+void __sanitizer_syscall_post_impl_shmget(long res, long key, long size,
-+ long shmflg);
-+void __sanitizer_syscall_pre_impl_compat_50_clock_gettime(long clock_id,
-+ long tp);
-+void __sanitizer_syscall_post_impl_compat_50_clock_gettime(long res,
-+ long clock_id,
-+ long tp);
-+void __sanitizer_syscall_pre_impl_compat_50_clock_settime(long clock_id,
-+ long tp);
-+void __sanitizer_syscall_post_impl_compat_50_clock_settime(long res,
-+ long clock_id,
-+ long tp);
-+void __sanitizer_syscall_pre_impl_compat_50_clock_getres(long clock_id,
-+ long tp);
-+void __sanitizer_syscall_post_impl_compat_50_clock_getres(long res,
-+ long clock_id,
-+ long tp);
-+void __sanitizer_syscall_pre_impl_timer_create(long clock_id, long evp,
-+ long timerid);
-+void __sanitizer_syscall_post_impl_timer_create(long res, long clock_id,
-+ long evp, long timerid);
-+void __sanitizer_syscall_pre_impl_timer_delete(long timerid);
-+void __sanitizer_syscall_post_impl_timer_delete(long res, long timerid);
-+void __sanitizer_syscall_pre_impl_compat_50_timer_settime(long timerid,
-+ long flags,
-+ long value,
-+ long ovalue);
-+void __sanitizer_syscall_post_impl_compat_50_timer_settime(
-+ long res, long timerid, long flags, long value, long ovalue);
-+void __sanitizer_syscall_pre_impl_compat_50_timer_gettime(long timerid,
-+ long value);
-+void __sanitizer_syscall_post_impl_compat_50_timer_gettime(long res,
-+ long timerid,
-+ long value);
-+void __sanitizer_syscall_pre_impl_timer_getoverrun(long timerid);
-+void __sanitizer_syscall_post_impl_timer_getoverrun(long res, long timerid);
-+void __sanitizer_syscall_pre_impl_compat_50_nanosleep(long rqtp, long rmtp);
-+void __sanitizer_syscall_post_impl_compat_50_nanosleep(long res, long rqtp,
-+ long rmtp);
-+void __sanitizer_syscall_pre_impl_fdatasync(long fd);
-+void __sanitizer_syscall_post_impl_fdatasync(long res, long fd);
-+void __sanitizer_syscall_pre_impl_mlockall(long flags);
-+void __sanitizer_syscall_post_impl_mlockall(long res, long flags);
++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 res);
-+void __sanitizer_syscall_pre_impl_compat_50___sigtimedwait(long set, long info,
-+ long timeout);
-+void __sanitizer_syscall_post_impl_compat_50___sigtimedwait(long res, long set,
-+ long info,
-+ long timeout);
-+void __sanitizer_syscall_pre_impl_sigqueueinfo(long pid, long info);
-+void __sanitizer_syscall_post_impl_sigqueueinfo(long res, long pid, long info);
-+void __sanitizer_syscall_pre_impl_modctl(long cmd, long arg);
-+void __sanitizer_syscall_post_impl_modctl(long res, long cmd, long arg);
-+void __sanitizer_syscall_pre_impl__ksem_init(long value, long idp);
-+void __sanitizer_syscall_post_impl__ksem_init(long res, long value, long idp);
-+void __sanitizer_syscall_pre_impl__ksem_open(long name, long oflag, long mode,
-+ long value, long idp);
-+void __sanitizer_syscall_post_impl__ksem_open(long res, long name, long oflag,
-+ long mode, long value, long idp);
-+void __sanitizer_syscall_pre_impl__ksem_unlink(long name);
-+void __sanitizer_syscall_post_impl__ksem_unlink(long res, long name);
-+void __sanitizer_syscall_pre_impl__ksem_close(long id);
-+void __sanitizer_syscall_post_impl__ksem_close(long res, long id);
-+void __sanitizer_syscall_pre_impl__ksem_post(long id);
-+void __sanitizer_syscall_post_impl__ksem_post(long res, long id);
-+void __sanitizer_syscall_pre_impl__ksem_wait(long id);
-+void __sanitizer_syscall_post_impl__ksem_wait(long res, long id);
-+void __sanitizer_syscall_pre_impl__ksem_trywait(long id);
-+void __sanitizer_syscall_post_impl__ksem_trywait(long res, long id);
-+void __sanitizer_syscall_pre_impl__ksem_getvalue(long id, long value);
-+void __sanitizer_syscall_post_impl__ksem_getvalue(long res, long id,
-+ long value);
-+void __sanitizer_syscall_pre_impl__ksem_destroy(long id);
-+void __sanitizer_syscall_post_impl__ksem_destroy(long res, long id);
-+void __sanitizer_syscall_pre_impl__ksem_timedwait(long id, long abstime);
-+void __sanitizer_syscall_post_impl__ksem_timedwait(long res, long id,
-+ long abstime);
-+void __sanitizer_syscall_pre_impl_mq_open(long name, long oflag, long mode,
-+ long attr);
-+void __sanitizer_syscall_post_impl_mq_open(long res, long name, long oflag,
-+ long mode, long attr);
-+void __sanitizer_syscall_pre_impl_mq_close(long mqdes);
-+void __sanitizer_syscall_post_impl_mq_close(long res, long mqdes);
-+void __sanitizer_syscall_pre_impl_mq_unlink(long name);
-+void __sanitizer_syscall_post_impl_mq_unlink(long res, long name);
-+void __sanitizer_syscall_pre_impl_mq_getattr(long mqdes, long mqstat);
-+void __sanitizer_syscall_post_impl_mq_getattr(long res, long mqdes,
-+ long mqstat);
-+void __sanitizer_syscall_pre_impl_mq_setattr(long mqdes, long mqstat,
-+ long omqstat);
-+void __sanitizer_syscall_post_impl_mq_setattr(long res, long mqdes, long mqstat,
-+ long omqstat);
-+void __sanitizer_syscall_pre_impl_mq_notify(long mqdes, long notification);
-+void __sanitizer_syscall_post_impl_mq_notify(long res, long mqdes,
-+ long notification);
-+void __sanitizer_syscall_pre_impl_mq_send(long mqdes, long msg_ptr,
-+ long msg_len, long msg_prio);
-+void __sanitizer_syscall_post_impl_mq_send(long res, long mqdes, long msg_ptr,
-+ long msg_len, long msg_prio);
-+void __sanitizer_syscall_pre_impl_mq_receive(long mqdes, long msg_ptr,
-+ long msg_len, long msg_prio);
-+void __sanitizer_syscall_post_impl_mq_receive(long res, long mqdes,
-+ long msg_ptr, long msg_len,
-+ long msg_prio);
-+void __sanitizer_syscall_pre_impl_compat_50_mq_timedsend(
-+ long mqdes, long msg_ptr, long msg_len, long msg_prio, long abs_timeout);
-+void __sanitizer_syscall_post_impl_compat_50_mq_timedsend(long res, long mqdes,
-+ long msg_ptr,
-+ long msg_len,
-+ long msg_prio,
-+ long abs_timeout);
++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 mqdes, long msg_ptr, long msg_len, long msg_prio, long abs_timeout);
++ 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 res, long mqdes, long msg_ptr, long msg_len, long msg_prio,
-+ long abs_timeout);
++ 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 from, long to);
-+void __sanitizer_syscall_post_impl___posix_rename(long res, long from, long to);
-+void __sanitizer_syscall_pre_impl_swapctl(long cmd, long arg, long misc);
-+void __sanitizer_syscall_post_impl_swapctl(long res, long cmd, long arg,
-+ long misc);
-+void __sanitizer_syscall_pre_impl_compat_30_getdents(long fd, long buf,
-+ long count);
-+void __sanitizer_syscall_post_impl_compat_30_getdents(long res, long fd,
-+ long buf, long count);
-+void __sanitizer_syscall_pre_impl_minherit(long addr, long len, long inherit);
-+void __sanitizer_syscall_post_impl_minherit(long res, long addr, long len,
-+ long inherit);
-+void __sanitizer_syscall_pre_impl_lchmod(long path, long mode);
-+void __sanitizer_syscall_post_impl_lchmod(long res, long path, long mode);
-+void __sanitizer_syscall_pre_impl_lchown(long path, long uid, long gid);
-+void __sanitizer_syscall_post_impl_lchown(long res, long path, long uid,
-+ long gid);
-+void __sanitizer_syscall_pre_impl_compat_50_lutimes(long path, long tptr);
-+void __sanitizer_syscall_post_impl_compat_50_lutimes(long res, long path,
-+ long tptr);
-+void __sanitizer_syscall_pre_impl___msync13(long addr, long len, long flags);
-+void __sanitizer_syscall_post_impl___msync13(long res, long addr, long len,
-+ long flags);
-+void __sanitizer_syscall_pre_impl_compat_30___stat13(long path, long ub);
-+void __sanitizer_syscall_post_impl_compat_30___stat13(long res, long path,
-+ long ub);
-+void __sanitizer_syscall_pre_impl_compat_30___fstat13(long fd, long sb);
-+void __sanitizer_syscall_post_impl_compat_30___fstat13(long res, long fd,
-+ long sb);
-+void __sanitizer_syscall_pre_impl_compat_30___lstat13(long path, long ub);
-+void __sanitizer_syscall_post_impl_compat_30___lstat13(long res, long path,
-+ long ub);
-+void __sanitizer_syscall_pre_impl___sigaltstack14(long nss, long oss);
-+void __sanitizer_syscall_post_impl___sigaltstack14(long res, long nss,
-+ long oss);
++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 res);
-+void __sanitizer_syscall_pre_impl___posix_chown(long path, long uid, long gid);
-+void __sanitizer_syscall_post_impl___posix_chown(long res, long path, long uid,
-+ long gid);
-+void __sanitizer_syscall_pre_impl___posix_fchown(long fd, long uid, long gid);
-+void __sanitizer_syscall_post_impl___posix_fchown(long res, long fd, long uid,
-+ long gid);
-+void __sanitizer_syscall_pre_impl___posix_lchown(long path, long uid, long gid);
-+void __sanitizer_syscall_post_impl___posix_lchown(long res, long path, long uid,
-+ long gid);
-+void __sanitizer_syscall_pre_impl_getsid(long pid);
-+void __sanitizer_syscall_post_impl_getsid(long res, long pid);
-+void __sanitizer_syscall_pre_impl___clone(long flags, long stack);
-+void __sanitizer_syscall_post_impl___clone(long res, long flags, long stack);
-+void __sanitizer_syscall_pre_impl_fktrace(long fd, long ops, long facs,
-+ long pid);
-+void __sanitizer_syscall_post_impl_fktrace(long res, long fd, long ops,
-+ long facs, long pid);
-+void __sanitizer_syscall_pre_impl_preadv(long fd, long iovp, long iovcnt,
-+ long PAD, long offset);
-+void __sanitizer_syscall_post_impl_preadv(long res, long fd, long iovp,
-+ long iovcnt, long PAD, long offset);
-+void __sanitizer_syscall_pre_impl_pwritev(long fd, long iovp, long iovcnt,
-+ long PAD, long offset);
-+void __sanitizer_syscall_post_impl_pwritev(long res, long fd, long iovp,
-+ long iovcnt, long PAD, long offset);
-+void __sanitizer_syscall_pre_impl_compat_16___sigaction14(long signum, long nsa,
-+ long osa);
-+void __sanitizer_syscall_post_impl_compat_16___sigaction14(long res,
-+ long signum,
-+ long nsa, long osa);
-+void __sanitizer_syscall_pre_impl___sigpending14(long set);
-+void __sanitizer_syscall_post_impl___sigpending14(long res, long set);
-+void __sanitizer_syscall_pre_impl___sigprocmask14(long how, long set,
-+ long oset);
-+void __sanitizer_syscall_post_impl___sigprocmask14(long res, long how, long set,
-+ long oset);
-+void __sanitizer_syscall_pre_impl___sigsuspend14(long set);
-+void __sanitizer_syscall_post_impl___sigsuspend14(long res, long set);
-+void __sanitizer_syscall_pre_impl_compat_16___sigreturn14(long sigcntxp);
-+void __sanitizer_syscall_post_impl_compat_16___sigreturn14(long res,
-+ long sigcntxp);
-+void __sanitizer_syscall_pre_impl___getcwd(long bufp, long length);
-+void __sanitizer_syscall_post_impl___getcwd(long res, long bufp, long length);
-+void __sanitizer_syscall_pre_impl_fchroot(long fd);
-+void __sanitizer_syscall_post_impl_fchroot(long res, long fd);
-+void __sanitizer_syscall_pre_impl_compat_30_fhopen(long fhp, long flags);
-+void __sanitizer_syscall_post_impl_compat_30_fhopen(long res, long fhp,
-+ long flags);
-+void __sanitizer_syscall_pre_impl_compat_30_fhstat(long fhp, long sb);
-+void __sanitizer_syscall_post_impl_compat_30_fhstat(long res, long fhp,
-+ long sb);
-+void __sanitizer_syscall_pre_impl_compat_20_fhstatfs(long fhp, long buf);
-+void __sanitizer_syscall_post_impl_compat_20_fhstatfs(long res, long fhp,
-+ long buf);
-+void __sanitizer_syscall_pre_impl_compat_50_____semctl13(long semid,
-+ long semnum, long cmd,
-+ long arg);
-+void __sanitizer_syscall_post_impl_compat_50_____semctl13(long res, long semid,
-+ long semnum, long cmd,
-+ long arg);
-+void __sanitizer_syscall_pre_impl_compat_50___msgctl13(long msqid, long cmd,
-+ long buf);
-+void __sanitizer_syscall_post_impl_compat_50___msgctl13(long res, long msqid,
-+ long cmd, long buf);
-+void __sanitizer_syscall_pre_impl_compat_50___shmctl13(long shmid, long cmd,
-+ long buf);
-+void __sanitizer_syscall_post_impl_compat_50___shmctl13(long res, long shmid,
-+ long cmd, long buf);
-+void __sanitizer_syscall_pre_impl_lchflags(long path, long flags);
-+void __sanitizer_syscall_post_impl_lchflags(long res, long path, long flags);
++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 res);
-+void __sanitizer_syscall_pre_impl_utrace(long label, long addr, long len);
-+void __sanitizer_syscall_post_impl_utrace(long res, long label, long addr,
-+ long len);
-+void __sanitizer_syscall_pre_impl_getcontext(long ucp);
-+void __sanitizer_syscall_post_impl_getcontext(long res, long ucp);
-+void __sanitizer_syscall_pre_impl_setcontext(long ucp);
-+void __sanitizer_syscall_post_impl_setcontext(long res, long ucp);
-+void __sanitizer_syscall_pre_impl__lwp_create(long ucp, long flags,
-+ long new_lwp);
-+void __sanitizer_syscall_post_impl__lwp_create(long res, long ucp, long flags,
-+ long new_lwp);
++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 res);
++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 res);
-+void __sanitizer_syscall_pre_impl__lwp_wait(long wait_for, long departed);
-+void __sanitizer_syscall_post_impl__lwp_wait(long res, long wait_for,
-+ long departed);
-+void __sanitizer_syscall_pre_impl__lwp_suspend(long target);
-+void __sanitizer_syscall_post_impl__lwp_suspend(long res, long target);
-+void __sanitizer_syscall_pre_impl__lwp_continue(long target);
-+void __sanitizer_syscall_post_impl__lwp_continue(long res, long target);
-+void __sanitizer_syscall_pre_impl__lwp_wakeup(long target);
-+void __sanitizer_syscall_post_impl__lwp_wakeup(long res, long target);
++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 res);
-+void __sanitizer_syscall_pre_impl__lwp_setprivate(long ptr);
-+void __sanitizer_syscall_post_impl__lwp_setprivate(long res, long ptr);
-+void __sanitizer_syscall_pre_impl__lwp_kill(long target, long signo);
-+void __sanitizer_syscall_post_impl__lwp_kill(long res, long target, long signo);
-+void __sanitizer_syscall_pre_impl__lwp_detach(long target);
-+void __sanitizer_syscall_post_impl__lwp_detach(long res, long target);
-+void __sanitizer_syscall_pre_impl_compat_50__lwp_park(long ts, long unpark,
-+ long hint,
-+ long unparkhint);
-+void __sanitizer_syscall_post_impl_compat_50__lwp_park(long res, long ts,
-+ long unpark, long hint,
-+ long unparkhint);
-+void __sanitizer_syscall_pre_impl__lwp_unpark(long target, long hint);
-+void __sanitizer_syscall_post_impl__lwp_unpark(long res, long target,
-+ long hint);
-+void __sanitizer_syscall_pre_impl__lwp_unpark_all(long targets, long ntargets,
-+ long hint);
-+void __sanitizer_syscall_post_impl__lwp_unpark_all(long res, long targets,
-+ long ntargets, long hint);
-+void __sanitizer_syscall_pre_impl__lwp_setname(long target, long name);
-+void __sanitizer_syscall_post_impl__lwp_setname(long res, long target,
-+ long name);
-+void __sanitizer_syscall_pre_impl__lwp_getname(long target, long name,
-+ long len);
-+void __sanitizer_syscall_post_impl__lwp_getname(long res, long target,
-+ long name, long len);
-+void __sanitizer_syscall_pre_impl__lwp_ctl(long features, long address);
-+void __sanitizer_syscall_post_impl__lwp_ctl(long res, long features,
-+ long address);
++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 newv, long oldv,
-+ long flags,
-+ long stackinfo_offset);
-+void __sanitizer_syscall_post_impl_compat_60_sa_register(long res, long newv,
-+ long oldv, long flags,
-+ long stackinfo_offset);
-+void __sanitizer_syscall_pre_impl_compat_60_sa_stacks(long num, long stacks);
-+void __sanitizer_syscall_post_impl_compat_60_sa_stacks(long res, long num,
-+ long stacks);
++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 res);
-+void __sanitizer_syscall_pre_impl_compat_60_sa_setconcurrency(long concurrency);
++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 res, long concurrency);
++ 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 res);
-+void __sanitizer_syscall_pre_impl_compat_60_sa_preempt(long sa_id);
-+void __sanitizer_syscall_post_impl_compat_60_sa_preempt(long res, long sa_id);
++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 signum, long nsa,
-+ long osa, long tramp,
-+ long vers);
-+void __sanitizer_syscall_post_impl___sigaction_sigtramp(long res, long signum,
-+ long nsa, long osa,
-+ long tramp, long vers);
-+void __sanitizer_syscall_pre_impl_pmc_get_info(long ctr, long op, long args);
-+void __sanitizer_syscall_post_impl_pmc_get_info(long res, long ctr, long op,
-+ long args);
-+void __sanitizer_syscall_pre_impl_pmc_control(long ctr, long op, long args);
-+void __sanitizer_syscall_post_impl_pmc_control(long res, long ctr, long op,
-+ long args);
-+void __sanitizer_syscall_pre_impl_rasctl(long addr, long len, long op);
-+void __sanitizer_syscall_post_impl_rasctl(long res, long addr, long len,
-+ long op);
++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 res);
-+void __sanitizer_syscall_pre_impl_compat_50_kevent(long fd, long changelist,
-+ long nchanges,
-+ long eventlist, long nevents,
-+ long timeout);
-+void __sanitizer_syscall_post_impl_compat_50_kevent(long res, long fd,
-+ long changelist,
-+ long nchanges,
-+ long eventlist,
-+ long nevents, long timeout);
-+void __sanitizer_syscall_pre_impl__sched_setparam(long pid, long lid,
-+ long policy, long params);
-+void __sanitizer_syscall_post_impl__sched_setparam(long res, long pid, long lid,
-+ long policy, long params);
-+void __sanitizer_syscall_pre_impl__sched_getparam(long pid, long lid,
-+ long policy, long params);
-+void __sanitizer_syscall_post_impl__sched_getparam(long res, long pid, long lid,
-+ long policy, long params);
-+void __sanitizer_syscall_pre_impl__sched_setaffinity(long pid, long lid,
-+ long size, long cpuset);
-+void __sanitizer_syscall_post_impl__sched_setaffinity(long res, long pid,
-+ long lid, long size,
-+ long cpuset);
-+void __sanitizer_syscall_pre_impl__sched_getaffinity(long pid, long lid,
-+ long size, long cpuset);
-+void __sanitizer_syscall_post_impl__sched_getaffinity(long res, long pid,
-+ long lid, long size,
-+ long cpuset);
++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 res);
-+void __sanitizer_syscall_pre_impl__sched_protect(long priority);
-+void __sanitizer_syscall_post_impl__sched_protect(long res, long priority);
++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 fd, long flags, long start,
-+ long length);
-+void __sanitizer_syscall_post_impl_fsync_range(long res, long fd, long flags,
-+ long start, long length);
-+void __sanitizer_syscall_pre_impl_uuidgen(long store, long count);
-+void __sanitizer_syscall_post_impl_uuidgen(long res, long store, long count);
-+void __sanitizer_syscall_pre_impl_getvfsstat(long buf, long bufsize,
-+ long flags);
-+void __sanitizer_syscall_post_impl_getvfsstat(long res, long buf, long bufsize,
-+ long flags);
-+void __sanitizer_syscall_pre_impl_statvfs1(long path, long buf, long flags);
-+void __sanitizer_syscall_post_impl_statvfs1(long res, long path, long buf,
-+ long flags);
-+void __sanitizer_syscall_pre_impl_fstatvfs1(long fd, long buf, long flags);
-+void __sanitizer_syscall_post_impl_fstatvfs1(long res, long fd, long buf,
-+ long flags);
-+void __sanitizer_syscall_pre_impl_compat_30_fhstatvfs1(long fhp, long buf,
-+ long flags);
-+void __sanitizer_syscall_post_impl_compat_30_fhstatvfs1(long res, long fhp,
-+ long buf, long flags);
-+void __sanitizer_syscall_pre_impl_extattrctl(long path, long cmd, long filename,
-+ long attrnamespace, long attrname);
-+void __sanitizer_syscall_post_impl_extattrctl(long res, long path, long cmd,
-+ long filename, long attrnamespace,
-+ long attrname);
-+void __sanitizer_syscall_pre_impl_extattr_set_file(long path,
-+ long attrnamespace,
-+ long attrname, long data,
-+ long nbytes);
-+void __sanitizer_syscall_post_impl_extattr_set_file(long res, long path,
-+ long attrnamespace,
-+ long attrname, long data,
-+ long nbytes);
-+void __sanitizer_syscall_pre_impl_extattr_get_file(long path,
-+ long attrnamespace,
-+ long attrname, long data,
-+ long nbytes);
-+void __sanitizer_syscall_post_impl_extattr_get_file(long res, long path,
-+ long attrnamespace,
-+ long attrname, long data,
-+ long nbytes);
-+void __sanitizer_syscall_pre_impl_extattr_delete_file(long path,
-+ long attrnamespace,
-+ long attrname);
-+void __sanitizer_syscall_post_impl_extattr_delete_file(long res, long path,
-+ long attrnamespace,
-+ long attrname);
-+void __sanitizer_syscall_pre_impl_extattr_set_fd(long fd, long attrnamespace,
-+ long attrname, long data,
-+ long nbytes);
-+void __sanitizer_syscall_post_impl_extattr_set_fd(long res, long fd,
-+ long attrnamespace,
-+ long attrname, long data,
-+ long nbytes);
-+void __sanitizer_syscall_pre_impl_extattr_get_fd(long fd, long attrnamespace,
-+ long attrname, long data,
-+ long nbytes);
-+void __sanitizer_syscall_post_impl_extattr_get_fd(long res, long fd,
-+ long attrnamespace,
-+ long attrname, long data,
-+ long nbytes);
-+void __sanitizer_syscall_pre_impl_extattr_delete_fd(long fd, long attrnamespace,
-+ long attrname);
-+void __sanitizer_syscall_post_impl_extattr_delete_fd(long res, long fd,
-+ long attrnamespace,
-+ long attrname);
-+void __sanitizer_syscall_pre_impl_extattr_set_link(long path,
-+ long attrnamespace,
-+ long attrname, long data,
-+ long nbytes);
-+void __sanitizer_syscall_post_impl_extattr_set_link(long res, long path,
-+ long attrnamespace,
-+ long attrname, long data,
-+ long nbytes);
-+void __sanitizer_syscall_pre_impl_extattr_get_link(long path,
-+ long attrnamespace,
-+ long attrname, long data,
-+ long nbytes);
-+void __sanitizer_syscall_post_impl_extattr_get_link(long res, long path,
-+ long attrnamespace,
-+ long attrname, long data,
-+ long nbytes);
-+void __sanitizer_syscall_pre_impl_extattr_delete_link(long path,
-+ long attrnamespace,
-+ long attrname);
-+void __sanitizer_syscall_post_impl_extattr_delete_link(long res, long path,
-+ long attrnamespace,
-+ long attrname);
-+void __sanitizer_syscall_pre_impl_extattr_list_fd(long fd, long attrnamespace,
-+ long data, long nbytes);
-+void __sanitizer_syscall_post_impl_extattr_list_fd(long res, long fd,
-+ long attrnamespace,
-+ long data, long nbytes);
-+void __sanitizer_syscall_pre_impl_extattr_list_file(long path,
-+ long attrnamespace,
-+ long data, long nbytes);
-+void __sanitizer_syscall_post_impl_extattr_list_file(long res, long path,
-+ long attrnamespace,
-+ long data, long nbytes);
-+void __sanitizer_syscall_pre_impl_extattr_list_link(long path,
-+ long attrnamespace,
-+ long data, long nbytes);
-+void __sanitizer_syscall_post_impl_extattr_list_link(long res, long path,
-+ long attrnamespace,
-+ long data, long nbytes);
-+void __sanitizer_syscall_pre_impl_compat_50_pselect(long nd, long in, long ou,
-+ long ex, long ts,
-+ long mask);
-+void __sanitizer_syscall_post_impl_compat_50_pselect(long res, long nd, long in,
-+ long ou, long ex, long ts,
-+ long mask);
-+void __sanitizer_syscall_pre_impl_compat_50_pollts(long fds, long nfds, long ts,
-+ long mask);
-+void __sanitizer_syscall_post_impl_compat_50_pollts(long res, long fds,
-+ long nfds, long ts,
-+ long mask);
-+void __sanitizer_syscall_pre_impl_setxattr(long path, long name, long value,
-+ long size, long flags);
-+void __sanitizer_syscall_post_impl_setxattr(long res, long path, long name,
-+ long value, long size, long flags);
-+void __sanitizer_syscall_pre_impl_lsetxattr(long path, long name, long value,
-+ long size, long flags);
-+void __sanitizer_syscall_post_impl_lsetxattr(long res, long path, long name,
-+ long value, long size, long flags);
-+void __sanitizer_syscall_pre_impl_fsetxattr(long fd, long name, long value,
-+ long size, long flags);
-+void __sanitizer_syscall_post_impl_fsetxattr(long res, long fd, long name,
-+ long value, long size, long flags);
-+void __sanitizer_syscall_pre_impl_getxattr(long path, long name, long value,
-+ long size);
-+void __sanitizer_syscall_post_impl_getxattr(long res, long path, long name,
-+ long value, long size);
-+void __sanitizer_syscall_pre_impl_lgetxattr(long path, long name, long value,
-+ long size);
-+void __sanitizer_syscall_post_impl_lgetxattr(long res, long path, long name,
-+ long value, long size);
-+void __sanitizer_syscall_pre_impl_fgetxattr(long fd, long name, long value,
-+ long size);
-+void __sanitizer_syscall_post_impl_fgetxattr(long res, long fd, long name,
-+ long value, long size);
-+void __sanitizer_syscall_pre_impl_listxattr(long path, long list, long size);
-+void __sanitizer_syscall_post_impl_listxattr(long res, long path, long list,
-+ long size);
-+void __sanitizer_syscall_pre_impl_llistxattr(long path, long list, long size);
-+void __sanitizer_syscall_post_impl_llistxattr(long res, long path, long list,
-+ long size);
-+void __sanitizer_syscall_pre_impl_flistxattr(long fd, long list, long size);
-+void __sanitizer_syscall_post_impl_flistxattr(long res, long fd, long list,
-+ long size);
-+void __sanitizer_syscall_pre_impl_removexattr(long path, long name);
-+void __sanitizer_syscall_post_impl_removexattr(long res, long path, long name);
-+void __sanitizer_syscall_pre_impl_lremovexattr(long path, long name);
-+void __sanitizer_syscall_post_impl_lremovexattr(long res, long path, long name);
-+void __sanitizer_syscall_pre_impl_fremovexattr(long fd, long name);
-+void __sanitizer_syscall_post_impl_fremovexattr(long res, long fd, long name);
-+void __sanitizer_syscall_pre_impl_compat_50___stat30(long path, long ub);
-+void __sanitizer_syscall_post_impl_compat_50___stat30(long res, long path,
-+ long ub);
-+void __sanitizer_syscall_pre_impl_compat_50___fstat30(long fd, long sb);
-+void __sanitizer_syscall_post_impl_compat_50___fstat30(long res, long fd,
-+ long sb);
-+void __sanitizer_syscall_pre_impl_compat_50___lstat30(long path, long ub);
-+void __sanitizer_syscall_post_impl_compat_50___lstat30(long res, long path,
-+ long ub);
-+void __sanitizer_syscall_pre_impl___getdents30(long fd, long buf, long count);
-+void __sanitizer_syscall_post_impl___getdents30(long res, long fd, long buf,
-+ long count);
-+void __sanitizer_syscall_pre_impl_posix_fadvise(long);
-+void __sanitizer_syscall_post_impl_posix_fadvise(long res, long);
-+void __sanitizer_syscall_pre_impl_compat_30___fhstat30(long fhp, long sb);
-+void __sanitizer_syscall_post_impl_compat_30___fhstat30(long res, long fhp,
-+ long sb);
-+void __sanitizer_syscall_pre_impl_compat_50___ntp_gettime30(long ntvp);
-+void __sanitizer_syscall_post_impl_compat_50___ntp_gettime30(long res,
-+ long ntvp);
-+void __sanitizer_syscall_pre_impl___socket30(long domain, long type,
-+ long protocol);
-+void __sanitizer_syscall_post_impl___socket30(long res, long domain, long type,
-+ long protocol);
-+void __sanitizer_syscall_pre_impl___getfh30(long fname, long fhp, long fh_size);
-+void __sanitizer_syscall_post_impl___getfh30(long res, long fname, long fhp,
-+ long fh_size);
-+void __sanitizer_syscall_pre_impl___fhopen40(long fhp, long fh_size,
-+ long flags);
-+void __sanitizer_syscall_post_impl___fhopen40(long res, long fhp, long fh_size,
-+ long flags);
-+void __sanitizer_syscall_pre_impl___fhstatvfs140(long fhp, long fh_size,
-+ long buf, long flags);
-+void __sanitizer_syscall_post_impl___fhstatvfs140(long res, long fhp,
-+ long fh_size, long buf,
-+ long flags);
-+void __sanitizer_syscall_pre_impl_compat_50___fhstat40(long fhp, long fh_size,
-+ long sb);
-+void __sanitizer_syscall_post_impl_compat_50___fhstat40(long res, long fhp,
-+ long fh_size, long sb);
-+void __sanitizer_syscall_pre_impl_aio_cancel(long fildes, long aiocbp);
-+void __sanitizer_syscall_post_impl_aio_cancel(long res, long fildes,
-+ long aiocbp);
-+void __sanitizer_syscall_pre_impl_aio_error(long aiocbp);
-+void __sanitizer_syscall_post_impl_aio_error(long res, long aiocbp);
-+void __sanitizer_syscall_pre_impl_aio_fsync(long op, long aiocbp);
-+void __sanitizer_syscall_post_impl_aio_fsync(long res, long op, long aiocbp);
-+void __sanitizer_syscall_pre_impl_aio_read(long aiocbp);
-+void __sanitizer_syscall_post_impl_aio_read(long res, long aiocbp);
-+void __sanitizer_syscall_pre_impl_aio_return(long aiocbp);
-+void __sanitizer_syscall_post_impl_aio_return(long res, long aiocbp);
-+void __sanitizer_syscall_pre_impl_compat_50_aio_suspend(long list, long nent,
-+ long timeout);
-+void __sanitizer_syscall_post_impl_compat_50_aio_suspend(long res, long list,
-+ long nent,
-+ long timeout);
-+void __sanitizer_syscall_pre_impl_aio_write(long aiocbp);
-+void __sanitizer_syscall_post_impl_aio_write(long res, long aiocbp);
-+void __sanitizer_syscall_pre_impl_lio_listio(long mode, long list, long nent,
-+ long sig);
-+void __sanitizer_syscall_post_impl_lio_listio(long res, long mode, long list,
-+ long nent, long sig);
++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 type, long path, long flags,
-+ long data, long data_len);
-+void __sanitizer_syscall_post_impl___mount50(long res, long type, long path,
-+ long flags, long data,
-+ long data_len);
-+void __sanitizer_syscall_pre_impl_mremap(long old_address, long old_size,
-+ long new_address, long new_size,
-+ long flags);
-+void __sanitizer_syscall_post_impl_mremap(long res, long old_address,
-+ long old_size, long new_address,
-+ long new_size, long flags);
-+void __sanitizer_syscall_pre_impl_pset_create(long psid);
-+void __sanitizer_syscall_post_impl_pset_create(long res, long psid);
-+void __sanitizer_syscall_pre_impl_pset_destroy(long psid);
-+void __sanitizer_syscall_post_impl_pset_destroy(long res, long psid);
-+void __sanitizer_syscall_pre_impl_pset_assign(long psid, long cpuid,
-+ long opsid);
-+void __sanitizer_syscall_post_impl_pset_assign(long res, long psid, long cpuid,
-+ long opsid);
-+void __sanitizer_syscall_pre_impl__pset_bind(long idtype, long first_id,
-+ long second_id, long psid,
-+ long opsid);
-+void __sanitizer_syscall_post_impl__pset_bind(long res, long idtype,
-+ long first_id, long second_id,
-+ long psid, long opsid);
-+void __sanitizer_syscall_pre_impl___posix_fadvise50(long fd, long PAD,
-+ long offset, long len,
-+ long advice);
-+void __sanitizer_syscall_post_impl___posix_fadvise50(long res, long fd,
-+ long PAD, long offset,
-+ long len, long advice);
-+void __sanitizer_syscall_pre_impl___select50(long nd, long in, long ou, long ex,
-+ long tv);
-+void __sanitizer_syscall_post_impl___select50(long res, long nd, long in,
-+ long ou, long ex, long tv);
-+void __sanitizer_syscall_pre_impl___gettimeofday50(long tp, long tzp);
-+void __sanitizer_syscall_post_impl___gettimeofday50(long res, long tp,
-+ long tzp);
-+void __sanitizer_syscall_pre_impl___settimeofday50(long tv, long tzp);
-+void __sanitizer_syscall_post_impl___settimeofday50(long res, long tv,
-+ long tzp);
-+void __sanitizer_syscall_pre_impl___utimes50(long path, long tptr);
-+void __sanitizer_syscall_post_impl___utimes50(long res, long path, long tptr);
-+void __sanitizer_syscall_pre_impl___adjtime50(long delta, long olddelta);
-+void __sanitizer_syscall_post_impl___adjtime50(long res, long delta,
-+ long olddelta);
-+void __sanitizer_syscall_pre_impl___lfs_segwait50(long fsidp, long tv);
-+void __sanitizer_syscall_post_impl___lfs_segwait50(long res, long fsidp,
-+ long tv);
-+void __sanitizer_syscall_pre_impl___futimes50(long fd, long tptr);
-+void __sanitizer_syscall_post_impl___futimes50(long res, long fd, long tptr);
-+void __sanitizer_syscall_pre_impl___lutimes50(long path, long tptr);
-+void __sanitizer_syscall_post_impl___lutimes50(long res, long path, long tptr);
-+void __sanitizer_syscall_pre_impl___setitimer50(long which, long itv,
-+ long oitv);
-+void __sanitizer_syscall_post_impl___setitimer50(long res, long which, long itv,
-+ long oitv);
-+void __sanitizer_syscall_pre_impl___getitimer50(long which, long itv);
-+void __sanitizer_syscall_post_impl___getitimer50(long res, long which,
-+ long itv);
-+void __sanitizer_syscall_pre_impl___clock_gettime50(long clock_id, long tp);
-+void __sanitizer_syscall_post_impl___clock_gettime50(long res, long clock_id,
-+ long tp);
-+void __sanitizer_syscall_pre_impl___clock_settime50(long clock_id, long tp);
-+void __sanitizer_syscall_post_impl___clock_settime50(long res, long clock_id,
-+ long tp);
-+void __sanitizer_syscall_pre_impl___clock_getres50(long clock_id, long tp);
-+void __sanitizer_syscall_post_impl___clock_getres50(long res, long clock_id,
-+ long tp);
-+void __sanitizer_syscall_pre_impl___nanosleep50(long rqtp, long rmtp);
-+void __sanitizer_syscall_post_impl___nanosleep50(long res, long rqtp,
-+ long rmtp);
-+void __sanitizer_syscall_pre_impl_____sigtimedwait50(long set, long info,
-+ long timeout);
-+void __sanitizer_syscall_post_impl_____sigtimedwait50(long res, long set,
-+ long info, long timeout);
-+void __sanitizer_syscall_pre_impl___mq_timedsend50(long mqdes, long msg_ptr,
-+ long msg_len, long msg_prio,
-+ long abs_timeout);
-+void __sanitizer_syscall_post_impl___mq_timedsend50(long res, long mqdes,
-+ long msg_ptr, long msg_len,
-+ long msg_prio,
-+ long abs_timeout);
-+void __sanitizer_syscall_pre_impl___mq_timedreceive50(long mqdes, long msg_ptr,
-+ long msg_len,
-+ long msg_prio,
-+ long abs_timeout);
-+void __sanitizer_syscall_post_impl___mq_timedreceive50(long res, long mqdes,
-+ long msg_ptr,
-+ long msg_len,
-+ long msg_prio,
-+ long abs_timeout);
-+void __sanitizer_syscall_pre_impl_compat_60__lwp_park(long ts, long unpark,
-+ long hint,
-+ long unparkhint);
-+void __sanitizer_syscall_post_impl_compat_60__lwp_park(long res, long ts,
-+ long unpark, long hint,
-+ long unparkhint);
-+void __sanitizer_syscall_pre_impl___kevent50(long fd, long changelist,
-+ long nchanges, long eventlist,
-+ long nevents, long timeout);
-+void __sanitizer_syscall_post_impl___kevent50(long res, long fd,
-+ long changelist, long nchanges,
-+ long eventlist, long nevents,
-+ long timeout);
-+void __sanitizer_syscall_pre_impl___pselect50(long nd, long in, long ou,
-+ long ex, long ts, long mask);
-+void __sanitizer_syscall_post_impl___pselect50(long res, long nd, long in,
-+ long ou, long ex, long ts,
-+ long mask);
-+void __sanitizer_syscall_pre_impl___pollts50(long fds, long nfds, long ts,
-+ long mask);
-+void __sanitizer_syscall_post_impl___pollts50(long res, long fds, long nfds,
-+ long ts, long mask);
-+void __sanitizer_syscall_pre_impl___aio_suspend50(long list, long nent,
-+ long timeout);
-+void __sanitizer_syscall_post_impl___aio_suspend50(long res, long list,
-+ long nent, long timeout);
-+void __sanitizer_syscall_pre_impl___stat50(long path, long ub);
-+void __sanitizer_syscall_post_impl___stat50(long res, long path, long ub);
-+void __sanitizer_syscall_pre_impl___fstat50(long fd, long sb);
-+void __sanitizer_syscall_post_impl___fstat50(long res, long fd, long sb);
-+void __sanitizer_syscall_pre_impl___lstat50(long path, long ub);
-+void __sanitizer_syscall_post_impl___lstat50(long res, long path, long ub);
-+void __sanitizer_syscall_pre_impl_____semctl50(long semid, long semnum,
-+ long cmd, long arg);
-+void __sanitizer_syscall_post_impl_____semctl50(long res, long semid,
-+ long semnum, long cmd,
-+ long arg);
-+void __sanitizer_syscall_pre_impl___shmctl50(long shmid, long cmd, long buf);
-+void __sanitizer_syscall_post_impl___shmctl50(long res, long shmid, long cmd,
-+ long buf);
-+void __sanitizer_syscall_pre_impl___msgctl50(long msqid, long cmd, long buf);
-+void __sanitizer_syscall_post_impl___msgctl50(long res, long msqid, long cmd,
-+ long buf);
-+void __sanitizer_syscall_pre_impl___getrusage50(long who, long rusage);
-+void __sanitizer_syscall_post_impl___getrusage50(long res, long who,
-+ long rusage);
-+void __sanitizer_syscall_pre_impl___timer_settime50(long timerid, long flags,
-+ long value, long ovalue);
-+void __sanitizer_syscall_post_impl___timer_settime50(long res, long timerid,
-+ long flags, long value,
-+ long ovalue);
-+void __sanitizer_syscall_pre_impl___timer_gettime50(long timerid, long value);
-+void __sanitizer_syscall_post_impl___timer_gettime50(long res, long timerid,
-+ long value);
++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 ntvp);
-+void __sanitizer_syscall_post_impl___ntp_gettime50(long res, long ntvp);
++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 pid, long status, long options,
-+ long rusage);
-+void __sanitizer_syscall_post_impl___wait450(long res, long pid, long status,
-+ long options, long rusage);
-+void __sanitizer_syscall_pre_impl___mknod50(long path, long mode, long dev);
-+void __sanitizer_syscall_post_impl___mknod50(long res, long path, long mode,
-+ long dev);
-+void __sanitizer_syscall_pre_impl___fhstat50(long fhp, long fh_size, long sb);
-+void __sanitizer_syscall_post_impl___fhstat50(long res, long fhp, long fh_size,
-+ long sb);
++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 fildes, long flags);
-+void __sanitizer_syscall_post_impl_pipe2(long res, long fildes, long flags);
-+void __sanitizer_syscall_pre_impl_dup3(long from, long to, long flags);
-+void __sanitizer_syscall_post_impl_dup3(long res, long from, long to,
-+ long flags);
-+void __sanitizer_syscall_pre_impl_kqueue1(long flags);
-+void __sanitizer_syscall_post_impl_kqueue1(long res, long flags);
-+void __sanitizer_syscall_pre_impl_paccept(long s, long name, long anamelen,
-+ long mask, long flags);
-+void __sanitizer_syscall_post_impl_paccept(long res, long s, long name,
-+ long anamelen, long mask,
-+ long flags);
-+void __sanitizer_syscall_pre_impl_linkat(long fd1, long name1, long fd2,
-+ long name2, long flags);
-+void __sanitizer_syscall_post_impl_linkat(long res, long fd1, long name1,
-+ long fd2, long name2, long flags);
-+void __sanitizer_syscall_pre_impl_renameat(long fromfd, long from, long tofd,
-+ long to);
-+void __sanitizer_syscall_post_impl_renameat(long res, long fromfd, long from,
-+ long tofd, long to);
-+void __sanitizer_syscall_pre_impl_mkfifoat(long fd, long path, long mode);
-+void __sanitizer_syscall_post_impl_mkfifoat(long res, long fd, long path,
-+ long mode);
-+void __sanitizer_syscall_pre_impl_mknodat(long fd, long path, long mode,
-+ long PAD, long dev);
-+void __sanitizer_syscall_post_impl_mknodat(long res, long fd, long path,
-+ long mode, long PAD, long dev);
-+void __sanitizer_syscall_pre_impl_mkdirat(long fd, long path, long mode);
-+void __sanitizer_syscall_post_impl_mkdirat(long res, long fd, long path,
-+ long mode);
-+void __sanitizer_syscall_pre_impl_faccessat(long fd, long path, long amode,
-+ long flag);
-+void __sanitizer_syscall_post_impl_faccessat(long res, long fd, long path,
-+ long amode, long flag);
-+void __sanitizer_syscall_pre_impl_fchmodat(long fd, long path, long mode,
-+ long flag);
-+void __sanitizer_syscall_post_impl_fchmodat(long res, long fd, long path,
-+ long mode, long flag);
-+void __sanitizer_syscall_pre_impl_fchownat(long fd, long path, long owner,
-+ long group, long flag);
-+void __sanitizer_syscall_post_impl_fchownat(long res, long fd, long path,
-+ long owner, long group, long flag);
-+void __sanitizer_syscall_pre_impl_fexecve(long fd, long argp, long envp);
-+void __sanitizer_syscall_post_impl_fexecve(long res, long fd, long argp,
-+ long envp);
-+void __sanitizer_syscall_pre_impl_fstatat(long fd, long path, long buf,
-+ long flag);
-+void __sanitizer_syscall_post_impl_fstatat(long res, long fd, long path,
-+ long buf, long flag);
-+void __sanitizer_syscall_pre_impl_utimensat(long fd, long path, long tptr,
-+ long flag);
-+void __sanitizer_syscall_post_impl_utimensat(long res, long fd, long path,
-+ long tptr, long flag);
-+void __sanitizer_syscall_pre_impl_openat(long fd, long path, long oflags,
-+ long mode);
-+void __sanitizer_syscall_post_impl_openat(long res, long fd, long path,
-+ long oflags, long mode);
-+void __sanitizer_syscall_pre_impl_readlinkat(long fd, long path, long buf,
-+ long bufsize);
-+void __sanitizer_syscall_post_impl_readlinkat(long res, long fd, long path,
-+ long buf, long bufsize);
-+void __sanitizer_syscall_pre_impl_symlinkat(long path1, long fd, long path2);
-+void __sanitizer_syscall_post_impl_symlinkat(long res, long path1, long fd,
-+ long path2);
-+void __sanitizer_syscall_pre_impl_unlinkat(long fd, long path, long flag);
-+void __sanitizer_syscall_post_impl_unlinkat(long res, long fd, long path,
-+ long flag);
-+void __sanitizer_syscall_pre_impl_futimens(long fd, long tptr);
-+void __sanitizer_syscall_post_impl_futimens(long res, long fd, long tptr);
-+void __sanitizer_syscall_pre_impl___quotactl(long path, long args);
-+void __sanitizer_syscall_post_impl___quotactl(long res, long path, long args);
-+void __sanitizer_syscall_pre_impl_posix_spawn(long pid, long path,
-+ long file_actions, long attrp,
-+ long argv, long envp);
-+void __sanitizer_syscall_post_impl_posix_spawn(long res, long pid, long path,
-+ long file_actions, long attrp,
-+ long argv, long envp);
-+void __sanitizer_syscall_pre_impl_recvmmsg(long s, long mmsg, long vlen,
-+ long flags, long timeout);
-+void __sanitizer_syscall_post_impl_recvmmsg(long res, long s, long mmsg,
-+ long vlen, long flags,
-+ long timeout);
-+void __sanitizer_syscall_pre_impl_sendmmsg(long s, long mmsg, long vlen,
-+ long flags);
-+void __sanitizer_syscall_post_impl_sendmmsg(long res, long s, long mmsg,
-+ long vlen, long flags);
-+void __sanitizer_syscall_pre_impl_clock_nanosleep(long clock_id, long flags,
-+ long rqtp, long rmtp);
-+void __sanitizer_syscall_post_impl_clock_nanosleep(long res, long clock_id,
-+ long flags, long rqtp,
-+ long rmtp);
-+void __sanitizer_syscall_pre_impl____lwp_park60(long clock_id, long flags,
-+ long ts, long unpark, long hint,
-+ long unparkhint);
-+void __sanitizer_syscall_post_impl____lwp_park60(long res, long clock_id,
-+ long flags, long ts,
-+ long unpark, long hint,
-+ long unparkhint);
-+void __sanitizer_syscall_pre_impl_posix_fallocate(long fd, long PAD, long pos,
-+ long len);
-+void __sanitizer_syscall_post_impl_posix_fallocate(long res, long fd, long PAD,
-+ long pos, long len);
-+void __sanitizer_syscall_pre_impl_fdiscard(long fd, long PAD, long pos,
-+ long len);
-+void __sanitizer_syscall_post_impl_fdiscard(long res, long fd, long PAD,
-+ long pos, long len);
-+void __sanitizer_syscall_pre_impl_wait6(long idtype, long id, long status,
-+ long options, long wru, long info);
-+void __sanitizer_syscall_post_impl_wait6(long res, long idtype, long id,
-+ long status, long options, long wru,
-+ long info);
-+void __sanitizer_syscall_pre_impl_clock_getcpuclockid2(long idtype, long id,
-+ long clock_id);
-+void __sanitizer_syscall_post_impl_clock_getcpuclockid2(long res, long idtype,
-+ long id, long clock_id);
++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"
diff --git a/compiler-rt-netbsd/patches/patch-lib_hwasan_hwasan__interceptors.cc b/compiler-rt-netbsd/patches/patch-lib_hwasan_hwasan__interceptors.cc
index 483feb3419..9bd23348fd 100644
--- a/compiler-rt-netbsd/patches/patch-lib_hwasan_hwasan__interceptors.cc
+++ b/compiler-rt-netbsd/patches/patch-lib_hwasan_hwasan__interceptors.cc
@@ -1,6 +1,6 @@
$NetBSD$
---- lib/hwasan/hwasan_interceptors.cc.orig 2017-12-21 18:53:10.649224109 +0000
+--- lib/hwasan/hwasan_interceptors.cc.orig 2017-12-21 18:53:10.000000000 +0000
+++ lib/hwasan/hwasan_interceptors.cc
@@ -448,6 +448,7 @@ int OnExit() {
(void)(s); \
diff --git a/compiler-rt-netbsd/patches/patch-lib_msan_msan__interceptors.cc b/compiler-rt-netbsd/patches/patch-lib_msan_msan__interceptors.cc
index 60a7d5fafe..3181262d9a 100644
--- a/compiler-rt-netbsd/patches/patch-lib_msan_msan__interceptors.cc
+++ b/compiler-rt-netbsd/patches/patch-lib_msan_msan__interceptors.cc
@@ -1,6 +1,6 @@
$NetBSD$
---- lib/msan/msan_interceptors.cc.orig 2017-12-21 18:53:10.666569597 +0000
+--- lib/msan/msan_interceptors.cc.orig 2017-12-21 18:53:10.000000000 +0000
+++ lib/msan/msan_interceptors.cc
@@ -33,6 +33,7 @@
#include "sanitizer_common/sanitizer_libc.h"
diff --git a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__netbsd__syscalls.inc b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__netbsd__syscalls.inc
index 84a1fbcd1d..dec563b949 100644
--- a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__netbsd__syscalls.inc
+++ b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__netbsd__syscalls.inc
@@ -1,8 +1,8 @@
$NetBSD$
---- lib/sanitizer_common/sanitizer_netbsd_syscalls.inc.orig 2017-12-21 18:53:40.996191468 +0000
+--- lib/sanitizer_common/sanitizer_netbsd_syscalls.inc.orig 2017-12-27 10:21:12.201582581 +0000
+++ lib/sanitizer_common/sanitizer_netbsd_syscalls.inc
-@@ -0,0 +1,2277 @@
+@@ -0,0 +1,3793 @@
+//===-- sanitizer_common_syscalls.inc ---------------------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
@@ -42,13 +42,13 @@ $NetBSD$
+// Release memory visibility to fd.
+// COMMON_SYSCALL_PRE_FORK()
+// Called before fork syscall.
-+// COMMON_SYSCALL_POST_FORK(long res)
++// COMMON_SYSCALL_POST_FORK(long long res)
+// Called after fork syscall.
+//
+// DO NOT EDIT! THIS FILE HAS BEEN GENERATED!
+//
+// Generated with: generate_netbsd_syscalls.awk
-+// Generated date: 2017-12-21
++// Generated date: 2017-12-26
+// Generated from: syscalls.master,v 1.290 2017/12/19 19:40:03 kamil Exp
+//
+//===----------------------------------------------------------------------===//
@@ -102,50 +102,68 @@ $NetBSD$
+
+extern "C" {
+#define SYS_MAXSYSARGS 8
-+PRE_SYSCALL(syscall)(long code_, long args_[SYS_MAXSYSARGS]) {
++PRE_SYSCALL(syscall)(long long code_, long long args_[SYS_MAXSYSARGS]) {
+ /* Nothing to do */
+}
-+POST_SYSCALL(syscall)(long res, long code_, long args_[SYS_MAXSYSARGS]) {
++POST_SYSCALL(syscall)
++(long long res, long long code_, long long args_[SYS_MAXSYSARGS]) {
+ /* Nothing to do */
+}
-+PRE_SYSCALL(exit)(long rval_) { /* Nothing to do */ }
-+POST_SYSCALL(exit)(long res, long rval_) { /* Nothing to do */ }
++PRE_SYSCALL(exit)(long long rval_) { /* Nothing to do */ }
++POST_SYSCALL(exit)(long long res, long long rval_) { /* Nothing to do */ }
+PRE_SYSCALL(fork)(void) { COMMON_SYSCALL_PRE_FORK(); }
-+POST_SYSCALL(fork)(long res) { COMMON_SYSCALL_POST_FORK(res); }
-+PRE_SYSCALL(read)(long fd_, void *buf_, long nbyte_) {
++POST_SYSCALL(fork)(long long res) { COMMON_SYSCALL_POST_FORK(res); }
++PRE_SYSCALL(read)(long long fd_, void *buf_, long long nbyte_) {
+ if (buf_) {
+ PRE_WRITE(buf_, nbyte_);
+ }
+}
-+POST_SYSCALL(read)(long res, long fd_, void *buf_, long nbyte_) {}
-+PRE_SYSCALL(write)(long fd_, void *buf_, long nbyte_) {
++POST_SYSCALL(read)(long long res, long long fd_, void *buf_, long long nbyte_) {
++ if (res > 0) {
++ POST_WRITE(buf_, res);
++ }
++}
++PRE_SYSCALL(write)(long long fd_, void *buf_, long long nbyte_) {
+ if (buf_) {
+ PRE_READ(buf_, nbyte_);
+ }
+}
-+POST_SYSCALL(write)(long res, long fd_, void *buf_, long nbyte_) {}
-+PRE_SYSCALL(open)(void *path_, long flags_, long mode_) {
++POST_SYSCALL(write)
++(long long res, long long fd_, void *buf_, long long nbyte_) {
++ if (res > 0) {
++ POST_READ(buf_, res);
++ }
++}
++PRE_SYSCALL(open)(void *path_, long long flags_, long long mode_) {
+ const char *path = (const char *)path_;
+ if (path) {
+ PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
+ }
+}
-+POST_SYSCALL(open)(long res, void *path_, long flags_, long mode_) {}
-+PRE_SYSCALL(close)(long fd_) { COMMON_SYSCALL_FD_CLOSE((int)fd_); }
-+POST_SYSCALL(close)(long res, long fd_) {}
++POST_SYSCALL(open)
++(long long res, void *path_, long long flags_, long long mode_) {
++ if (res > 0) {
++ const char *path = (const char *)path_;
++ if (path) {
++ POST_READ(path, __sanitizer::internal_strlen(path) + 1);
++ }
++ }
++}
++PRE_SYSCALL(close)(long long fd_) { COMMON_SYSCALL_FD_CLOSE((int)fd_); }
++POST_SYSCALL(close)(long long res, long long fd_) { /* Nothing to do */ }
+PRE_SYSCALL(compat_50_wait4)
-+(long pid_, void *status_, long options_, void *rusage_) {
-+ /* Nothing to do */
++(long long pid_, void *status_, long long options_, void *rusage_) {
++ /* TODO */
+}
+POST_SYSCALL(compat_50_wait4)
-+(long res, long pid_, void *status_, long options_, void *rusage_) {}
-+PRE_SYSCALL(compat_43_ocreat)(void *path_, long mode_) {
-+ const char *path = (const char *)path_;
-+ if (path) {
-+ PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
-+ }
++(long long res, long long pid_, void *status_, long long options_,
++ void *rusage_) {
++ /* TODO */
++}
++PRE_SYSCALL(compat_43_ocreat)(void *path_, long long mode_) { /* TODO */ }
++POST_SYSCALL(compat_43_ocreat)(long long res, void *path_, long long mode_) {
++ /* TODO */
+}
-+POST_SYSCALL(compat_43_ocreat)(long res, void *path_, long mode_) {}
+PRE_SYSCALL(link)(void *path_, void *link_) {
+ const char *path = (const char *)path_;
+ const char *link = (const char *)link_;
@@ -156,14 +174,32 @@ $NetBSD$
+ PRE_READ(path, __sanitizer::internal_strlen(link) + 1);
+ }
+}
-+POST_SYSCALL(link)(long res, void *path_, void *link_) {}
++POST_SYSCALL(link)(long long res, void *path_, void *link_) {
++ if (res == 0) {
++ const char *path = (const char *)path_;
++ const char *link = (const char *)link_;
++ if (path) {
++ POST_READ(path, __sanitizer::internal_strlen(path) + 1);
++ }
++ if (link) {
++ POST_READ(path, __sanitizer::internal_strlen(link) + 1);
++ }
++ }
++}
+PRE_SYSCALL(unlink)(void *path_) {
+ const char *path = (const char *)path_;
+ if (path) {
+ PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
+ }
+}
-+POST_SYSCALL(unlink)(long res, void *path_) {}
++POST_SYSCALL(unlink)(long long res, void *path_) {
++ if (res == 0) {
++ const char *path = (const char *)path_;
++ if (path) {
++ POST_READ(path, __sanitizer::internal_strlen(path) + 1);
++ }
++ }
++}
+/* syscall 11 has been skipped */
+PRE_SYSCALL(chdir)(void *path_) {
+ const char *path = (const char *)path_;
@@ -171,207 +207,434 @@ $NetBSD$
+ PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
+ }
+}
-+POST_SYSCALL(chdir)(long res, void *path_) {}
-+PRE_SYSCALL(fchdir)(long fd_) { /* Nothing to do */ }
-+POST_SYSCALL(fchdir)(long res, long fd_) {}
-+PRE_SYSCALL(compat_50_mknod)(void *path_, long mode_, long dev_) {
-+ const char *path = (const char *)path_;
-+ if (path) {
-+ PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
++POST_SYSCALL(chdir)(long long res, void *path_) {
++ if (res == 0) {
++ const char *path = (const char *)path_;
++ if (path) {
++ POST_READ(path, __sanitizer::internal_strlen(path) + 1);
++ }
+ }
+}
-+POST_SYSCALL(compat_50_mknod)(long res, void *path_, long mode_, long dev_) {}
-+PRE_SYSCALL(chmod)(void *path_, long mode_) {
++PRE_SYSCALL(fchdir)(long long fd_) { /* Nothing to do */ }
++POST_SYSCALL(fchdir)(long long res, long long fd_) { /* Nothing to do */ }
++PRE_SYSCALL(compat_50_mknod)(void *path_, long long mode_, long long dev_) {
++ /* TODO */
++}
++POST_SYSCALL(compat_50_mknod)
++(long long res, void *path_, long long mode_, long long dev_) {
++ /* TODO */
++}
++PRE_SYSCALL(chmod)(void *path_, long long mode_) {
+ const char *path = (const char *)path_;
+ if (path) {
+ PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
+ }
+}
-+POST_SYSCALL(chmod)(long res, void *path_, long mode_) {}
-+PRE_SYSCALL(chown)(void *path_, long uid_, long gid_) {
++POST_SYSCALL(chmod)(long long res, void *path_, long long mode_) {
++ if (res == 0) {
++ const char *path = (const char *)path_;
++ if (path) {
++ POST_READ(path, __sanitizer::internal_strlen(path) + 1);
++ }
++ }
++}
++PRE_SYSCALL(chown)(void *path_, long long uid_, long long gid_) {
+ const char *path = (const char *)path_;
+ if (path) {
+ PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
+ }
+}
-+POST_SYSCALL(chown)(long res, void *path_, long uid_, long gid_) {}
++POST_SYSCALL(chown)
++(long long res, void *path_, long long uid_, long long gid_) {
++ if (res == 0) {
++ const char *path = (const char *)path_;
++ if (path) {
++ POST_READ(path, __sanitizer::internal_strlen(path) + 1);
++ }
++ }
++}
+PRE_SYSCALL(break)(void *nsize_) { /* Nothing to do */ }
-+POST_SYSCALL(break)(long res, void *nsize_) {}
-+PRE_SYSCALL(compat_20_getfsstat)(void *buf_, long bufsize_, long flags_) {
-+ /* Nothing to do */
++POST_SYSCALL(break)(long long res, void *nsize_) { /* Nothing to do */ }
++PRE_SYSCALL(compat_20_getfsstat)
++(void *buf_, long long bufsize_, long long flags_) {
++ /* TODO */
+}
+POST_SYSCALL(compat_20_getfsstat)
-+(long res, void *buf_, long bufsize_, long flags_) {}
-+PRE_SYSCALL(compat_43_olseek)(long fd_, long offset_, long whence_) {
-+ /* Nothing to do */
++(long long res, void *buf_, long long bufsize_, long long flags_) {
++ /* TODO */
++}
++PRE_SYSCALL(compat_43_olseek)
++(long long fd_, long long offset_, long long whence_) {
++ /* TODO */
+}
+POST_SYSCALL(compat_43_olseek)
-+(long res, long fd_, long offset_, long whence_) {}
++(long long res, long long fd_, long long offset_, long long whence_) {
++ /* TODO */
++}
+PRE_SYSCALL(getpid)(void) { /* Nothing to do */ }
-+POST_SYSCALL(getpid)(long res) {}
++POST_SYSCALL(getpid)(long long res) { /* Nothing to do */ }
+PRE_SYSCALL(compat_40_mount)
-+(void *type_, void *path_, long flags_, void *data_) {
-+ /* Nothing to do */
++(void *type_, void *path_, long long flags_, void *data_) {
++ /* TODO */
+}
+POST_SYSCALL(compat_40_mount)
-+(long res, void *type_, void *path_, long flags_, void *data_) {}
-+PRE_SYSCALL(unmount)(void *path_, long flags_) { /* Nothing to do */ }
-+POST_SYSCALL(unmount)(long res, void *path_, long flags_) {}
-+PRE_SYSCALL(setuid)(long uid_) { /* Nothing to do */ }
-+POST_SYSCALL(setuid)(long res, long uid_) {}
++(long long res, void *type_, void *path_, long long flags_, void *data_) {
++ /* TODO */
++}
++PRE_SYSCALL(unmount)(void *path_, long long flags_) {
++ const char *path = (const char *)path_;
++ if (path) {
++ PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
++ }
++}
++POST_SYSCALL(unmount)(long long res, void *path_, long long flags_) {
++ if (res == 0) {
++ const char *path = (const char *)path_;
++ if (path) {
++ POST_READ(path, __sanitizer::internal_strlen(path) + 1);
++ }
++ }
++}
++PRE_SYSCALL(setuid)(long long uid_) { /* Nothing to do */ }
++POST_SYSCALL(setuid)(long long res, long long uid_) { /* Nothing to do */ }
+PRE_SYSCALL(getuid)(void) { /* Nothing to do */ }
-+POST_SYSCALL(getuid)(long res) {}
++POST_SYSCALL(getuid)(long long res) { /* Nothing to do */ }
+PRE_SYSCALL(geteuid)(void) { /* Nothing to do */ }
-+POST_SYSCALL(geteuid)(long res) {}
-+PRE_SYSCALL(ptrace)(long req_, long pid_, void *addr_, long data_) {
++POST_SYSCALL(geteuid)(long long res) { /* Nothing to do */ }
++PRE_SYSCALL(ptrace)
++(long long req_, long long pid_, void *addr_, long long data_) {
+ if (req_ == ptrace_pt_io) {
-+ struct __sanitizer_ptrace_io_desc *piod =
++ struct __sanitizer_ptrace_io_desc *addr =
+ (struct __sanitizer_ptrace_io_desc *)addr_;
-+ if (piod->piod_op == ptrace_piod_write_d ||
-+ piod->piod_op == ptrace_piod_write_i) {
-+ PRE_READ(piod->piod_addr, piod->piod_len);
++ PRE_READ(addr, struct_ptrace_ptrace_io_desc_struct_sz);
++ if (addr->piod_op == ptrace_piod_write_d ||
++ addr->piod_op == ptrace_piod_write_i) {
++ PRE_READ(addr->piod_addr, addr->piod_len);
++ }
++ if (addr->piod_op == ptrace_piod_read_d ||
++ addr->piod_op == ptrace_piod_read_i ||
++ addr->piod_op == ptrace_piod_read_auxv) {
++ PRE_WRITE(addr->piod_addr, addr->piod_len);
+ }
++ } else if (req_ == ptrace_pt_lwpinfo) {
++ struct __sanitizer_ptrace_lwpinfo *addr =
++ (struct __sanitizer_ptrace_lwpinfo *)addr_;
++ PRE_READ(&addr->pl_lwpid, sizeof(__sanitizer_lwpid_t));
++ PRE_WRITE(addr, struct_ptrace_ptrace_lwpinfo_struct_sz);
+ } else if (req_ == ptrace_pt_set_event_mask) {
+ PRE_READ(addr_, struct_ptrace_ptrace_event_struct_sz);
++ } else if (req_ == ptrace_pt_get_event_mask) {
++ PRE_WRITE(addr_, struct_ptrace_ptrace_event_struct_sz);
+ } else if (req_ == ptrace_pt_set_siginfo) {
+ PRE_READ(addr_, struct_ptrace_ptrace_siginfo_struct_sz);
++ } else if (req_ == ptrace_pt_get_siginfo) {
++ PRE_WRITE(addr_, struct_ptrace_ptrace_siginfo_struct_sz);
+ } else if (req_ == ptrace_pt_set_sigmask) {
+ PRE_READ(addr_, sizeof(__sanitizer_sigset_t));
++ } else if (req_ == ptrace_pt_get_sigmask) {
++ PRE_WRITE(addr_, sizeof(__sanitizer_sigset_t));
+ } else if (req_ == ptrace_pt_setregs) {
+ PRE_READ(addr_, struct_ptrace_reg_struct_sz);
++ } else if (req_ == ptrace_pt_getregs) {
++ PRE_WRITE(addr_, struct_ptrace_reg_struct_sz);
+ } else if (req_ == ptrace_pt_setfpregs) {
+ PRE_READ(addr_, struct_ptrace_fpreg_struct_sz);
++ } else if (req_ == ptrace_pt_getfpregs) {
++ PRE_WRITE(addr_, struct_ptrace_fpreg_struct_sz);
+ } else if (req_ == ptrace_pt_setdbregs) {
+ PRE_READ(addr_, struct_ptrace_dbreg_struct_sz);
++ } else if (req_ == ptrace_pt_getdbregs) {
++ PRE_WRITE(addr_, struct_ptrace_dbreg_struct_sz);
++ }
++}
++POST_SYSCALL(ptrace)
++(long long res, long long req_, long long pid_, void *addr_, long long data_) {
++ if (res == 0) {
++ if (req_ == ptrace_pt_io) {
++ struct __sanitizer_ptrace_io_desc *addr =
++ (struct __sanitizer_ptrace_io_desc *)addr_;
++ POST_READ(addr, struct_ptrace_ptrace_io_desc_struct_sz);
++ if (addr->piod_op == ptrace_piod_write_d ||
++ addr->piod_op == ptrace_piod_write_i) {
++ POST_READ(addr->piod_addr, addr->piod_len);
++ }
++ if (addr->piod_op == ptrace_piod_read_d ||
++ addr->piod_op == ptrace_piod_read_i ||
++ addr->piod_op == ptrace_piod_read_auxv) {
++ POST_WRITE(addr->piod_addr, addr->piod_len);
++ }
++ } else if (req_ == ptrace_pt_lwpinfo) {
++ struct __sanitizer_ptrace_lwpinfo *addr =
++ (struct __sanitizer_ptrace_lwpinfo *)addr_;
++ POST_READ(&addr->pl_lwpid, sizeof(__sanitizer_lwpid_t));
++ POST_WRITE(addr, struct_ptrace_ptrace_lwpinfo_struct_sz);
++ } else if (req_ == ptrace_pt_set_event_mask) {
++ POST_READ(addr_, struct_ptrace_ptrace_event_struct_sz);
++ } else if (req_ == ptrace_pt_get_event_mask) {
++ POST_WRITE(addr_, struct_ptrace_ptrace_event_struct_sz);
++ } else if (req_ == ptrace_pt_set_siginfo) {
++ POST_READ(addr_, struct_ptrace_ptrace_siginfo_struct_sz);
++ } else if (req_ == ptrace_pt_get_siginfo) {
++ POST_WRITE(addr_, struct_ptrace_ptrace_siginfo_struct_sz);
++ } else if (req_ == ptrace_pt_set_sigmask) {
++ POST_READ(addr_, sizeof(__sanitizer_sigset_t));
++ } else if (req_ == ptrace_pt_get_sigmask) {
++ POST_WRITE(addr_, sizeof(__sanitizer_sigset_t));
++ } else if (req_ == ptrace_pt_setregs) {
++ POST_READ(addr_, struct_ptrace_reg_struct_sz);
++ } else if (req_ == ptrace_pt_getregs) {
++ POST_WRITE(addr_, struct_ptrace_reg_struct_sz);
++ } else if (req_ == ptrace_pt_setfpregs) {
++ POST_READ(addr_, struct_ptrace_fpreg_struct_sz);
++ } else if (req_ == ptrace_pt_getfpregs) {
++ POST_WRITE(addr_, struct_ptrace_fpreg_struct_sz);
++ } else if (req_ == ptrace_pt_setdbregs) {
++ POST_READ(addr_, struct_ptrace_dbreg_struct_sz);
++ } else if (req_ == ptrace_pt_getdbregs) {
++ POST_WRITE(addr_, struct_ptrace_dbreg_struct_sz);
++ }
++ }
++}
++PRE_SYSCALL(recvmsg)(long long s_, void *msg_, long long flags_) {
++ PRE_WRITE(msg_, sizeof(__sanitizer_msghdr));
++}
++POST_SYSCALL(recvmsg)
++(long long res, long long s_, void *msg_, long long flags_) {
++ if (res > 0) {
++ POST_WRITE(msg_, sizeof(__sanitizer_msghdr));
+ }
+}
-+POST_SYSCALL(ptrace)(long res, long req_, long pid_, void *addr_, long data_) {}
-+PRE_SYSCALL(recvmsg)(long s_, void *msg_, long flags_) {
++PRE_SYSCALL(sendmsg)(long long s_, void *msg_, long long flags_) {
+ PRE_READ(msg_, sizeof(__sanitizer_msghdr));
+}
-+POST_SYSCALL(recvmsg)(long res, long s_, void *msg_, long flags_) {}
-+PRE_SYSCALL(sendmsg)(long s_, void *msg_, long flags_) { /* Nothing to do */ }
-+POST_SYSCALL(sendmsg)(long res, long s_, void *msg_, long flags_) {}
++POST_SYSCALL(sendmsg)
++(long long res, long long s_, void *msg_, long long flags_) {
++ if (res > 0) {
++ POST_READ(msg_, sizeof(__sanitizer_msghdr));
++ }
++}
+PRE_SYSCALL(recvfrom)
-+(long s_, void *buf_, long len_, long flags_, void *from_, void *fromlenaddr_) {
-+ /* Nothing to do */
++(long long s_, void *buf_, long long len_, long long flags_, void *from_,
++ void *fromlenaddr_) {
++ PRE_WRITE(buf_, len_);
++ PRE_WRITE(from_, struct_sockaddr_sz);
++ PRE_WRITE(fromlenaddr_, sizeof(__sanitizer_socklen_t));
+}
+POST_SYSCALL(recvfrom)
-+(long res, long s_, void *buf_, long len_, long flags_, void *from_,
-+ void *fromlenaddr_) {}
-+PRE_SYSCALL(accept)(long s_, void *name_, void *anamelen_) {
-+ /* Nothing to do */
++(long long res, long long s_, void *buf_, long long len_, long long flags_,
++ void *from_, void *fromlenaddr_) {
++ if (res >= 0) {
++ POST_WRITE(buf_, res);
++ POST_WRITE(from_, struct_sockaddr_sz);
++ POST_WRITE(fromlenaddr_, sizeof(__sanitizer_socklen_t));
++ }
+}
-+POST_SYSCALL(accept)(long res, long s_, void *name_, void *anamelen_) {}
-+PRE_SYSCALL(getpeername)(long fdes_, void *asa_, void *alen_) {
-+ /* Nothing to do */
++PRE_SYSCALL(accept)(long long s_, void *name_, void *anamelen_) {
++ PRE_WRITE(name_, struct_sockaddr_sz);
++ PRE_WRITE(anamelen_, sizeof(__sanitizer_socklen_t));
+}
-+POST_SYSCALL(getpeername)(long res, long fdes_, void *asa_, void *alen_) {}
-+PRE_SYSCALL(getsockname)(long fdes_, void *asa_, void *alen_) {
-+ /* Nothing to do */
++POST_SYSCALL(accept)
++(long long res, long long s_, void *name_, void *anamelen_) {
++ if (res == 0) {
++ POST_WRITE(name_, struct_sockaddr_sz);
++ POST_WRITE(anamelen_, sizeof(__sanitizer_socklen_t));
++ }
+}
-+POST_SYSCALL(getsockname)(long res, long fdes_, void *asa_, void *alen_) {}
-+PRE_SYSCALL(access)(void *path_, long flags_) {
-+ const char *path = (const char *)path_;
-+ if (path) {
-+ PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
++PRE_SYSCALL(getpeername)(long long fdes_, void *asa_, void *alen_) {
++ PRE_WRITE(asa_, struct_sockaddr_sz);
++ PRE_WRITE(alen_, sizeof(__sanitizer_socklen_t));
++}
++POST_SYSCALL(getpeername)
++(long long res, long long fdes_, void *asa_, void *alen_) {
++ if (res == 0) {
++ POST_WRITE(asa_, struct_sockaddr_sz);
++ POST_WRITE(alen_, sizeof(__sanitizer_socklen_t));
+ }
+}
-+POST_SYSCALL(access)(long res, void *path_, long flags_) {}
-+PRE_SYSCALL(chflags)(void *path_, long flags_) {
-+ const char *path = (const char *)path_;
-+ if (path) {
-+ PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
++PRE_SYSCALL(getsockname)(long long fdes_, void *asa_, void *alen_) {
++ PRE_WRITE(asa_, struct_sockaddr_sz);
++ PRE_WRITE(alen_, sizeof(__sanitizer_socklen_t));
++}
++POST_SYSCALL(getsockname)
++(long long res, long long fdes_, void *asa_, void *alen_) {
++ if (res == 0) {
++ POST_WRITE(asa_, struct_sockaddr_sz);
++ POST_WRITE(alen_, sizeof(__sanitizer_socklen_t));
+ }
+}
-+POST_SYSCALL(chflags)(long res, void *path_, long flags_) {}
-+PRE_SYSCALL(fchflags)(long fd_, long flags_) { /* Nothing to do */ }
-+POST_SYSCALL(fchflags)(long res, long fd_, long flags_) {}
-+PRE_SYSCALL(sync)(void) { /* Nothing to do */ }
-+POST_SYSCALL(sync)(long res) {}
-+PRE_SYSCALL(kill)(long pid_, long signum_) { /* Nothing to do */ }
-+POST_SYSCALL(kill)(long res, long pid_, long signum_) {}
-+PRE_SYSCALL(compat_43_stat43)(void *path_, void *ub_) {
++PRE_SYSCALL(access)(void *path_, long long flags_) {
+ const char *path = (const char *)path_;
+ if (path) {
+ PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
+ }
+}
-+POST_SYSCALL(compat_43_stat43)(long res, void *path_, void *ub_) {}
-+PRE_SYSCALL(getppid)(void) { /* Nothing to do */ }
-+POST_SYSCALL(getppid)(long res) {}
-+PRE_SYSCALL(compat_43_lstat43)(void *path_, void *ub_) {
++POST_SYSCALL(access)(long long res, void *path_, long long flags_) {
++ if (res == 0) {
++ const char *path = (const char *)path_;
++ if (path) {
++ POST_READ(path, __sanitizer::internal_strlen(path) + 1);
++ }
++ }
++}
++PRE_SYSCALL(chflags)(void *path_, long long flags_) {
+ const char *path = (const char *)path_;
+ if (path) {
+ PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
+ }
+}
-+POST_SYSCALL(compat_43_lstat43)(long res, void *path_, void *ub_) {}
-+PRE_SYSCALL(dup)(long fd_) { /* Nothing to do */ }
-+POST_SYSCALL(dup)(long res, long fd_) {}
-+PRE_SYSCALL(pipe)(void) { /* Nothing to do */ }
-+POST_SYSCALL(pipe)(long res) {}
-+PRE_SYSCALL(getegid)(void) { /* Nothing to do */ }
-+POST_SYSCALL(getegid)(long res) {}
-+PRE_SYSCALL(profil)(void *samples_, long size_, long offset_, long scale_) {
++POST_SYSCALL(chflags)(long long res, void *path_, long long flags_) {
++ if (res == 0) {
++ const char *path = (const char *)path_;
++ if (path) {
++ POST_READ(path, __sanitizer::internal_strlen(path) + 1);
++ }
++ }
++}
++PRE_SYSCALL(fchflags)(long long fd_, long long flags_) { /* Nothing to do */ }
++POST_SYSCALL(fchflags)(long long res, long long fd_, long long flags_) {
+ /* Nothing to do */
+}
-+POST_SYSCALL(profil)
-+(long res, void *samples_, long size_, long offset_, long scale_) {}
-+PRE_SYSCALL(ktrace)(void *fname_, long ops_, long facs_, long pid_) {
++PRE_SYSCALL(sync)(void) { /* Nothing to do */ }
++POST_SYSCALL(sync)(long long res) { /* Nothing to do */ }
++PRE_SYSCALL(kill)(long long pid_, long long signum_) { /* Nothing to do */ }
++POST_SYSCALL(kill)(long long res, long long pid_, long long signum_) {
+ /* Nothing to do */
+}
++PRE_SYSCALL(compat_43_stat43)(void *path_, void *ub_) { /* TODO */ }
++POST_SYSCALL(compat_43_stat43)(long long res, void *path_, void *ub_) {
++ /* TODO */
++}
++PRE_SYSCALL(getppid)(void) { /* Nothing to do */ }
++POST_SYSCALL(getppid)(long long res) { /* Nothing to do */ }
++PRE_SYSCALL(compat_43_lstat43)(void *path_, void *ub_) { /* TODO */ }
++POST_SYSCALL(compat_43_lstat43)(long long res, void *path_, void *ub_) {
++ /* TODO */
++}
++PRE_SYSCALL(dup)(long long fd_) { /* Nothing to do */ }
++POST_SYSCALL(dup)(long long res, long long fd_) { /* Nothing to do */ }
++PRE_SYSCALL(pipe)(void) {
++ /* pipe returns two descriptors through two returned values */
++}
++POST_SYSCALL(pipe)(long long res) {
++ /* pipe returns two descriptors through two returned values */
++}
++PRE_SYSCALL(getegid)(void) { /* Nothing to do */ }
++POST_SYSCALL(getegid)(long long res) { /* Nothing to do */ }
++PRE_SYSCALL(profil)
++(void *samples_, long long size_, long long offset_, long long scale_) {
++ if (samples_) {
++ PRE_WRITE(samples_, size_);
++ }
++}
++POST_SYSCALL(profil)
++(long long res, void *samples_, long long size_, long long offset_,
++ long long scale_) {
++ if (res == 0) {
++ if (samples_) {
++ POST_WRITE(samples_, size_);
++ }
++ }
++}
++PRE_SYSCALL(ktrace)
++(void *fname_, long long ops_, long long facs_, long long pid_) {
++ const char *fname = (const char *)fname_;
++ if (fname) {
++ PRE_READ(fname, __sanitizer::internal_strlen(fname) + 1);
++ }
++}
+POST_SYSCALL(ktrace)
-+(long res, void *fname_, long ops_, long facs_, long pid_) {}
-+PRE_SYSCALL(compat_13_sigaction13)(long signum_, void *nsa_, void *osa_) {
-+ struct __sanitizer_sigaction13 *nsa = (struct __sanitizer_sigaction13 *)nsa_;
-+ if (nsa) {
-+ PRE_READ(&nsa->osa_handler, sizeof(nsa->osa_handler));
-+ PRE_READ(&nsa->osa_flags, sizeof(nsa->osa_flags));
-+ PRE_READ(&nsa->osa_mask, sizeof(nsa->osa_mask));
++(long long res, void *fname_, long long ops_, long long facs_, long long pid_) {
++ const char *fname = (const char *)fname_;
++ if (res == 0) {
++ if (fname) {
++ POST_READ(fname, __sanitizer::internal_strlen(fname) + 1);
++ }
+ }
+}
++PRE_SYSCALL(compat_13_sigaction13)(long long signum_, void *nsa_, void *osa_) {
++ /* TODO */
++}
+POST_SYSCALL(compat_13_sigaction13)
-+(long res, long signum_, void *nsa_, void *osa_) {}
++(long long res, long long signum_, void *nsa_, void *osa_) {
++ /* TODO */
++}
+PRE_SYSCALL(getgid)(void) { /* Nothing to do */ }
-+POST_SYSCALL(getgid)(long res) {}
-+PRE_SYSCALL(compat_13_sigprocmask13)(long how_, long mask_) {
-+ /* Nothing to do */
++POST_SYSCALL(getgid)(long long res) { /* Nothing to do */ }
++PRE_SYSCALL(compat_13_sigprocmask13)(long long how_, long long mask_) {
++ /* TODO */
++}
++POST_SYSCALL(compat_13_sigprocmask13)
++(long long res, long long how_, long long mask_) {
++ /* TODO */
++}
++PRE_SYSCALL(__getlogin)(void *namebuf_, long long namelen_) {
++ if (namebuf_) {
++ PRE_WRITE(namebuf_, namelen_);
++ }
++}
++POST_SYSCALL(__getlogin)(long long res, void *namebuf_, long long namelen_) {
++ if (res == 0) {
++ if (namebuf_) {
++ POST_WRITE(namebuf_, namelen_);
++ }
++ }
+}
-+POST_SYSCALL(compat_13_sigprocmask13)(long res, long how_, long mask_) {}
-+PRE_SYSCALL(__getlogin)(void *namebuf_, long namelen_) { /* Nothing to do */ }
-+POST_SYSCALL(__getlogin)(long res, void *namebuf_, long namelen_) {}
+PRE_SYSCALL(__setlogin)(void *namebuf_) {
+ const char *namebuf = (const char *)namebuf_;
+ if (namebuf) {
+ PRE_READ(namebuf, __sanitizer::internal_strlen(namebuf) + 1);
+ }
+}
-+POST_SYSCALL(__setlogin)(long res, void *namebuf_) {}
++POST_SYSCALL(__setlogin)(long long res, void *namebuf_) {
++ if (res == 0) {
++ const char *namebuf = (const char *)namebuf_;
++ if (namebuf) {
++ POST_READ(namebuf, __sanitizer::internal_strlen(namebuf) + 1);
++ }
++ }
++}
+PRE_SYSCALL(acct)(void *path_) {
+ const char *path = (const char *)path_;
+ if (path) {
+ PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
+ }
+}
-+POST_SYSCALL(acct)(long res, void *path_) {}
-+PRE_SYSCALL(compat_13_sigpending13)(void) { /* Nothing to do */ }
-+POST_SYSCALL(compat_13_sigpending13)(long res) {}
-+PRE_SYSCALL(compat_13_sigaltstack13)(void *nss_, void *oss_) {
++POST_SYSCALL(acct)(long long res, void *path_) {
++ if (res == 0) {
++ const char *path = (const char *)path_;
++ if (path) {
++ POST_READ(path, __sanitizer::internal_strlen(path) + 1);
++ }
++ }
++}
++PRE_SYSCALL(compat_13_sigpending13)(void) { /* TODO */ }
++POST_SYSCALL(compat_13_sigpending13)(long long res) { /* TODO */ }
++PRE_SYSCALL(compat_13_sigaltstack13)(void *nss_, void *oss_) { /* TODO */ }
++POST_SYSCALL(compat_13_sigaltstack13)(long long res, void *nss_, void *oss_) {
++ /* TODO */
++}
++PRE_SYSCALL(ioctl)(long long fd_, long long com_, void *data_) {
++ /* Nothing to do */
++}
++POST_SYSCALL(ioctl)(long long res, long long fd_, long long com_, void *data_) {
+ /* Nothing to do */
+}
-+POST_SYSCALL(compat_13_sigaltstack13)(long res, void *nss_, void *oss_) {}
-+PRE_SYSCALL(ioctl)(long fd_, long com_, void *data_) { /* Nothing to do */ }
-+POST_SYSCALL(ioctl)(long res, long fd_, long com_, void *data_) {}
-+PRE_SYSCALL(compat_12_oreboot)(long opt_) { /* Nothing to do */ }
-+POST_SYSCALL(compat_12_oreboot)(long res, long opt_) {}
++PRE_SYSCALL(compat_12_oreboot)(long long opt_) { /* TODO */ }
++POST_SYSCALL(compat_12_oreboot)(long long res, long long opt_) { /* TODO */ }
+PRE_SYSCALL(revoke)(void *path_) {
+ const char *path = (const char *)path_;
+ if (path) {
+ PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
+ }
+}
-+POST_SYSCALL(revoke)(long res, void *path_) {}
++POST_SYSCALL(revoke)(long long res, void *path_) {
++ if (res == 0) {
++ const char *path = (const char *)path_;
++ if (path) {
++ POST_READ(path, __sanitizer::internal_strlen(path) + 1);
++ }
++ }
++}
+PRE_SYSCALL(symlink)(void *path_, void *link_) {
+ const char *path = (const char *)path_;
+ const char *link = (const char *)link_;
@@ -382,14 +645,39 @@ $NetBSD$
+ PRE_READ(link, __sanitizer::internal_strlen(link) + 1);
+ }
+}
-+POST_SYSCALL(symlink)(long res, void *path_, void *link_) {}
-+PRE_SYSCALL(readlink)(void *path_, void *buf_, long count_) {
++POST_SYSCALL(symlink)(long long res, void *path_, void *link_) {
++ if (res == 0) {
++ const char *path = (const char *)path_;
++ const char *link = (const char *)link_;
++ if (path) {
++ POST_READ(path, __sanitizer::internal_strlen(path) + 1);
++ }
++ if (link) {
++ POST_READ(link, __sanitizer::internal_strlen(link) + 1);
++ }
++ }
++}
++PRE_SYSCALL(readlink)(void *path_, void *buf_, long long count_) {
+ const char *path = (const char *)path_;
+ if (path) {
+ PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
+ }
++ if (buf_) {
++ PRE_WRITE(buf_, count_);
++ }
++}
++POST_SYSCALL(readlink)
++(long long res, void *path_, void *buf_, long long count_) {
++ if (res > 0) {
++ const char *path = (const char *)path_;
++ if (path) {
++ POST_READ(path, __sanitizer::internal_strlen(path) + 1);
++ }
++ if (buf_) {
++ PRE_WRITE(buf_, res);
++ }
++ }
+}
-+POST_SYSCALL(readlink)(long res, void *path_, void *buf_, long count_) {}
+PRE_SYSCALL(execve)(void *path_, void *argp_, void *envp_) {
+ const char *path = (const char *)path_;
+ char **argp = (char **)argp_;
@@ -410,204 +698,418 @@ $NetBSD$
+ }
+ }
+}
-+POST_SYSCALL(execve)(long res, void *path_, void *argp_, void *envp_) {}
-+PRE_SYSCALL(umask)(long newmask_) { /* Nothing to do */ }
-+POST_SYSCALL(umask)(long res, long newmask_) {}
++POST_SYSCALL(execve)(long long res, void *path_, void *argp_, void *envp_) {
++ /* If we are here, something went wrong */
++ const char *path = (const char *)path_;
++ char **argp = (char **)argp_;
++ char **envp = (char **)envp_;
++ if (path) {
++ POST_READ(path, __sanitizer::internal_strlen(path) + 1);
++ }
++ if (argp && argp[0]) {
++ char *a = argp[0];
++ while (a++) {
++ POST_READ(a, __sanitizer::internal_strlen(a) + 1);
++ }
++ }
++ if (envp && envp[0]) {
++ char *e = envp[0];
++ while (e++) {
++ POST_READ(e, __sanitizer::internal_strlen(e) + 1);
++ }
++ }
++}
++PRE_SYSCALL(umask)(long long newmask_) { /* Nothing to do */ }
++POST_SYSCALL(umask)(long long res, long long newmask_) { /* Nothing to do */ }
+PRE_SYSCALL(chroot)(void *path_) {
+ const char *path = (const char *)path_;
+ if (path) {
+ PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
+ }
+}
-+POST_SYSCALL(chroot)(long res, void *path_) {}
-+PRE_SYSCALL(compat_43_fstat43)(long fd_, void *sb_) { /* Nothing to do */ }
-+POST_SYSCALL(compat_43_fstat43)(long res, long fd_, void *sb_) {}
++POST_SYSCALL(chroot)(long long res, void *path_) {
++ if (res == 0) {
++ const char *path = (const char *)path_;
++ if (path) {
++ POST_READ(path, __sanitizer::internal_strlen(path) + 1);
++ }
++ }
++}
++PRE_SYSCALL(compat_43_fstat43)(long long fd_, void *sb_) { /* TODO */ }
++POST_SYSCALL(compat_43_fstat43)(long long res, long long fd_, void *sb_) {
++ /* TODO */
++}
+PRE_SYSCALL(compat_43_ogetkerninfo)
-+(long op_, void *where_, void *size_, long arg_) {
-+ /* Nothing to do */
++(long long op_, void *where_, void *size_, long long arg_) {
++ /* TODO */
+}
+POST_SYSCALL(compat_43_ogetkerninfo)
-+(long res, long op_, void *where_, void *size_, long arg_) {}
-+PRE_SYSCALL(compat_43_ogetpagesize)(void) { /* Nothing to do */ }
-+POST_SYSCALL(compat_43_ogetpagesize)(long res) {}
-+PRE_SYSCALL(compat_12_msync)(void *addr_, long len_) { /* Nothing to do */ }
-+POST_SYSCALL(compat_12_msync)(long res, void *addr_, long len_) {}
++(long long res, long long op_, void *where_, void *size_, long long arg_) {
++ /* TODO */
++}
++PRE_SYSCALL(compat_43_ogetpagesize)(void) { /* TODO */ }
++POST_SYSCALL(compat_43_ogetpagesize)(long long res) { /* TODO */ }
++PRE_SYSCALL(compat_12_msync)(void *addr_, long long len_) { /* TODO */ }
++POST_SYSCALL(compat_12_msync)(long long res, void *addr_, long long len_) {
++ /* TODO */
++}
+PRE_SYSCALL(vfork)(void) { /* Nothing to do */ }
-+POST_SYSCALL(vfork)(long res) {}
++POST_SYSCALL(vfork)(long long res) { /* Nothing to do */ }
+/* syscall 67 has been skipped */
+/* syscall 68 has been skipped */
+/* syscall 69 has been skipped */
+/* syscall 70 has been skipped */
+PRE_SYSCALL(compat_43_ommap)
-+(void *addr_, long len_, long prot_, long flags_, long fd_, long pos_) {
-+ /* Nothing to do */
++(void *addr_, long long len_, long long prot_, long long flags_, long long fd_,
++ long long pos_) {
++ /* TODO */
+}
+POST_SYSCALL(compat_43_ommap)
-+(long res, void *addr_, long len_, long prot_, long flags_, long fd_,
-+ long pos_) {}
++(long long res, void *addr_, long long len_, long long prot_, long long flags_,
++ long long fd_, long long pos_) {
++ /* TODO */
++}
+/* syscall 72 has been skipped */
-+PRE_SYSCALL(munmap)(void *addr_, long len_) { /* Nothing to do */ }
-+POST_SYSCALL(munmap)(long res, void *addr_, long len_) {}
-+PRE_SYSCALL(mprotect)(void *addr_, long len_, long prot_) {
++PRE_SYSCALL(munmap)(void *addr_, long long len_) { /* Nothing to do */ }
++POST_SYSCALL(munmap)(long long res, void *addr_, long long len_) {
++ /* Nothing to do */
++}
++PRE_SYSCALL(mprotect)(void *addr_, long long len_, long long prot_) {
++ /* Nothing to do */
++}
++POST_SYSCALL(mprotect)
++(long long res, void *addr_, long long len_, long long prot_) {
++ /* Nothing to do */
++}
++PRE_SYSCALL(madvise)(void *addr_, long long len_, long long behav_) {
+ /* Nothing to do */
+}
-+POST_SYSCALL(mprotect)(long res, void *addr_, long len_, long prot_) {}
-+PRE_SYSCALL(madvise)(void *addr_, long len_, long behav_) {
++POST_SYSCALL(madvise)
++(long long res, void *addr_, long long len_, long long behav_) {
+ /* Nothing to do */
+}
-+POST_SYSCALL(madvise)(long res, void *addr_, long len_, long behav_) {}
+/* syscall 76 has been skipped */
+/* syscall 77 has been skipped */
-+PRE_SYSCALL(mincore)(void *addr_, long len_, void *vec_) { /* Nothing to do */ }
-+POST_SYSCALL(mincore)(long res, void *addr_, long len_, void *vec_) {}
-+PRE_SYSCALL(getgroups)(long gidsetsize_, void *gidset_) { /* Nothing to do */ }
-+POST_SYSCALL(getgroups)(long res, long gidsetsize_, void *gidset_) {}
-+PRE_SYSCALL(setgroups)(long gidsetsize_, void *gidset_) {
++PRE_SYSCALL(mincore)(void *addr_, long long len_, void *vec_) {
++ /* Nothing to do */
++}
++POST_SYSCALL(mincore)(long long res, void *addr_, long long len_, void *vec_) {
++ /* Nothing to do */
++}
++PRE_SYSCALL(getgroups)(long long gidsetsize_, void *gidset_) {
++ unsigned int *gidset = (unsigned int *)gidset_;
++ if (gidset) {
++ PRE_WRITE(gidset, sizeof(*gidset) * gidsetsize_);
++ }
++}
++POST_SYSCALL(getgroups)(long long res, long long gidsetsize_, void *gidset_) {
++ if (res == 0) {
++ unsigned int *gidset = (unsigned int *)gidset_;
++ if (gidset) {
++ POST_WRITE(gidset, sizeof(*gidset) * gidsetsize_);
++ }
++ }
++}
++PRE_SYSCALL(setgroups)(long long gidsetsize_, void *gidset_) {
+ unsigned int *gidset = (unsigned int *)gidset_;
+ if (gidset) {
+ PRE_READ(gidset, sizeof(*gidset) * gidsetsize_);
+ }
+}
-+POST_SYSCALL(setgroups)(long res, long gidsetsize_, void *gidset_) {}
++POST_SYSCALL(setgroups)(long long res, long long gidsetsize_, void *gidset_) {
++ if (res == 0) {
++ unsigned int *gidset = (unsigned int *)gidset_;
++ if (gidset) {
++ POST_READ(gidset, sizeof(*gidset) * gidsetsize_);
++ }
++ }
++}
+PRE_SYSCALL(getpgrp)(void) { /* Nothing to do */ }
-+POST_SYSCALL(getpgrp)(long res) {}
-+PRE_SYSCALL(setpgid)(long pid_, long pgid_) { /* Nothing to do */ }
-+POST_SYSCALL(setpgid)(long res, long pid_, long pgid_) {}
-+PRE_SYSCALL(compat_50_setitimer)(long which_, void *itv_, void *oitv_) {
++POST_SYSCALL(getpgrp)(long long res) { /* Nothing to do */ }
++PRE_SYSCALL(setpgid)(long long pid_, long long pgid_) { /* Nothing to do */ }
++POST_SYSCALL(setpgid)(long long res, long long pid_, long long pgid_) {
+ /* Nothing to do */
+}
++PRE_SYSCALL(compat_50_setitimer)(long long which_, void *itv_, void *oitv_) {
++ /* TODO */
++}
+POST_SYSCALL(compat_50_setitimer)
-+(long res, long which_, void *itv_, void *oitv_) {}
-+PRE_SYSCALL(compat_43_owait)(void) { /* Nothing to do */ }
-+POST_SYSCALL(compat_43_owait)(long res) {}
-+PRE_SYSCALL(compat_12_oswapon)(void *name_) {
-+ const char *name = (const char *)name_;
-+ if (name) {
-+ PRE_READ(name, __sanitizer::internal_strlen(name) + 1);
-+ }
++(long long res, long long which_, void *itv_, void *oitv_) {
++ /* TODO */
++}
++PRE_SYSCALL(compat_43_owait)(void) { /* TODO */ }
++POST_SYSCALL(compat_43_owait)(long long res) { /* TODO */ }
++PRE_SYSCALL(compat_12_oswapon)(void *name_) { /* TODO */ }
++POST_SYSCALL(compat_12_oswapon)(long long res, void *name_) { /* TODO */ }
++PRE_SYSCALL(compat_50_getitimer)(long long which_, void *itv_) { /* TODO */ }
++POST_SYSCALL(compat_50_getitimer)(long long res, long long which_, void *itv_) {
++ /* TODO */
+}
-+POST_SYSCALL(compat_12_oswapon)(long res, void *name_) {}
-+PRE_SYSCALL(compat_50_getitimer)(long which_, void *itv_) {
++PRE_SYSCALL(compat_43_ogethostname)(void *hostname_, long long len_) {
++ /* TODO */
++}
++POST_SYSCALL(compat_43_ogethostname)
++(long long res, void *hostname_, long long len_) {
++ /* TODO */
++}
++PRE_SYSCALL(compat_43_osethostname)(void *hostname_, long long len_) {
++ /* TODO */
++}
++POST_SYSCALL(compat_43_osethostname)
++(long long res, void *hostname_, long long len_) {
++ /* TODO */
++}
++PRE_SYSCALL(compat_43_ogetdtablesize)(void) { /* TODO */ }
++POST_SYSCALL(compat_43_ogetdtablesize)(long long res) { /* TODO */ }
++PRE_SYSCALL(dup2)(long long from_, long long to_) { /* Nothing to do */ }
++POST_SYSCALL(dup2)(long long res, long long from_, long long to_) {
+ /* Nothing to do */
+}
-+POST_SYSCALL(compat_50_getitimer)(long res, long which_, void *itv_) {}
-+PRE_SYSCALL(compat_43_ogethostname)(void *hostname_, long len_) {
++/* syscall 91 has been skipped */
++PRE_SYSCALL(fcntl)(long long fd_, long long cmd_, void *arg_) {
+ /* Nothing to do */
+}
-+POST_SYSCALL(compat_43_ogethostname)(long res, void *hostname_, long len_) {}
-+PRE_SYSCALL(compat_43_osethostname)(void *hostname_, long len_) {
++POST_SYSCALL(fcntl)(long long res, long long fd_, long long cmd_, void *arg_) {
+ /* Nothing to do */
+}
-+POST_SYSCALL(compat_43_osethostname)(long res, void *hostname_, long len_) {}
-+PRE_SYSCALL(compat_43_ogetdtablesize)(void) { /* Nothing to do */ }
-+POST_SYSCALL(compat_43_ogetdtablesize)(long res) {}
-+PRE_SYSCALL(dup2)(long from_, long to_) { /* Nothing to do */ }
-+POST_SYSCALL(dup2)(long res, long from_, long to_) {}
-+/* syscall 91 has been skipped */
-+PRE_SYSCALL(fcntl)(long fd_, long cmd_, void *arg_) { /* Nothing to do */ }
-+POST_SYSCALL(fcntl)(long res, long fd_, long cmd_, void *arg_) {}
+PRE_SYSCALL(compat_50_select)
-+(long nd_, void *in_, void *ou_, void *ex_, void *tv_) {
-+ /* Nothing to do */
++(long long nd_, void *in_, void *ou_, void *ex_, void *tv_) {
++ /* TODO */
+}
+POST_SYSCALL(compat_50_select)
-+(long res, long nd_, void *in_, void *ou_, void *ex_, void *tv_) {}
++(long long res, long long nd_, void *in_, void *ou_, void *ex_, void *tv_) {
++ /* TODO */
++}
+/* syscall 94 has been skipped */
-+PRE_SYSCALL(fsync)(long fd_) { /* Nothing to do */ }
-+POST_SYSCALL(fsync)(long res, long fd_) {}
-+PRE_SYSCALL(setpriority)(long which_, long who_, long prio_) {
++PRE_SYSCALL(fsync)(long long fd_) { /* Nothing to do */ }
++POST_SYSCALL(fsync)(long long res, long long fd_) { /* Nothing to do */ }
++PRE_SYSCALL(setpriority)(long long which_, long long who_, long long prio_) {
+ /* Nothing to do */
+}
-+POST_SYSCALL(setpriority)(long res, long which_, long who_, long prio_) {}
-+PRE_SYSCALL(compat_30_socket)(long domain_, long type_, long protocol_) {
++POST_SYSCALL(setpriority)
++(long long res, long long which_, long long who_, long long prio_) {
+ /* Nothing to do */
+}
++PRE_SYSCALL(compat_30_socket)
++(long long domain_, long long type_, long long protocol_) {
++ /* TODO */
++}
+POST_SYSCALL(compat_30_socket)
-+(long res, long domain_, long type_, long protocol_) {}
-+PRE_SYSCALL(connect)(long s_, void *name_, long namelen_) {
-+ /* Nothing to do */
++(long long res, long long domain_, long long type_, long long protocol_) {
++ /* TODO */
+}
-+POST_SYSCALL(connect)(long res, long s_, void *name_, long namelen_) {}
-+PRE_SYSCALL(compat_43_oaccept)(long s_, void *name_, void *anamelen_) {
-+ /* Nothing to do */
++PRE_SYSCALL(connect)(long long s_, void *name_, long long namelen_) {
++ PRE_READ(name_, namelen_);
++}
++POST_SYSCALL(connect)
++(long long res, long long s_, void *name_, long long namelen_) {
++ if (res == 0) {
++ POST_READ(name_, namelen_);
++ }
++}
++PRE_SYSCALL(compat_43_oaccept)(long long s_, void *name_, void *anamelen_) {
++ /* TODO */
+}
+POST_SYSCALL(compat_43_oaccept)
-+(long res, long s_, void *name_, void *anamelen_) {}
-+PRE_SYSCALL(getpriority)(long which_, long who_) { /* Nothing to do */ }
-+POST_SYSCALL(getpriority)(long res, long which_, long who_) {}
-+PRE_SYSCALL(compat_43_osend)(long s_, void *buf_, long len_, long flags_) {
++(long long res, long long s_, void *name_, void *anamelen_) {
++ /* TODO */
++}
++PRE_SYSCALL(getpriority)(long long which_, long long who_) {
+ /* Nothing to do */
+}
-+POST_SYSCALL(compat_43_osend)
-+(long res, long s_, void *buf_, long len_, long flags_) {}
-+PRE_SYSCALL(compat_43_orecv)(long s_, void *buf_, long len_, long flags_) {
++POST_SYSCALL(getpriority)(long long res, long long which_, long long who_) {
+ /* Nothing to do */
+}
++PRE_SYSCALL(compat_43_osend)
++(long long s_, void *buf_, long long len_, long long flags_) {
++ /* TODO */
++}
++POST_SYSCALL(compat_43_osend)
++(long long res, long long s_, void *buf_, long long len_, long long flags_) {
++ /* TODO */
++}
++PRE_SYSCALL(compat_43_orecv)
++(long long s_, void *buf_, long long len_, long long flags_) {
++ /* TODO */
++}
+POST_SYSCALL(compat_43_orecv)
-+(long res, long s_, void *buf_, long len_, long flags_) {}
-+PRE_SYSCALL(compat_13_sigreturn13)(void *sigcntxp_) { /* Missing on amd64? */ }
-+POST_SYSCALL(compat_13_sigreturn13)(long res, void *sigcntxp_) {}
-+PRE_SYSCALL(bind)(long s_, void *name_, long namelen_) { /* Nothing to do */ }
-+POST_SYSCALL(bind)(long res, long s_, void *name_, long namelen_) {}
++(long long res, long long s_, void *buf_, long long len_, long long flags_) {
++ /* TODO */
++}
++PRE_SYSCALL(compat_13_sigreturn13)(void *sigcntxp_) { /* TODO */ }
++POST_SYSCALL(compat_13_sigreturn13)(long long res, void *sigcntxp_) {
++ /* TODO */
++}
++PRE_SYSCALL(bind)(long long s_, void *name_, long long namelen_) {
++ PRE_READ(name_, namelen_);
++}
++POST_SYSCALL(bind)
++(long long res, long long s_, void *name_, long long namelen_) {
++ if (res == 0) {
++ PRE_READ(name_, namelen_);
++ }
++}
+PRE_SYSCALL(setsockopt)
-+(long s_, long level_, long name_, void *val_, long valsize_) {
-+ /* Nothing to do */
++(long long s_, long long level_, long long name_, void *val_,
++ long long valsize_) {
++ if (val_) {
++ PRE_READ(val_, valsize_);
++ }
+}
+POST_SYSCALL(setsockopt)
-+(long res, long s_, long level_, long name_, void *val_, long valsize_) {}
-+PRE_SYSCALL(listen)(long s_, long backlog_) { /* Nothing to do */ }
-+POST_SYSCALL(listen)(long res, long s_, long backlog_) {}
++(long long res, long long s_, long long level_, long long name_, void *val_,
++ long long valsize_) {
++ if (res == 0) {
++ if (val_) {
++ POST_READ(val_, valsize_);
++ }
++ }
++}
++PRE_SYSCALL(listen)(long long s_, long long backlog_) { /* Nothing to do */ }
++POST_SYSCALL(listen)(long long res, long long s_, long long backlog_) {
++ /* Nothing to do */
++}
+/* syscall 107 has been skipped */
-+PRE_SYSCALL(compat_43_osigvec)(long signum_, void *nsv_, void *osv_) {
++PRE_SYSCALL(compat_43_osigvec)(long long signum_, void *nsv_, void *osv_) {
+ /* TODO */
+}
+POST_SYSCALL(compat_43_osigvec)
-+(long res, long signum_, void *nsv_, void *osv_) {}
-+PRE_SYSCALL(compat_43_osigblock)(long mask_) { /* TODO */ }
-+POST_SYSCALL(compat_43_osigblock)(long res, long mask_) {}
-+PRE_SYSCALL(compat_43_osigsetmask)(long mask_) { /* TODO */ }
-+POST_SYSCALL(compat_43_osigsetmask)(long res, long mask_) {}
-+PRE_SYSCALL(compat_13_sigsuspend13)(long mask_) { /* TODO */ }
-+POST_SYSCALL(compat_13_sigsuspend13)(long res, long mask_) {}
++(long long res, long long signum_, void *nsv_, void *osv_) {
++ /* TODO */
++}
++PRE_SYSCALL(compat_43_osigblock)(long long mask_) { /* TODO */ }
++POST_SYSCALL(compat_43_osigblock)(long long res, long long mask_) { /* TODO */ }
++PRE_SYSCALL(compat_43_osigsetmask)(long long mask_) { /* TODO */ }
++POST_SYSCALL(compat_43_osigsetmask)(long long res, long long mask_) {
++ /* TODO */
++}
++PRE_SYSCALL(compat_13_sigsuspend13)(long long mask_) { /* TODO */ }
++POST_SYSCALL(compat_13_sigsuspend13)(long long res, long long mask_) {
++ /* TODO */
++}
+PRE_SYSCALL(compat_43_osigstack)(void *nss_, void *oss_) { /* TODO */ }
-+POST_SYSCALL(compat_43_osigstack)(long res, void *nss_, void *oss_) {}
-+PRE_SYSCALL(compat_43_orecvmsg)(long s_, void *msg_, long flags_) { /* TODO */ }
-+POST_SYSCALL(compat_43_orecvmsg)(long res, long s_, void *msg_, long flags_) {}
-+PRE_SYSCALL(compat_43_osendmsg)(long s_, void *msg_, long flags_) { /* TODO */ }
-+POST_SYSCALL(compat_43_osendmsg)(long res, long s_, void *msg_, long flags_) {}
++POST_SYSCALL(compat_43_osigstack)(long long res, void *nss_, void *oss_) {
++ /* TODO */
++}
++PRE_SYSCALL(compat_43_orecvmsg)(long long s_, void *msg_, long long flags_) {
++ /* TODO */
++}
++POST_SYSCALL(compat_43_orecvmsg)
++(long long res, long long s_, void *msg_, long long flags_) {
++ /* TODO */
++}
++PRE_SYSCALL(compat_43_osendmsg)(long long s_, void *msg_, long long flags_) {
++ /* TODO */
++}
++POST_SYSCALL(compat_43_osendmsg)
++(long long res, long long s_, void *msg_, long long flags_) {
++ /* TODO */
++}
+/* syscall 115 has been skipped */
+PRE_SYSCALL(compat_50_gettimeofday)(void *tp_, void *tzp_) { /* TODO */ }
-+POST_SYSCALL(compat_50_gettimeofday)(long res, void *tp_, void *tzp_) {}
-+PRE_SYSCALL(compat_50_getrusage)(long who_, void *rusage_) { /* TODO */ }
-+POST_SYSCALL(compat_50_getrusage)(long res, long who_, void *rusage_) {}
++POST_SYSCALL(compat_50_gettimeofday)(long long res, void *tp_, void *tzp_) {
++ /* TODO */
++}
++PRE_SYSCALL(compat_50_getrusage)(long long who_, void *rusage_) { /* TODO */ }
++POST_SYSCALL(compat_50_getrusage)
++(long long res, long long who_, void *rusage_) {
++ /* TODO */
++}
+PRE_SYSCALL(getsockopt)
-+(long s_, long level_, long name_, void *val_, void *avalsize_) {
-+ /* Nothing to do */
++(long long s_, long long level_, long long name_, void *val_, void *avalsize_) {
++ /* TODO */
+}
+POST_SYSCALL(getsockopt)
-+(long res, long s_, long level_, long name_, void *val_, void *avalsize_) {}
++(long long res, long long s_, long long level_, long long name_, void *val_,
++ void *avalsize_) {
++ /* TODO */
++}
+/* syscall 119 has been skipped */
-+PRE_SYSCALL(readv)(long fd_, void *iovp_, long iovcnt_) { /* Nothing to do */ }
-+POST_SYSCALL(readv)(long res, long fd_, void *iovp_, long iovcnt_) {}
-+PRE_SYSCALL(writev)(long fd_, void *iovp_, long iovcnt_) { /* Nothing to do */ }
-+POST_SYSCALL(writev)(long res, long fd_, void *iovp_, long iovcnt_) {}
++PRE_SYSCALL(readv)(long long fd_, void *iovp_, long long iovcnt_) {
++ struct __sanitizer_iovec *iovp = (struct __sanitizer_iovec *)iovp_;
++ int i;
++ if (iovp) {
++ PRE_READ(iovp, sizeof(struct __sanitizer_iovec) * iovcnt_);
++ for (i = 0; i < iovcnt_; i++) {
++ PRE_WRITE(iovp[i].iov_base, iovp[i].iov_len);
++ }
++ }
++}
++POST_SYSCALL(readv)
++(long long res, long long fd_, void *iovp_, long long iovcnt_) {
++ struct __sanitizer_iovec *iovp = (struct __sanitizer_iovec *)iovp_;
++ int i;
++ uptr m, n = res;
++ if (res > 0) {
++ if (iovp) {
++ POST_READ(iovp, sizeof(struct __sanitizer_iovec) * iovcnt_);
++ for (i = 0; i < iovcnt_ && n > 0; i++) {
++ m = n > iovp[i].iov_len ? iovp[i].iov_len : n;
++ POST_WRITE(iovp[i].iov_base, m);
++ n -= m;
++ }
++ }
++ }
++}
++PRE_SYSCALL(writev)(long long fd_, void *iovp_, long long iovcnt_) {
++ struct __sanitizer_iovec *iovp = (struct __sanitizer_iovec *)iovp_;
++ int i;
++ if (iovp) {
++ PRE_READ(iovp, sizeof(struct __sanitizer_iovec) * iovcnt_);
++ for (i = 0; i < iovcnt_; i++) {
++ PRE_READ(iovp[i].iov_base, iovp[i].iov_len);
++ }
++ }
++}
++POST_SYSCALL(writev)
++(long long res, long long fd_, void *iovp_, long long iovcnt_) {
++ struct __sanitizer_iovec *iovp = (struct __sanitizer_iovec *)iovp_;
++ int i;
++ uptr m, n = res;
++ if (res > 0) {
++ if (iovp) {
++ POST_READ(iovp, sizeof(struct __sanitizer_iovec) * iovcnt_);
++ for (i = 0; i < iovcnt_ && n > 0; i++) {
++ m = n > iovp[i].iov_len ? iovp[i].iov_len : n;
++ POST_READ(iovp[i].iov_base, m);
++ n -= m;
++ }
++ }
++ }
++}
+PRE_SYSCALL(compat_50_settimeofday)(void *tv_, void *tzp_) { /* TODO */ }
-+POST_SYSCALL(compat_50_settimeofday)(long res, void *tv_, void *tzp_) {}
-+PRE_SYSCALL(fchown)(long fd_, long uid_, long gid_) { /* Nothing to do */ }
-+POST_SYSCALL(fchown)(long res, long fd_, long uid_, long gid_) {}
-+PRE_SYSCALL(fchmod)(long fd_, long mode_) { /* Nothing to do */ }
-+POST_SYSCALL(fchmod)(long res, long fd_, long mode_) {}
++POST_SYSCALL(compat_50_settimeofday)(long long res, void *tv_, void *tzp_) {
++ /* TODO */
++}
++PRE_SYSCALL(fchown)(long long fd_, long long uid_, long long gid_) {
++ /* Nothing to do */
++}
++POST_SYSCALL(fchown)
++(long long res, long long fd_, long long uid_, long long gid_) {
++ /* Nothing to do */
++}
++PRE_SYSCALL(fchmod)(long long fd_, long long mode_) { /* Nothing to do */ }
++POST_SYSCALL(fchmod)(long long res, long long fd_, long long mode_) {
++ /* Nothing to do */
++}
+PRE_SYSCALL(compat_43_orecvfrom)
-+(long s_, void *buf_, long len_, long flags_, void *from_, void *fromlenaddr_) {
++(long long s_, void *buf_, long long len_, long long flags_, void *from_,
++ void *fromlenaddr_) {
+ /* TODO */
+}
+POST_SYSCALL(compat_43_orecvfrom)
-+(long res, long s_, void *buf_, long len_, long flags_, void *from_,
-+ void *fromlenaddr_) {}
-+PRE_SYSCALL(setreuid)(long ruid_, long euid_) { /* Nothing to do */ }
-+POST_SYSCALL(setreuid)(long res, long ruid_, long euid_) {}
-+PRE_SYSCALL(setregid)(long rgid_, long egid_) { /* Nothing to do */ }
-+POST_SYSCALL(setregid)(long res, long rgid_, long egid_) {}
++(long long res, long long s_, void *buf_, long long len_, long long flags_,
++ void *from_, void *fromlenaddr_) {
++ /* TODO */
++}
++PRE_SYSCALL(setreuid)(long long ruid_, long long euid_) { /* Nothing to do */ }
++POST_SYSCALL(setreuid)(long long res, long long ruid_, long long euid_) {
++ /* Nothing to do */
++}
++PRE_SYSCALL(setregid)(long long rgid_, long long egid_) { /* Nothing to do */ }
++POST_SYSCALL(setregid)(long long res, long long rgid_, long long egid_) {
++ /* Nothing to do */
++}
+PRE_SYSCALL(rename)(void *from_, void *to_) {
+ const char *from = (const char *)from_;
+ const char *to = (const char *)to_;
@@ -618,167 +1120,287 @@ $NetBSD$
+ PRE_READ(to, __sanitizer::internal_strlen(to) + 1);
+ }
+}
-+POST_SYSCALL(rename)(long res, void *from_, void *to_) {}
-+PRE_SYSCALL(compat_43_otruncate)(void *path_, long length_) { /* TODO */ }
-+POST_SYSCALL(compat_43_otruncate)(long res, void *path_, long length_) {}
-+PRE_SYSCALL(compat_43_oftruncate)(long fd_, long length_) { /* TODO */ }
-+POST_SYSCALL(compat_43_oftruncate)(long res, long fd_, long length_) {}
-+PRE_SYSCALL(flock)(long fd_, long how_) { /* Nothing to do */ }
-+POST_SYSCALL(flock)(long res, long fd_, long how_) {}
-+PRE_SYSCALL(mkfifo)(void *path_, long mode_) {
++POST_SYSCALL(rename)(long long res, void *from_, void *to_) {
++ if (res == 0) {
++ const char *from = (const char *)from_;
++ const char *to = (const char *)to_;
++ if (from) {
++ POST_READ(from, __sanitizer::internal_strlen(from) + 1);
++ }
++ if (to) {
++ POST_READ(to, __sanitizer::internal_strlen(to) + 1);
++ }
++ }
++}
++PRE_SYSCALL(compat_43_otruncate)(void *path_, long long length_) { /* TODO */ }
++POST_SYSCALL(compat_43_otruncate)
++(long long res, void *path_, long long length_) {
++ /* TODO */
++}
++PRE_SYSCALL(compat_43_oftruncate)(long long fd_, long long length_) {
++ /* TODO */
++}
++POST_SYSCALL(compat_43_oftruncate)
++(long long res, long long fd_, long long length_) {
++ /* TODO */
++}
++PRE_SYSCALL(flock)(long long fd_, long long how_) { /* Nothing to do */ }
++POST_SYSCALL(flock)(long long res, long long fd_, long long how_) {
++ /* Nothing to do */
++}
++PRE_SYSCALL(mkfifo)(void *path_, long long mode_) {
+ const char *path = (const char *)path_;
+ if (path) {
+ PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
+ }
+}
-+POST_SYSCALL(mkfifo)(long res, void *path_, long mode_) {}
++POST_SYSCALL(mkfifo)(long long res, void *path_, long long mode_) {
++ if (res == 0) {
++ const char *path = (const char *)path_;
++ if (path) {
++ POST_READ(path, __sanitizer::internal_strlen(path) + 1);
++ }
++ }
++}
+PRE_SYSCALL(sendto)
-+(long s_, void *buf_, long len_, long flags_, void *to_, long tolen_) {
-+ /* Nothing to do */
++(long long s_, void *buf_, long long len_, long long flags_, void *to_,
++ long long tolen_) {
++ PRE_READ(buf_, len_);
++ PRE_READ(to_, tolen_);
+}
+POST_SYSCALL(sendto)
-+(long res, long s_, void *buf_, long len_, long flags_, void *to_,
-+ long tolen_) {}
-+PRE_SYSCALL(shutdown)(long s_, long how_) { /* Nothing to do */ }
-+POST_SYSCALL(shutdown)(long res, long s_, long how_) {}
-+PRE_SYSCALL(socketpair)(long domain_, long type_, long protocol_, void *rsv_) {
++(long long res, long long s_, void *buf_, long long len_, long long flags_,
++ void *to_, long long tolen_) {
++ if (res >= 0) {
++ POST_READ(buf_, len_);
++ POST_READ(to_, tolen_);
++ }
++}
++PRE_SYSCALL(shutdown)(long long s_, long long how_) { /* Nothing to do */ }
++POST_SYSCALL(shutdown)(long long res, long long s_, long long how_) {
+ /* Nothing to do */
+}
++PRE_SYSCALL(socketpair)
++(long long domain_, long long type_, long long protocol_, void *rsv_) {
++ PRE_WRITE(rsv_, 2 * sizeof(int));
++}
+POST_SYSCALL(socketpair)
-+(long res, long domain_, long type_, long protocol_, void *rsv_) {}
-+PRE_SYSCALL(mkdir)(void *path_, long mode_) {
++(long long res, long long domain_, long long type_, long long protocol_,
++ void *rsv_) {
++ if (res == 0) {
++ POST_WRITE(rsv_, 2 * sizeof(int));
++ }
++}
++PRE_SYSCALL(mkdir)(void *path_, long long mode_) {
+ const char *path = (const char *)path_;
+ if (path) {
+ PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
+ }
+}
-+POST_SYSCALL(mkdir)(long res, void *path_, long mode_) {}
++POST_SYSCALL(mkdir)(long long res, void *path_, long long mode_) {
++ if (res == 0) {
++ const char *path = (const char *)path_;
++ if (path) {
++ POST_READ(path, __sanitizer::internal_strlen(path) + 1);
++ }
++ }
++}
+PRE_SYSCALL(rmdir)(void *path_) {
+ const char *path = (const char *)path_;
+ if (path) {
+ PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
+ }
+}
-+POST_SYSCALL(rmdir)(long res, void *path_) {}
++POST_SYSCALL(rmdir)(long long res, void *path_) {
++ if (res == 0) {
++ const char *path = (const char *)path_;
++ if (path) {
++ POST_READ(path, __sanitizer::internal_strlen(path) + 1);
++ }
++ }
++}
+PRE_SYSCALL(compat_50_utimes)(void *path_, void *tptr_) { /* TODO */ }
-+POST_SYSCALL(compat_50_utimes)(long res, void *path_, void *tptr_) {}
++POST_SYSCALL(compat_50_utimes)(long long res, void *path_, void *tptr_) {
++ /* TODO */
++}
+/* syscall 139 has been skipped */
+PRE_SYSCALL(compat_50_adjtime)(void *delta_, void *olddelta_) { /* TODO */ }
-+POST_SYSCALL(compat_50_adjtime)(long res, void *delta_, void *olddelta_) {}
-+PRE_SYSCALL(compat_43_ogetpeername)(long fdes_, void *asa_, void *alen_) {
++POST_SYSCALL(compat_50_adjtime)(long long res, void *delta_, void *olddelta_) {
++ /* TODO */
++}
++PRE_SYSCALL(compat_43_ogetpeername)(long long fdes_, void *asa_, void *alen_) {
+ /* TODO */
+}
+POST_SYSCALL(compat_43_ogetpeername)
-+(long res, long fdes_, void *asa_, void *alen_) {}
++(long long res, long long fdes_, void *asa_, void *alen_) {
++ /* TODO */
++}
+PRE_SYSCALL(compat_43_ogethostid)(void) { /* TODO */ }
-+POST_SYSCALL(compat_43_ogethostid)(long res) {}
-+PRE_SYSCALL(compat_43_osethostid)(long hostid_) { /* TODO */ }
-+POST_SYSCALL(compat_43_osethostid)(long res, long hostid_) {}
-+PRE_SYSCALL(compat_43_ogetrlimit)(long which_, void *rlp_) { /* TODO */ }
-+POST_SYSCALL(compat_43_ogetrlimit)(long res, long which_, void *rlp_) {}
-+PRE_SYSCALL(compat_43_osetrlimit)(long which_, void *rlp_) { /* TODO */ }
-+POST_SYSCALL(compat_43_osetrlimit)(long res, long which_, void *rlp_) {}
-+PRE_SYSCALL(compat_43_okillpg)(long pgid_, long signum_) { /* TODO */ }
-+POST_SYSCALL(compat_43_okillpg)(long res, long pgid_, long signum_) {}
++POST_SYSCALL(compat_43_ogethostid)(long long res) { /* TODO */ }
++PRE_SYSCALL(compat_43_osethostid)(long long hostid_) { /* TODO */ }
++POST_SYSCALL(compat_43_osethostid)(long long res, long long hostid_) {
++ /* TODO */
++}
++PRE_SYSCALL(compat_43_ogetrlimit)(long long which_, void *rlp_) { /* TODO */ }
++POST_SYSCALL(compat_43_ogetrlimit)
++(long long res, long long which_, void *rlp_) {
++ /* TODO */
++}
++PRE_SYSCALL(compat_43_osetrlimit)(long long which_, void *rlp_) { /* TODO */ }
++POST_SYSCALL(compat_43_osetrlimit)
++(long long res, long long which_, void *rlp_) {
++ /* TODO */
++}
++PRE_SYSCALL(compat_43_okillpg)(long long pgid_, long long signum_) {
++ /* TODO */
++}
++POST_SYSCALL(compat_43_okillpg)
++(long long res, long long pgid_, long long signum_) {
++ /* TODO */
++}
+PRE_SYSCALL(setsid)(void) { /* Nothing to do */ }
-+POST_SYSCALL(setsid)(long res) {}
-+PRE_SYSCALL(compat_50_quotactl)(void *path_, long cmd_, long uid_, void *arg_) {
++POST_SYSCALL(setsid)(long long res) { /* Nothing to do */ }
++PRE_SYSCALL(compat_50_quotactl)
++(void *path_, long long cmd_, long long uid_, void *arg_) {
+ /* TODO */
+}
+POST_SYSCALL(compat_50_quotactl)
-+(long res, void *path_, long cmd_, long uid_, void *arg_) {}
++(long long res, void *path_, long long cmd_, long long uid_, void *arg_) {
++ /* TODO */
++}
+PRE_SYSCALL(compat_43_oquota)(void) { /* TODO */ }
-+POST_SYSCALL(compat_43_oquota)(long res) {}
-+PRE_SYSCALL(compat_43_ogetsockname)(long fdec_, void *asa_, void *alen_) {
++POST_SYSCALL(compat_43_oquota)(long long res) { /* TODO */ }
++PRE_SYSCALL(compat_43_ogetsockname)(long long fdec_, void *asa_, void *alen_) {
+ /* TODO */
+}
+POST_SYSCALL(compat_43_ogetsockname)
-+(long res, long fdec_, void *asa_, void *alen_) {}
++(long long res, long long fdec_, void *asa_, void *alen_) {
++ /* TODO */
++}
+/* syscall 151 has been skipped */
+/* syscall 152 has been skipped */
+/* syscall 153 has been skipped */
+/* syscall 154 has been skipped */
-+PRE_SYSCALL(nfssvc)(long flag_, void *argp_) { /* Nothing to do */ }
-+POST_SYSCALL(nfssvc)(long res, long flag_, void *argp_) {}
++PRE_SYSCALL(nfssvc)(long long flag_, void *argp_) { /* Nothing to do */ }
++POST_SYSCALL(nfssvc)(long long res, long long flag_, void *argp_) {
++ /* Nothing to do */
++}
+PRE_SYSCALL(compat_43_ogetdirentries)
-+(long fd_, void *buf_, long count_, void *basep_) {
++(long long fd_, void *buf_, long long count_, void *basep_) {
+ /* TODO */
+}
+POST_SYSCALL(compat_43_ogetdirentries)
-+(long res, long fd_, void *buf_, long count_, void *basep_) {}
++(long long res, long long fd_, void *buf_, long long count_, void *basep_) {
++ /* TODO */
++}
+PRE_SYSCALL(compat_20_statfs)(void *path_, void *buf_) { /* TODO */ }
-+POST_SYSCALL(compat_20_statfs)(long res, void *path_, void *buf_) {}
-+PRE_SYSCALL(compat_20_fstatfs)(long fd_, void *buf_) { /* TODO */ }
-+POST_SYSCALL(compat_20_fstatfs)(long res, long fd_, void *buf_) {}
++POST_SYSCALL(compat_20_statfs)(long long res, void *path_, void *buf_) {
++ /* TODO */
++}
++PRE_SYSCALL(compat_20_fstatfs)(long long fd_, void *buf_) { /* TODO */ }
++POST_SYSCALL(compat_20_fstatfs)(long long res, long long fd_, void *buf_) {
++ /* TODO */
++}
+/* syscall 159 has been skipped */
+/* syscall 160 has been skipped */
+PRE_SYSCALL(compat_30_getfh)(void *fname_, void *fhp_) { /* TODO */ }
-+POST_SYSCALL(compat_30_getfh)(long res, void *fname_, void *fhp_) {}
-+PRE_SYSCALL(compat_09_ogetdomainname)(void *domainname_, long len_) {
++POST_SYSCALL(compat_30_getfh)(long long res, void *fname_, void *fhp_) {
++ /* TODO */
++}
++PRE_SYSCALL(compat_09_ogetdomainname)(void *domainname_, long long len_) {
+ /* TODO */
+}
+POST_SYSCALL(compat_09_ogetdomainname)
-+(long res, void *domainname_, long len_) {}
-+PRE_SYSCALL(compat_09_osetdomainname)(void *domainname_, long len_) {
++(long long res, void *domainname_, long long len_) {
++ /* TODO */
++}
++PRE_SYSCALL(compat_09_osetdomainname)(void *domainname_, long long len_) {
+ /* TODO */
+}
+POST_SYSCALL(compat_09_osetdomainname)
-+(long res, void *domainname_, long len_) {}
++(long long res, void *domainname_, long long len_) {
++ /* TODO */
++}
+PRE_SYSCALL(compat_09_ouname)(void *name_) { /* TODO */ }
-+POST_SYSCALL(compat_09_ouname)(long res, void *name_) {}
-+PRE_SYSCALL(sysarch)(long op_, void *parms_) { /* TODO */ }
-+POST_SYSCALL(sysarch)(long res, long op_, void *parms_) {}
++POST_SYSCALL(compat_09_ouname)(long long res, void *name_) { /* TODO */ }
++PRE_SYSCALL(sysarch)(long long op_, void *parms_) { /* TODO */ }
++POST_SYSCALL(sysarch)(long long res, long long op_, void *parms_) { /* TODO */ }
+/* syscall 166 has been skipped */
+/* syscall 167 has been skipped */
+/* syscall 168 has been skipped */
+#if !defined(_LP64)
+PRE_SYSCALL(compat_10_osemsys)
-+(long which_, long a2_, long a3_, long a4_, long a5_) {
++(long long which_, long long a2_, long long a3_, long long a4_, long long a5_) {
+ /* TODO */
+}
+POST_SYSCALL(compat_10_osemsys)
-+(long res, long which_, long a2_, long a3_, long a4_, long a5_) {}
++(long long res, long long which_, long long a2_, long long a3_, long long a4_,
++ long long a5_) {
++ /* TODO */
++}
+#else
+/* syscall 169 has been skipped */
+#endif
+#if !defined(_LP64)
+PRE_SYSCALL(compat_10_omsgsys)
-+(long which_, long a2_, long a3_, long a4_, long a5_, long a6_) {
++(long long which_, long long a2_, long long a3_, long long a4_, long long a5_,
++ long long a6_) {
+ /* TODO */
+}
+POST_SYSCALL(compat_10_omsgsys)
-+(long res, long which_, long a2_, long a3_, long a4_, long a5_, long a6_) {}
++(long long res, long long which_, long long a2_, long long a3_, long long a4_,
++ long long a5_, long long a6_) {
++ /* TODO */
++}
+#else
+/* syscall 170 has been skipped */
+#endif
+#if !defined(_LP64)
-+PRE_SYSCALL(compat_10_oshmsys)(long which_, long a2_, long a3_, long a4_) {
++PRE_SYSCALL(compat_10_oshmsys)
++(long long which_, long long a2_, long long a3_, long long a4_) {
+ /* TODO */
+}
+POST_SYSCALL(compat_10_oshmsys)
-+(long res, long which_, long a2_, long a3_, long a4_) {}
++(long long res, long long which_, long long a2_, long long a3_, long long a4_) {
++ /* TODO */
++}
+#else
+/* syscall 171 has been skipped */
+#endif
+/* syscall 172 has been skipped */
-+PRE_SYSCALL(pread)(long fd_, void *buf_, long nbyte_, long PAD_, long offset_) {
-+ /* Nothing to do */
++PRE_SYSCALL(pread)
++(long long fd_, void *buf_, long long nbyte_, long long PAD_,
++ long long offset_) {
++ if (buf_) {
++ PRE_WRITE(buf_, nbyte_);
++ }
+}
+POST_SYSCALL(pread)
-+(long res, long fd_, void *buf_, long nbyte_, long PAD_, long offset_) {}
++(long long res, long long fd_, void *buf_, long long nbyte_, long long PAD_,
++ long long offset_) {
++ if (res > 0) {
++ POST_WRITE(buf_, res);
++ }
++}
+PRE_SYSCALL(pwrite)
-+(long fd_, void *buf_, long nbyte_, long PAD_, long offset_) {
++(long long fd_, void *buf_, long long nbyte_, long long PAD_,
++ long long offset_) {
+ if (buf_) {
+ PRE_READ(buf_, nbyte_);
+ }
+}
+POST_SYSCALL(pwrite)
-+(long res, long fd_, void *buf_, long nbyte_, long PAD_, long offset_) {}
++(long long res, long long fd_, void *buf_, long long nbyte_, long long PAD_,
++ long long offset_) {
++ if (res > 0) {
++ POST_READ(buf_, res);
++ }
++}
+PRE_SYSCALL(compat_30_ntp_gettime)(void *ntvp_) { /* TODO */ }
-+POST_SYSCALL(compat_30_ntp_gettime)(long res, void *ntvp_) {}
++POST_SYSCALL(compat_30_ntp_gettime)(long long res, void *ntvp_) { /* TODO */ }
+#if defined(NTP) || !defined(_KERNEL_OPT)
+PRE_SYSCALL(ntp_adjtime)(void *tp_) { /* Nothing to do */ }
-+POST_SYSCALL(ntp_adjtime)(long res, void *tp_) {}
++POST_SYSCALL(ntp_adjtime)(long long res, void *tp_) { /* Nothing to do */ }
+#else
+/* syscall 176 has been skipped */
+#endif
@@ -786,87 +1408,140 @@ $NetBSD$
+/* syscall 178 has been skipped */
+/* syscall 179 has been skipped */
+/* syscall 180 has been skipped */
-+PRE_SYSCALL(setgid)(long gid_) { /* Nothing to do */ }
-+POST_SYSCALL(setgid)(long res, long gid_) {}
-+PRE_SYSCALL(setegid)(long egid_) { /* Nothing to do */ }
-+POST_SYSCALL(setegid)(long res, long egid_) {}
-+PRE_SYSCALL(seteuid)(long euid_) { /* Nothing to do */ }
-+POST_SYSCALL(seteuid)(long res, long euid_) {}
-+PRE_SYSCALL(lfs_bmapv)(void *fsidp_, void *blkiov_, long blkcnt_) { /* TODO */ }
-+POST_SYSCALL(lfs_bmapv)(long res, void *fsidp_, void *blkiov_, long blkcnt_) {}
-+PRE_SYSCALL(lfs_markv)(void *fsidp_, void *blkiov_, long blkcnt_) { /* TODO */ }
-+POST_SYSCALL(lfs_markv)(long res, void *fsidp_, void *blkiov_, long blkcnt_) {}
-+PRE_SYSCALL(lfs_segclean)(void *fsidp_, long segment_) { /* TODO */ }
-+POST_SYSCALL(lfs_segclean)(long res, void *fsidp_, long segment_) {}
++PRE_SYSCALL(setgid)(long long gid_) { /* Nothing to do */ }
++POST_SYSCALL(setgid)(long long res, long long gid_) { /* Nothing to do */ }
++PRE_SYSCALL(setegid)(long long egid_) { /* Nothing to do */ }
++POST_SYSCALL(setegid)(long long res, long long egid_) { /* Nothing to do */ }
++PRE_SYSCALL(seteuid)(long long euid_) { /* Nothing to do */ }
++POST_SYSCALL(seteuid)(long long res, long long euid_) { /* Nothing to do */ }
++PRE_SYSCALL(lfs_bmapv)(void *fsidp_, void *blkiov_, long long blkcnt_) {
++ /* TODO */
++}
++POST_SYSCALL(lfs_bmapv)
++(long long res, void *fsidp_, void *blkiov_, long long blkcnt_) {
++ /* TODO */
++}
++PRE_SYSCALL(lfs_markv)(void *fsidp_, void *blkiov_, long long blkcnt_) {
++ /* TODO */
++}
++POST_SYSCALL(lfs_markv)
++(long long res, void *fsidp_, void *blkiov_, long long blkcnt_) {
++ /* TODO */
++}
++PRE_SYSCALL(lfs_segclean)(void *fsidp_, long long segment_) { /* TODO */ }
++POST_SYSCALL(lfs_segclean)(long long res, void *fsidp_, long long segment_) {
++ /* TODO */
++}
+PRE_SYSCALL(compat_50_lfs_segwait)(void *fsidp_, void *tv_) { /* TODO */ }
-+POST_SYSCALL(compat_50_lfs_segwait)(long res, void *fsidp_, void *tv_) {}
-+PRE_SYSCALL(compat_12_stat12)(void *path_, void *ub_) {
-+ const char *path = (const char *)path_;
-+ if (path) {
-+ PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
-+ }
++POST_SYSCALL(compat_50_lfs_segwait)(long long res, void *fsidp_, void *tv_) {
++ /* TODO */
++}
++PRE_SYSCALL(compat_12_stat12)(void *path_, void *ub_) { /* TODO */ }
++POST_SYSCALL(compat_12_stat12)(long long res, void *path_, void *ub_) {
++ /* TODO */
++}
++PRE_SYSCALL(compat_12_fstat12)(long long fd_, void *sb_) { /* TODO */ }
++POST_SYSCALL(compat_12_fstat12)(long long res, long long fd_, void *sb_) {
++ /* TODO */
++}
++PRE_SYSCALL(compat_12_lstat12)(void *path_, void *ub_) { /* TODO */ }
++POST_SYSCALL(compat_12_lstat12)(long long res, void *path_, void *ub_) {
++ /* TODO */
+}
-+POST_SYSCALL(compat_12_stat12)(long res, void *path_, void *ub_) {}
-+PRE_SYSCALL(compat_12_fstat12)(long fd_, void *sb_) { /* Nothing to do */ }
-+POST_SYSCALL(compat_12_fstat12)(long res, long fd_, void *sb_) {}
-+PRE_SYSCALL(compat_12_lstat12)(void *path_, void *ub_) {
++PRE_SYSCALL(pathconf)(void *path_, long long name_) {
+ const char *path = (const char *)path_;
+ if (path) {
+ PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
+ }
+}
-+POST_SYSCALL(compat_12_lstat12)(long res, void *path_, void *ub_) {}
-+PRE_SYSCALL(pathconf)(void *path_, long name_) {
-+ const char *path = (const char *)path_;
-+ if (path) {
-+ PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
++POST_SYSCALL(pathconf)(long long res, void *path_, long long name_) {
++ if (res != -1) {
++ const char *path = (const char *)path_;
++ if (path) {
++ POST_READ(path, __sanitizer::internal_strlen(path) + 1);
++ }
+ }
+}
-+POST_SYSCALL(pathconf)(long res, void *path_, long name_) {}
-+PRE_SYSCALL(fpathconf)(long fd_, long name_) { /* Nothing to do */ }
-+POST_SYSCALL(fpathconf)(long res, long fd_, long name_) {}
++PRE_SYSCALL(fpathconf)(long long fd_, long long name_) { /* Nothing to do */ }
++POST_SYSCALL(fpathconf)(long long res, long long fd_, long long name_) {
++ /* Nothing to do */
++}
+/* syscall 193 has been skipped */
-+PRE_SYSCALL(getrlimit)(long which_, void *rlp_) { /* Nothing to do */ }
-+POST_SYSCALL(getrlimit)(long res, long which_, void *rlp_) {}
-+PRE_SYSCALL(setrlimit)(long which_, void *rlp_) { /* Nothing to do */ }
-+POST_SYSCALL(setrlimit)(long res, long which_, void *rlp_) {}
++PRE_SYSCALL(getrlimit)(long long which_, void *rlp_) {
++ PRE_WRITE(rlp_, struct_rlimit_sz);
++}
++POST_SYSCALL(getrlimit)(long long res, long long which_, void *rlp_) {
++ if (res == 0) {
++ POST_WRITE(rlp_, struct_rlimit_sz);
++ }
++}
++PRE_SYSCALL(setrlimit)(long long which_, void *rlp_) {
++ PRE_READ(rlp_, struct_rlimit_sz);
++}
++POST_SYSCALL(setrlimit)(long long res, long long which_, void *rlp_) {
++ if (res == 0) {
++ POST_READ(rlp_, struct_rlimit_sz);
++ }
++}
+PRE_SYSCALL(compat_12_getdirentries)
-+(long fd_, void *buf_, long count_, void *basep_) {
++(long long fd_, void *buf_, long long count_, void *basep_) {
+ /* TODO */
+}
+POST_SYSCALL(compat_12_getdirentries)
-+(long res, long fd_, void *buf_, long count_, void *basep_) {}
++(long long res, long long fd_, void *buf_, long long count_, void *basep_) {
++ /* TODO */
++}
+PRE_SYSCALL(mmap)
-+(void *addr_, long len_, long prot_, long flags_, long fd_, long PAD_,
-+ long pos_) {
++(void *addr_, long long len_, long long prot_, long long flags_, long long fd_,
++ long long PAD_, long long pos_) {
+ /* Nothing to do */
+}
+POST_SYSCALL(mmap)
-+(long res, void *addr_, long len_, long prot_, long flags_, long fd_, long PAD_,
-+ long pos_) {}
-+PRE_SYSCALL(__syscall)(long code_, long args_[SYS_MAXSYSARGS]) {
++(long long res, void *addr_, long long len_, long long prot_, long long flags_,
++ long long fd_, long long PAD_, long long pos_) {
++ /* Nothing to do */
++}
++PRE_SYSCALL(__syscall)(long long code_, long long args_[SYS_MAXSYSARGS]) {
++ /* Nothing to do */
++}
++POST_SYSCALL(__syscall)
++(long long res, long long code_, long long args_[SYS_MAXSYSARGS]) {
+ /* Nothing to do */
+}
-+POST_SYSCALL(__syscall)(long res, long code_, long args_[SYS_MAXSYSARGS]) {}
-+PRE_SYSCALL(lseek)(long fd_, long PAD_, long offset_, long whence_) {
++PRE_SYSCALL(lseek)
++(long long fd_, long long PAD_, long long offset_, long long whence_) {
+ /* Nothing to do */
+}
+POST_SYSCALL(lseek)
-+(long res, long fd_, long PAD_, long offset_, long whence_) {}
-+PRE_SYSCALL(truncate)(void *path_, long PAD_, long length_) {
++(long long res, long long fd_, long long PAD_, long long offset_,
++ long long whence_) {
++ /* Nothing to do */
++}
++PRE_SYSCALL(truncate)(void *path_, long long PAD_, long long length_) {
+ const char *path = (const char *)path_;
+ if (path) {
+ PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
+ }
+}
-+POST_SYSCALL(truncate)(long res, void *path_, long PAD_, long length_) {}
-+PRE_SYSCALL(ftruncate)(long fd_, long PAD_, long length_) {
++POST_SYSCALL(truncate)
++(long long res, void *path_, long long PAD_, long long length_) {
++ if (res == 0) {
++ const char *path = (const char *)path_;
++ if (path) {
++ POST_READ(path, __sanitizer::internal_strlen(path) + 1);
++ }
++ }
++}
++PRE_SYSCALL(ftruncate)(long long fd_, long long PAD_, long long length_) {
++ /* Nothing to do */
++}
++POST_SYSCALL(ftruncate)
++(long long res, long long fd_, long long PAD_, long long length_) {
+ /* Nothing to do */
+}
-+POST_SYSCALL(ftruncate)(long res, long fd_, long PAD_, long length_) {}
+PRE_SYSCALL(__sysctl)
-+(void *name_, long namelen_, void *oldv_, void *oldlenp_, void *newv_,
-+ long newlen_) {
++(void *name_, long long namelen_, void *oldv_, void *oldlenp_, void *newv_,
++ long long newlen_) {
+ const int *name = (const int *)name_;
+ if (name) {
+ PRE_READ(name, namelen_ * sizeof(*name));
@@ -876,39 +1551,76 @@ $NetBSD$
+ }
+}
+POST_SYSCALL(__sysctl)
-+(long res, void *name_, long namelen_, void *oldv_, void *oldlenp_, void *newv_,
-+ long newlen_) {}
-+PRE_SYSCALL(mlock)(void *addr_, long len_) { /* Nothing to do */ }
-+POST_SYSCALL(mlock)(long res, void *addr_, long len_) {}
-+PRE_SYSCALL(munlock)(void *addr_, long len_) { /* Nothing to do */ }
-+POST_SYSCALL(munlock)(long res, void *addr_, long len_) {}
++(long long res, void *name_, long long namelen_, void *oldv_, void *oldlenp_,
++ void *newv_, long long newlen_) {
++ if (res == 0) {
++ const int *name = (const int *)name_;
++ if (name) {
++ POST_READ(name, namelen_ * sizeof(*name));
++ }
++ if (newv_) {
++ POST_READ(name, newlen_);
++ }
++ }
++}
++PRE_SYSCALL(mlock)(void *addr_, long long len_) { /* Nothing to do */ }
++POST_SYSCALL(mlock)(long long res, void *addr_, long long len_) {
++ /* Nothing to do */
++}
++PRE_SYSCALL(munlock)(void *addr_, long long len_) { /* Nothing to do */ }
++POST_SYSCALL(munlock)(long long res, void *addr_, long long len_) {
++ /* Nothing to do */
++}
+PRE_SYSCALL(undelete)(void *path_) {
+ const char *path = (const char *)path_;
+ if (path) {
+ PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
+ }
+}
-+POST_SYSCALL(undelete)(long res, void *path_) {}
-+PRE_SYSCALL(compat_50_futimes)(long fd_, void *tptr_) { /* TODO */ }
-+POST_SYSCALL(compat_50_futimes)(long res, long fd_, void *tptr_) {}
-+PRE_SYSCALL(getpgid)(long pid_) { /* Nothing to do */ }
-+POST_SYSCALL(getpgid)(long res, long pid_) {}
-+PRE_SYSCALL(reboot)(long opt_, void *bootstr_) {
++POST_SYSCALL(undelete)(long long res, void *path_) {
++ if (res == 0) {
++ const char *path = (const char *)path_;
++ if (path) {
++ POST_READ(path, __sanitizer::internal_strlen(path) + 1);
++ }
++ }
++}
++PRE_SYSCALL(compat_50_futimes)(long long fd_, void *tptr_) { /* TODO */ }
++POST_SYSCALL(compat_50_futimes)(long long res, long long fd_, void *tptr_) {
++ /* TODO */
++}
++PRE_SYSCALL(getpgid)(long long pid_) { /* Nothing to do */ }
++POST_SYSCALL(getpgid)(long long res, long long pid_) { /* Nothing to do */ }
++PRE_SYSCALL(reboot)(long long opt_, void *bootstr_) {
+ const char *bootstr = (const char *)bootstr_;
+ if (bootstr) {
+ PRE_READ(bootstr, __sanitizer::internal_strlen(bootstr) + 1);
+ }
+}
-+POST_SYSCALL(reboot)(long res, long opt_, void *bootstr_) {}
-+PRE_SYSCALL(poll)(void *fds_, long nfds_, long timeout_) { /* Nothing to do */ }
-+POST_SYSCALL(poll)(long res, void *fds_, long nfds_, long timeout_) {}
++POST_SYSCALL(reboot)(long long res, long long opt_, void *bootstr_) {
++ /* This call should never return */
++ const char *bootstr = (const char *)bootstr_;
++ if (bootstr) {
++ POST_READ(bootstr, __sanitizer::internal_strlen(bootstr) + 1);
++ }
++}
++PRE_SYSCALL(poll)(void *fds_, long long nfds_, long long timeout_) {
++ /* Nothing to do */
++}
++POST_SYSCALL(poll)
++(long long res, void *fds_, long long nfds_, long long timeout_) {
++ /* Nothing to do */
++}
+PRE_SYSCALL(afssys)
-+(long id_, long a1_, long a2_, long a3_, long a4_, long a5_, long a6_) {
++(long long id_, long long a1_, long long a2_, long long a3_, long long a4_,
++ long long a5_, long long a6_) {
+ /* TODO */
+}
+POST_SYSCALL(afssys)
-+(long res, long id_, long a1_, long a2_, long a3_, long a4_, long a5_,
-+ long a6_) {}
++(long long res, long long id_, long long a1_, long long a2_, long long a3_,
++ long long a4_, long long a5_, long long a6_) {
++ /* TODO */
++}
+/* syscall 211 has been skipped */
+/* syscall 212 has been skipped */
+/* syscall 213 has been skipped */
@@ -919,190 +1631,310 @@ $NetBSD$
+/* syscall 218 has been skipped */
+/* syscall 219 has been skipped */
+PRE_SYSCALL(compat_14___semctl)
-+(long semid_, long semnum_, long cmd_, void *arg_) {
++(long long semid_, long long semnum_, long long cmd_, void *arg_) {
+ /* TODO */
+}
+POST_SYSCALL(compat_14___semctl)
-+(long res, long semid_, long semnum_, long cmd_, void *arg_) {}
-+PRE_SYSCALL(semget)(long key_, long nsems_, long semflg_) {
++(long long res, long long semid_, long long semnum_, long long cmd_,
++ void *arg_) {
++ /* TODO */
++}
++PRE_SYSCALL(semget)(long long key_, long long nsems_, long long semflg_) {
++ /* Nothing to do */
++}
++POST_SYSCALL(semget)
++(long long res, long long key_, long long nsems_, long long semflg_) {
+ /* Nothing to do */
+}
-+POST_SYSCALL(semget)(long res, long key_, long nsems_, long semflg_) {}
-+PRE_SYSCALL(semop)(long semid_, void *sops_, long nsops_) {
++PRE_SYSCALL(semop)(long long semid_, void *sops_, long long nsops_) {
++ if (sops_) {
++ PRE_READ(sops_, nsops_ * struct_sembuf_sz);
++ }
++}
++POST_SYSCALL(semop)
++(long long res, long long semid_, void *sops_, long long nsops_) {
++ if (res == 0) {
++ if (sops_) {
++ POST_READ(sops_, nsops_ * struct_sembuf_sz);
++ }
++ }
++}
++PRE_SYSCALL(semconfig)(long long flag_) { /* Nothing to do */ }
++POST_SYSCALL(semconfig)(long long res, long long flag_) { /* Nothing to do */ }
++PRE_SYSCALL(compat_14_msgctl)(long long msqid_, long long cmd_, void *buf_) {
++ /* TODO */
++}
++POST_SYSCALL(compat_14_msgctl)
++(long long res, long long msqid_, long long cmd_, void *buf_) {
++ /* TODO */
++}
++PRE_SYSCALL(msgget)(long long key_, long long msgflg_) { /* Nothing to do */ }
++POST_SYSCALL(msgget)(long long res, long long key_, long long msgflg_) {
+ /* Nothing to do */
+}
-+POST_SYSCALL(semop)(long res, long semid_, void *sops_, long nsops_) {}
-+PRE_SYSCALL(semconfig)(long flag_) { /* Nothing to do */ }
-+POST_SYSCALL(semconfig)(long res, long flag_) {}
-+PRE_SYSCALL(compat_14_msgctl)(long msqid_, long cmd_, void *buf_) { /* TODO */ }
-+POST_SYSCALL(compat_14_msgctl)(long res, long msqid_, long cmd_, void *buf_) {}
-+PRE_SYSCALL(msgget)(long key_, long msgflg_) { /* Nothing to do */ }
-+POST_SYSCALL(msgget)(long res, long key_, long msgflg_) {}
-+PRE_SYSCALL(msgsnd)(long msqid_, void *msgp_, long msgsz_, long msgflg_) {
++PRE_SYSCALL(msgsnd)
++(long long msqid_, void *msgp_, long long msgsz_, long long msgflg_) {
+ if (msgp_) {
+ PRE_READ(msgp_, msgsz_);
+ }
+}
+POST_SYSCALL(msgsnd)
-+(long res, long msqid_, void *msgp_, long msgsz_, long msgflg_) {}
++(long long res, long long msqid_, void *msgp_, long long msgsz_,
++ long long msgflg_) {
++ if (res == 0) {
++ if (msgp_) {
++ POST_READ(msgp_, msgsz_);
++ }
++ }
++}
+PRE_SYSCALL(msgrcv)
-+(long msqid_, void *msgp_, long msgsz_, long msgtyp_, long msgflg_) {
++(long long msqid_, void *msgp_, long long msgsz_, long long msgtyp_,
++ long long msgflg_) {
+ /* Nothing to do */
+}
+POST_SYSCALL(msgrcv)
-+(long res, long msqid_, void *msgp_, long msgsz_, long msgtyp_, long msgflg_) {}
-+PRE_SYSCALL(shmat)(long shmid_, void *shmaddr_, long shmflg_) {
++(long long res, long long msqid_, void *msgp_, long long msgsz_,
++ long long msgtyp_, long long msgflg_) {
++ /* Nothing to do */
++}
++PRE_SYSCALL(shmat)(long long shmid_, void *shmaddr_, long long shmflg_) {
++ /* Nothing to do */
++}
++POST_SYSCALL(shmat)
++(long long res, long long shmid_, void *shmaddr_, long long shmflg_) {
+ /* Nothing to do */
+}
-+POST_SYSCALL(shmat)(long res, long shmid_, void *shmaddr_, long shmflg_) {}
-+PRE_SYSCALL(compat_14_shmctl)(long shmid_, long cmd_, void *buf_) { /* TODO */ }
-+POST_SYSCALL(compat_14_shmctl)(long res, long shmid_, long cmd_, void *buf_) {}
++PRE_SYSCALL(compat_14_shmctl)(long long shmid_, long long cmd_, void *buf_) {
++ /* TODO */
++}
++POST_SYSCALL(compat_14_shmctl)
++(long long res, long long shmid_, long long cmd_, void *buf_) {
++ /* TODO */
++}
+PRE_SYSCALL(shmdt)(void *shmaddr_) { /* Nothing to do */ }
-+POST_SYSCALL(shmdt)(long res, void *shmaddr_) {}
-+PRE_SYSCALL(shmget)(long key_, long size_, long shmflg_) { /* Nothing to do */ }
-+POST_SYSCALL(shmget)(long res, long key_, long size_, long shmflg_) {}
-+PRE_SYSCALL(compat_50_clock_gettime)(long clock_id_, void *tp_) { /* TODO */ }
-+POST_SYSCALL(compat_50_clock_gettime)(long res, long clock_id_, void *tp_) {}
-+PRE_SYSCALL(compat_50_clock_settime)(long clock_id_, void *tp_) { /* TODO */ }
-+POST_SYSCALL(compat_50_clock_settime)(long res, long clock_id_, void *tp_) {}
-+PRE_SYSCALL(compat_50_clock_getres)(long clock_id_, void *tp_) { /* TODO */ }
-+POST_SYSCALL(compat_50_clock_getres)(long res, long clock_id_, void *tp_) {}
-+PRE_SYSCALL(timer_create)(long clock_id_, void *evp_, void *timerid_) {
++POST_SYSCALL(shmdt)(long long res, void *shmaddr_) { /* Nothing to do */ }
++PRE_SYSCALL(shmget)(long long key_, long long size_, long long shmflg_) {
++ /* Nothing to do */
++}
++POST_SYSCALL(shmget)
++(long long res, long long key_, long long size_, long long shmflg_) {
++ /* Nothing to do */
++}
++PRE_SYSCALL(compat_50_clock_gettime)(long long clock_id_, void *tp_) {
++ /* TODO */
++}
++POST_SYSCALL(compat_50_clock_gettime)
++(long long res, long long clock_id_, void *tp_) {
++ /* TODO */
++}
++PRE_SYSCALL(compat_50_clock_settime)(long long clock_id_, void *tp_) {
++ /* TODO */
++}
++POST_SYSCALL(compat_50_clock_settime)
++(long long res, long long clock_id_, void *tp_) {
++ /* TODO */
++}
++PRE_SYSCALL(compat_50_clock_getres)(long long clock_id_, void *tp_) {
++ /* TODO */
++}
++POST_SYSCALL(compat_50_clock_getres)
++(long long res, long long clock_id_, void *tp_) {
++ /* TODO */
++}
++PRE_SYSCALL(timer_create)(long long clock_id_, void *evp_, void *timerid_) {
+ /* Nothing to do */
+}
+POST_SYSCALL(timer_create)
-+(long res, long clock_id_, void *evp_, void *timerid_) {}
-+PRE_SYSCALL(timer_delete)(long timerid_) { /* Nothing to do */ }
-+POST_SYSCALL(timer_delete)(long res, long timerid_) {}
++(long long res, long long clock_id_, void *evp_, void *timerid_) {
++ /* Nothing to do */
++}
++PRE_SYSCALL(timer_delete)(long long timerid_) { /* Nothing to do */ }
++POST_SYSCALL(timer_delete)(long long res, long long timerid_) {
++ /* Nothing to do */
++}
+PRE_SYSCALL(compat_50_timer_settime)
-+(long timerid_, long flags_, void *value_, void *ovalue_) {
++(long long timerid_, long long flags_, void *value_, void *ovalue_) {
+ /* TODO */
+}
+POST_SYSCALL(compat_50_timer_settime)
-+(long res, long timerid_, long flags_, void *value_, void *ovalue_) {}
-+PRE_SYSCALL(compat_50_timer_gettime)(long timerid_, void *value_) { /* TODO */ }
-+POST_SYSCALL(compat_50_timer_gettime)(long res, long timerid_, void *value_) {}
-+PRE_SYSCALL(timer_getoverrun)(long timerid_) { /* Nothing to do */ }
-+POST_SYSCALL(timer_getoverrun)(long res, long timerid_) {}
++(long long res, long long timerid_, long long flags_, void *value_,
++ void *ovalue_) {
++ /* TODO */
++}
++PRE_SYSCALL(compat_50_timer_gettime)(long long timerid_, void *value_) {
++ /* TODO */
++}
++POST_SYSCALL(compat_50_timer_gettime)
++(long long res, long long timerid_, void *value_) {
++ /* TODO */
++}
++PRE_SYSCALL(timer_getoverrun)(long long timerid_) { /* Nothing to do */ }
++POST_SYSCALL(timer_getoverrun)(long long res, long long timerid_) {
++ /* Nothing to do */
++}
+PRE_SYSCALL(compat_50_nanosleep)(void *rqtp_, void *rmtp_) { /* TODO */ }
-+POST_SYSCALL(compat_50_nanosleep)(long res, void *rqtp_, void *rmtp_) {}
-+PRE_SYSCALL(fdatasync)(long fd_) { /* Nothing to do */ }
-+POST_SYSCALL(fdatasync)(long res, long fd_) {}
-+PRE_SYSCALL(mlockall)(long flags_) { /* Nothing to do */ }
-+POST_SYSCALL(mlockall)(long res, long flags_) {}
++POST_SYSCALL(compat_50_nanosleep)(long long res, void *rqtp_, void *rmtp_) {
++ /* TODO */
++}
++PRE_SYSCALL(fdatasync)(long long fd_) { /* Nothing to do */ }
++POST_SYSCALL(fdatasync)(long long res, long long fd_) { /* Nothing to do */ }
++PRE_SYSCALL(mlockall)(long long flags_) { /* Nothing to do */ }
++POST_SYSCALL(mlockall)(long long res, long long flags_) { /* Nothing to do */ }
+PRE_SYSCALL(munlockall)(void) { /* Nothing to do */ }
-+POST_SYSCALL(munlockall)(long res) {}
++POST_SYSCALL(munlockall)(long long res) { /* Nothing to do */ }
+PRE_SYSCALL(compat_50___sigtimedwait)(void *set_, void *info_, void *timeout_) {
+ /* TODO */
+}
+POST_SYSCALL(compat_50___sigtimedwait)
-+(long res, void *set_, void *info_, void *timeout_) {}
-+PRE_SYSCALL(sigqueueinfo)(long pid_, void *info_) {
++(long long res, void *set_, void *info_, void *timeout_) {
++ /* TODO */
++}
++PRE_SYSCALL(sigqueueinfo)(long long pid_, void *info_) {
+ if (info_) {
+ PRE_READ(info_, siginfo_t_sz);
+ }
+}
-+POST_SYSCALL(sigqueueinfo)(long res, long pid_, void *info_) {}
-+PRE_SYSCALL(modctl)(long cmd_, void *arg_) { /* TODO */ }
-+POST_SYSCALL(modctl)(long res, long cmd_, void *arg_) {}
-+PRE_SYSCALL(_ksem_init)(long value_, void *idp_) {}
-+POST_SYSCALL(_ksem_init)(long res, long value_, void *idp_) {}
++POST_SYSCALL(sigqueueinfo)(long long res, long long pid_, void *info_) {}
++PRE_SYSCALL(modctl)(long long cmd_, void *arg_) { /* TODO */ }
++POST_SYSCALL(modctl)(long long res, long long cmd_, void *arg_) { /* TODO */ }
++PRE_SYSCALL(_ksem_init)(long long value_, void *idp_) { /* Nothing to do */ }
++POST_SYSCALL(_ksem_init)(long long res, long long value_, void *idp_) {
++ /* Nothing to do */
++}
+PRE_SYSCALL(_ksem_open)
-+(void *name_, long oflag_, long mode_, long value_, void *idp_) {
++(void *name_, long long oflag_, long long mode_, long long value_, void *idp_) {
+ const char *name = (const char *)name_;
+ if (name) {
+ PRE_READ(name, __sanitizer::internal_strlen(name) + 1);
+ }
+}
+POST_SYSCALL(_ksem_open)
-+(long res, void *name_, long oflag_, long mode_, long value_, void *idp_) {}
++(long long res, void *name_, long long oflag_, long long mode_,
++ long long value_, void *idp_) {
++ const char *name = (const char *)name_;
++ if (name) {
++ POST_READ(name, __sanitizer::internal_strlen(name) + 1);
++ }
++}
+PRE_SYSCALL(_ksem_unlink)(void *name_) {
+ const char *name = (const char *)name_;
+ if (name) {
+ PRE_READ(name, __sanitizer::internal_strlen(name) + 1);
+ }
+}
-+POST_SYSCALL(_ksem_unlink)(long res, void *name_) {}
-+PRE_SYSCALL(_ksem_close)(long id_) { /* Nothing to do */ }
-+POST_SYSCALL(_ksem_close)(long res, long id_) {}
-+PRE_SYSCALL(_ksem_post)(long id_) { /* Nothing to do */ }
-+POST_SYSCALL(_ksem_post)(long res, long id_) {}
-+PRE_SYSCALL(_ksem_wait)(long id_) { /* Nothing to do */ }
-+POST_SYSCALL(_ksem_wait)(long res, long id_) {}
-+PRE_SYSCALL(_ksem_trywait)(long id_) { /* Nothing to do */ }
-+POST_SYSCALL(_ksem_trywait)(long res, long id_) {}
-+PRE_SYSCALL(_ksem_getvalue)(long id_, void *value_) { /* Nothing to do */ }
-+POST_SYSCALL(_ksem_getvalue)(long res, long id_, void *value_) {}
-+PRE_SYSCALL(_ksem_destroy)(long id_) { /* Nothing to do */ }
-+POST_SYSCALL(_ksem_destroy)(long res, long id_) {}
-+PRE_SYSCALL(_ksem_timedwait)(long id_, void *abstime_) {
++POST_SYSCALL(_ksem_unlink)(long long res, void *name_) {
++ const char *name = (const char *)name_;
++ if (name) {
++ POST_READ(name, __sanitizer::internal_strlen(name) + 1);
++ }
++}
++PRE_SYSCALL(_ksem_close)(long long id_) { /* Nothing to do */ }
++POST_SYSCALL(_ksem_close)(long long res, long long id_) { /* Nothing to do */ }
++PRE_SYSCALL(_ksem_post)(long long id_) { /* Nothing to do */ }
++POST_SYSCALL(_ksem_post)(long long res, long long id_) { /* Nothing to do */ }
++PRE_SYSCALL(_ksem_wait)(long long id_) { /* Nothing to do */ }
++POST_SYSCALL(_ksem_wait)(long long res, long long id_) { /* Nothing to do */ }
++PRE_SYSCALL(_ksem_trywait)(long long id_) { /* Nothing to do */ }
++POST_SYSCALL(_ksem_trywait)(long long res, long long id_) {
++ /* Nothing to do */
++}
++PRE_SYSCALL(_ksem_getvalue)(long long id_, void *value_) { /* Nothing to do */ }
++POST_SYSCALL(_ksem_getvalue)(long long res, long long id_, void *value_) {
++ /* Nothing to do */
++}
++PRE_SYSCALL(_ksem_destroy)(long long id_) { /* Nothing to do */ }
++POST_SYSCALL(_ksem_destroy)(long long res, long long id_) {
++ /* Nothing to do */
++}
++PRE_SYSCALL(_ksem_timedwait)(long long id_, void *abstime_) {
+ if (abstime_) {
+ PRE_READ(abstime_, struct_timespec_sz);
+ }
+}
-+POST_SYSCALL(_ksem_timedwait)(long res, long id_, void *abstime_) {}
-+PRE_SYSCALL(mq_open)(void *name_, long oflag_, long mode_, void *attr_) {
++POST_SYSCALL(_ksem_timedwait)(long long res, long long id_, void *abstime_) {}
++PRE_SYSCALL(mq_open)
++(void *name_, long long oflag_, long long mode_, void *attr_) {
+ const char *name = (const char *)name_;
+ if (name) {
+ PRE_READ(name, __sanitizer::internal_strlen(name) + 1);
+ }
+}
+POST_SYSCALL(mq_open)
-+(long res, void *name_, long oflag_, long mode_, void *attr_) {}
-+PRE_SYSCALL(mq_close)(long mqdes_) { /* Nothing to do */ }
-+POST_SYSCALL(mq_close)(long res, long mqdes_) {}
++(long long res, void *name_, long long oflag_, long long mode_, void *attr_) {
++ const char *name = (const char *)name_;
++ if (name) {
++ POST_READ(name, __sanitizer::internal_strlen(name) + 1);
++ }
++}
++PRE_SYSCALL(mq_close)(long long mqdes_) { /* Nothing to do */ }
++POST_SYSCALL(mq_close)(long long res, long long mqdes_) { /* Nothing to do */ }
+PRE_SYSCALL(mq_unlink)(void *name_) {
+ const char *name = (const char *)name_;
+ if (name) {
+ PRE_READ(name, __sanitizer::internal_strlen(name) + 1);
+ }
+}
-+POST_SYSCALL(mq_unlink)(long res, void *name_) {}
-+PRE_SYSCALL(mq_getattr)(long mqdes_, void *mqstat_) { /* Nothing to do */ }
-+POST_SYSCALL(mq_getattr)(long res, long mqdes_, void *mqstat_) {}
-+PRE_SYSCALL(mq_setattr)(long mqdes_, void *mqstat_, void *omqstat_) {
++POST_SYSCALL(mq_unlink)(long long res, void *name_) {
++ const char *name = (const char *)name_;
++ if (name) {
++ POST_READ(name, __sanitizer::internal_strlen(name) + 1);
++ }
++}
++PRE_SYSCALL(mq_getattr)(long long mqdes_, void *mqstat_) { /* Nothing to do */ }
++POST_SYSCALL(mq_getattr)(long long res, long long mqdes_, void *mqstat_) {
++ /* Nothing to do */
++}
++PRE_SYSCALL(mq_setattr)(long long mqdes_, void *mqstat_, void *omqstat_) {
+ if (mqstat_) {
+ PRE_READ(mqstat_, struct_mq_attr_sz);
+ }
+}
+POST_SYSCALL(mq_setattr)
-+(long res, long mqdes_, void *mqstat_, void *omqstat_) {}
-+PRE_SYSCALL(mq_notify)(long mqdes_, void *notification_) {
++(long long res, long long mqdes_, void *mqstat_, void *omqstat_) {}
++PRE_SYSCALL(mq_notify)(long long mqdes_, void *notification_) {
+ if (notification_) {
+ PRE_READ(notification_, struct_sigevent_sz);
+ }
+}
-+POST_SYSCALL(mq_notify)(long res, long mqdes_, void *notification_) {}
++POST_SYSCALL(mq_notify)(long long res, long long mqdes_, void *notification_) {}
+PRE_SYSCALL(mq_send)
-+(long mqdes_, void *msg_ptr_, long msg_len_, long msg_prio_) {
++(long long mqdes_, void *msg_ptr_, long long msg_len_, long long msg_prio_) {
+ if (msg_ptr_) {
+ PRE_READ(msg_ptr_, msg_len_);
+ }
+}
+POST_SYSCALL(mq_send)
-+(long res, long mqdes_, void *msg_ptr_, long msg_len_, long msg_prio_) {}
++(long long res, long long mqdes_, void *msg_ptr_, long long msg_len_,
++ long long msg_prio_) {}
+PRE_SYSCALL(mq_receive)
-+(long mqdes_, void *msg_ptr_, long msg_len_, void *msg_prio_) {
++(long long mqdes_, void *msg_ptr_, long long msg_len_, void *msg_prio_) {
+ /* Nothing to do */
+}
+POST_SYSCALL(mq_receive)
-+(long res, long mqdes_, void *msg_ptr_, long msg_len_, void *msg_prio_) {}
++(long long res, long long mqdes_, void *msg_ptr_, long long msg_len_,
++ void *msg_prio_) {
++ /* Nothing to do */
++}
+PRE_SYSCALL(compat_50_mq_timedsend)
-+(long mqdes_, void *msg_ptr_, long msg_len_, long msg_prio_,
++(long long mqdes_, void *msg_ptr_, long long msg_len_, long long msg_prio_,
+ void *abs_timeout_) {
+ /* TODO */
+}
+POST_SYSCALL(compat_50_mq_timedsend)
-+(long res, long mqdes_, void *msg_ptr_, long msg_len_, long msg_prio_,
-+ void *abs_timeout_) {}
++(long long res, long long mqdes_, void *msg_ptr_, long long msg_len_,
++ long long msg_prio_, void *abs_timeout_) {
++ /* TODO */
++}
+PRE_SYSCALL(compat_50_mq_timedreceive)
-+(long mqdes_, void *msg_ptr_, long msg_len_, void *msg_prio_,
++(long long mqdes_, void *msg_ptr_, long long msg_len_, void *msg_prio_,
+ void *abs_timeout_) {
+ /* TODO */
+}
+POST_SYSCALL(compat_50_mq_timedreceive)
-+(long res, long mqdes_, void *msg_ptr_, long msg_len_, void *msg_prio_,
-+ void *abs_timeout_) {}
++(long long res, long long mqdes_, void *msg_ptr_, long long msg_len_,
++ void *msg_prio_, void *abs_timeout_) {
++ /* TODO */
++}
+/* syscall 267 has been skipped */
+/* syscall 268 has been skipped */
+/* syscall 269 has been skipped */
@@ -1116,43 +1948,83 @@ $NetBSD$
+ PRE_READ(to, __sanitizer::internal_strlen(to) + 1);
+ }
+}
-+POST_SYSCALL(__posix_rename)(long res, void *from_, void *to_) {}
-+PRE_SYSCALL(swapctl)(long cmd_, void *arg_, long misc_) { /* TODO */ }
-+POST_SYSCALL(swapctl)(long res, long cmd_, void *arg_, long misc_) {}
-+PRE_SYSCALL(compat_30_getdents)(long fd_, void *buf_, long count_) {
++POST_SYSCALL(__posix_rename)(long long res, void *from_, void *to_) {
++ const char *from = (const char *)from_;
++ const char *to = (const char *)to_;
++ if (from) {
++ POST_READ(from, __sanitizer::internal_strlen(from) + 1);
++ }
++ if (to) {
++ POST_READ(to, __sanitizer::internal_strlen(to) + 1);
++ }
++}
++PRE_SYSCALL(swapctl)(long long cmd_, void *arg_, long long misc_) { /* TODO */ }
++POST_SYSCALL(swapctl)
++(long long res, long long cmd_, void *arg_, long long misc_) {
++ /* TODO */
++}
++PRE_SYSCALL(compat_30_getdents)(long long fd_, void *buf_, long long count_) {
+ /* TODO */
+}
-+POST_SYSCALL(compat_30_getdents)(long res, long fd_, void *buf_, long count_) {}
-+PRE_SYSCALL(minherit)(void *addr_, long len_, long inherit_) {
++POST_SYSCALL(compat_30_getdents)
++(long long res, long long fd_, void *buf_, long long count_) {
++ /* TODO */
++}
++PRE_SYSCALL(minherit)(void *addr_, long long len_, long long inherit_) {
++ /* Nothing to do */
++}
++POST_SYSCALL(minherit)
++(long long res, void *addr_, long long len_, long long inherit_) {
+ /* Nothing to do */
+}
-+POST_SYSCALL(minherit)(long res, void *addr_, long len_, long inherit_) {}
-+PRE_SYSCALL(lchmod)(void *path_, long mode_) {
++PRE_SYSCALL(lchmod)(void *path_, long long mode_) {
+ const char *path = (const char *)path_;
+ if (path) {
+ PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
+ }
+}
-+POST_SYSCALL(lchmod)(long res, void *path_, long mode_) {}
-+PRE_SYSCALL(lchown)(void *path_, long uid_, long gid_) {
++POST_SYSCALL(lchmod)(long long res, void *path_, long long mode_) {
++ const char *path = (const char *)path_;
++ if (path) {
++ POST_READ(path, __sanitizer::internal_strlen(path) + 1);
++ }
++}
++PRE_SYSCALL(lchown)(void *path_, long long uid_, long long gid_) {
+ const char *path = (const char *)path_;
+ if (path) {
+ PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
+ }
+}
-+POST_SYSCALL(lchown)(long res, void *path_, long uid_, long gid_) {}
++POST_SYSCALL(lchown)
++(long long res, void *path_, long long uid_, long long gid_) {
++ const char *path = (const char *)path_;
++ if (path) {
++ POST_READ(path, __sanitizer::internal_strlen(path) + 1);
++ }
++}
+PRE_SYSCALL(compat_50_lutimes)(void *path_, void *tptr_) { /* TODO */ }
-+POST_SYSCALL(compat_50_lutimes)(long res, void *path_, void *tptr_) {}
-+PRE_SYSCALL(__msync13)(void *addr_, long len_, long flags_) {
++POST_SYSCALL(compat_50_lutimes)(long long res, void *path_, void *tptr_) {
++ /* TODO */
++}
++PRE_SYSCALL(__msync13)(void *addr_, long long len_, long long flags_) {
++ /* Nothing to do */
++}
++POST_SYSCALL(__msync13)
++(long long res, void *addr_, long long len_, long long flags_) {
+ /* Nothing to do */
+}
-+POST_SYSCALL(__msync13)(long res, void *addr_, long len_, long flags_) {}
+PRE_SYSCALL(compat_30___stat13)(void *path_, void *ub_) { /* TODO */ }
-+POST_SYSCALL(compat_30___stat13)(long res, void *path_, void *ub_) {}
-+PRE_SYSCALL(compat_30___fstat13)(long fd_, void *sb_) { /* TODO */ }
-+POST_SYSCALL(compat_30___fstat13)(long res, long fd_, void *sb_) {}
++POST_SYSCALL(compat_30___stat13)(long long res, void *path_, void *ub_) {
++ /* TODO */
++}
++PRE_SYSCALL(compat_30___fstat13)(long long fd_, void *sb_) { /* TODO */ }
++POST_SYSCALL(compat_30___fstat13)(long long res, long long fd_, void *sb_) {
++ /* TODO */
++}
+PRE_SYSCALL(compat_30___lstat13)(void *path_, void *ub_) { /* TODO */ }
-+POST_SYSCALL(compat_30___lstat13)(long res, void *path_, void *ub_) {}
++POST_SYSCALL(compat_30___lstat13)(long long res, void *path_, void *ub_) {
++ /* TODO */
++}
+PRE_SYSCALL(__sigaltstack14)(void *nss_, void *oss_) {
+ if (nss_) {
+ PRE_READ(nss_, struct_sigaltstack_sz);
@@ -1161,102 +2033,166 @@ $NetBSD$
+ PRE_READ(oss_, struct_sigaltstack_sz);
+ }
+}
-+POST_SYSCALL(__sigaltstack14)(long res, void *nss_, void *oss_) {}
++POST_SYSCALL(__sigaltstack14)(long long res, void *nss_, void *oss_) {}
+PRE_SYSCALL(__vfork14)(void) { /* Nothing to do */ }
-+POST_SYSCALL(__vfork14)(long res) {}
-+PRE_SYSCALL(__posix_chown)(void *path_, long uid_, long gid_) {
++POST_SYSCALL(__vfork14)(long long res) { /* Nothing to do */ }
++PRE_SYSCALL(__posix_chown)(void *path_, long long uid_, long long gid_) {
+ const char *path = (const char *)path_;
+ if (path) {
+ PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
+ }
+}
-+POST_SYSCALL(__posix_chown)(long res, void *path_, long uid_, long gid_) {}
-+PRE_SYSCALL(__posix_fchown)(long fd_, long uid_, long gid_) {
++POST_SYSCALL(__posix_chown)
++(long long res, void *path_, long long uid_, long long gid_) {
++ const char *path = (const char *)path_;
++ if (path) {
++ POST_READ(path, __sanitizer::internal_strlen(path) + 1);
++ }
++}
++PRE_SYSCALL(__posix_fchown)(long long fd_, long long uid_, long long gid_) {
++ /* Nothing to do */
++}
++POST_SYSCALL(__posix_fchown)
++(long long res, long long fd_, long long uid_, long long gid_) {
+ /* Nothing to do */
+}
-+POST_SYSCALL(__posix_fchown)(long res, long fd_, long uid_, long gid_) {}
-+PRE_SYSCALL(__posix_lchown)(void *path_, long uid_, long gid_) {
++PRE_SYSCALL(__posix_lchown)(void *path_, long long uid_, long long gid_) {
+ const char *path = (const char *)path_;
+ if (path) {
+ PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
+ }
+}
-+POST_SYSCALL(__posix_lchown)(long res, void *path_, long uid_, long gid_) {}
-+PRE_SYSCALL(getsid)(long pid_) { /* Nothing to do */ }
-+POST_SYSCALL(getsid)(long res, long pid_) {}
-+PRE_SYSCALL(__clone)(long flags_, void *stack_) { /* Nothing to do */ }
-+POST_SYSCALL(__clone)(long res, long flags_, void *stack_) {}
-+PRE_SYSCALL(fktrace)(long fd_, long ops_, long facs_, long pid_) {
++POST_SYSCALL(__posix_lchown)
++(long long res, void *path_, long long uid_, long long gid_) {
++ const char *path = (const char *)path_;
++ if (path) {
++ POST_READ(path, __sanitizer::internal_strlen(path) + 1);
++ }
++}
++PRE_SYSCALL(getsid)(long long pid_) { /* Nothing to do */ }
++POST_SYSCALL(getsid)(long long res, long long pid_) { /* Nothing to do */ }
++PRE_SYSCALL(__clone)(long long flags_, void *stack_) { /* Nothing to do */ }
++POST_SYSCALL(__clone)(long long res, long long flags_, void *stack_) {
++ /* Nothing to do */
++}
++PRE_SYSCALL(fktrace)
++(long long fd_, long long ops_, long long facs_, long long pid_) {
++ /* Nothing to do */
++}
++POST_SYSCALL(fktrace)
++(long long res, long long fd_, long long ops_, long long facs_,
++ long long pid_) {
+ /* Nothing to do */
+}
-+POST_SYSCALL(fktrace)(long res, long fd_, long ops_, long facs_, long pid_) {}
+PRE_SYSCALL(preadv)
-+(long fd_, void *iovp_, long iovcnt_, long PAD_, long offset_) {
++(long long fd_, void *iovp_, long long iovcnt_, long long PAD_,
++ long long offset_) {
+ /* Nothing to do */
+}
+POST_SYSCALL(preadv)
-+(long res, long fd_, void *iovp_, long iovcnt_, long PAD_, long offset_) {}
++(long long res, long long fd_, void *iovp_, long long iovcnt_, long long PAD_,
++ long long offset_) {
++ /* Nothing to do */
++}
+PRE_SYSCALL(pwritev)
-+(long fd_, void *iovp_, long iovcnt_, long PAD_, long offset_) {
++(long long fd_, void *iovp_, long long iovcnt_, long long PAD_,
++ long long offset_) {
+ /* Nothing to do */
+}
+POST_SYSCALL(pwritev)
-+(long res, long fd_, void *iovp_, long iovcnt_, long PAD_, long offset_) {}
-+PRE_SYSCALL(compat_16___sigaction14)(long signum_, void *nsa_, void *osa_) {
++(long long res, long long fd_, void *iovp_, long long iovcnt_, long long PAD_,
++ long long offset_) {
++ /* Nothing to do */
++}
++PRE_SYSCALL(compat_16___sigaction14)
++(long long signum_, void *nsa_, void *osa_) {
+ /* TODO */
+}
+POST_SYSCALL(compat_16___sigaction14)
-+(long res, long signum_, void *nsa_, void *osa_) {}
++(long long res, long long signum_, void *nsa_, void *osa_) {
++ /* TODO */
++}
+PRE_SYSCALL(__sigpending14)(void *set_) { /* Nothing to do */ }
-+POST_SYSCALL(__sigpending14)(long res, void *set_) {}
-+PRE_SYSCALL(__sigprocmask14)(long how_, void *set_, void *oset_) {
++POST_SYSCALL(__sigpending14)(long long res, void *set_) { /* Nothing to do */ }
++PRE_SYSCALL(__sigprocmask14)(long long how_, void *set_, void *oset_) {
++ /* Nothing to do */
++}
++POST_SYSCALL(__sigprocmask14)
++(long long res, long long how_, void *set_, void *oset_) {
+ /* Nothing to do */
+}
-+POST_SYSCALL(__sigprocmask14)(long res, long how_, void *set_, void *oset_) {}
+PRE_SYSCALL(__sigsuspend14)(void *set_) {
+ if (set_) {
+ PRE_READ(set_, sizeof(__sanitizer_sigset_t));
+ }
+}
-+POST_SYSCALL(__sigsuspend14)(long res, void *set_) {}
++POST_SYSCALL(__sigsuspend14)(long long res, void *set_) {
++ if (set_) {
++ PRE_READ(set_, sizeof(__sanitizer_sigset_t));
++ }
++}
+PRE_SYSCALL(compat_16___sigreturn14)(void *sigcntxp_) { /* TODO */ }
-+POST_SYSCALL(compat_16___sigreturn14)(long res, void *sigcntxp_) {}
-+PRE_SYSCALL(__getcwd)(void *bufp_, long length_) { /* Nothing to do */ }
-+POST_SYSCALL(__getcwd)(long res, void *bufp_, long length_) {}
-+PRE_SYSCALL(fchroot)(long fd_) { /* Nothing to do */ }
-+POST_SYSCALL(fchroot)(long res, long fd_) {}
-+PRE_SYSCALL(compat_30_fhopen)(void *fhp_, long flags_) { /* TODO */ }
-+POST_SYSCALL(compat_30_fhopen)(long res, void *fhp_, long flags_) {}
++POST_SYSCALL(compat_16___sigreturn14)(long long res, void *sigcntxp_) {
++ /* TODO */
++}
++PRE_SYSCALL(__getcwd)(void *bufp_, long long length_) { /* Nothing to do */ }
++POST_SYSCALL(__getcwd)(long long res, void *bufp_, long long length_) {
++ /* Nothing to do */
++}
++PRE_SYSCALL(fchroot)(long long fd_) { /* Nothing to do */ }
++POST_SYSCALL(fchroot)(long long res, long long fd_) { /* Nothing to do */ }
++PRE_SYSCALL(compat_30_fhopen)(void *fhp_, long long flags_) { /* TODO */ }
++POST_SYSCALL(compat_30_fhopen)(long long res, void *fhp_, long long flags_) {
++ /* TODO */
++}
+PRE_SYSCALL(compat_30_fhstat)(void *fhp_, void *sb_) { /* TODO */ }
-+POST_SYSCALL(compat_30_fhstat)(long res, void *fhp_, void *sb_) {}
++POST_SYSCALL(compat_30_fhstat)(long long res, void *fhp_, void *sb_) {
++ /* TODO */
++}
+PRE_SYSCALL(compat_20_fhstatfs)(void *fhp_, void *buf_) { /* TODO */ }
-+POST_SYSCALL(compat_20_fhstatfs)(long res, void *fhp_, void *buf_) {}
++POST_SYSCALL(compat_20_fhstatfs)(long long res, void *fhp_, void *buf_) {
++ /* TODO */
++}
+PRE_SYSCALL(compat_50_____semctl13)
-+(long semid_, long semnum_, long cmd_, void *arg_) {
++(long long semid_, long long semnum_, long long cmd_, void *arg_) {
+ /* TODO */
+}
+POST_SYSCALL(compat_50_____semctl13)
-+(long res, long semid_, long semnum_, long cmd_, void *arg_) {}
-+PRE_SYSCALL(compat_50___msgctl13)(long msqid_, long cmd_, void *buf_) {
++(long long res, long long semid_, long long semnum_, long long cmd_,
++ void *arg_) {
++ /* TODO */
++}
++PRE_SYSCALL(compat_50___msgctl13)
++(long long msqid_, long long cmd_, void *buf_) {
+ /* TODO */
+}
+POST_SYSCALL(compat_50___msgctl13)
-+(long res, long msqid_, long cmd_, void *buf_) {}
-+PRE_SYSCALL(compat_50___shmctl13)(long shmid_, long cmd_, void *buf_) {
++(long long res, long long msqid_, long long cmd_, void *buf_) {
++ /* TODO */
++}
++PRE_SYSCALL(compat_50___shmctl13)
++(long long shmid_, long long cmd_, void *buf_) {
+ /* TODO */
+}
+POST_SYSCALL(compat_50___shmctl13)
-+(long res, long shmid_, long cmd_, void *buf_) {}
-+PRE_SYSCALL(lchflags)(void *path_, long flags_) {
++(long long res, long long shmid_, long long cmd_, void *buf_) {
++ /* TODO */
++}
++PRE_SYSCALL(lchflags)(void *path_, long long flags_) {
+ const char *path = (const char *)path_;
+ if (path) {
+ PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
+ }
+}
-+POST_SYSCALL(lchflags)(long res, void *path_, long flags_) {}
++POST_SYSCALL(lchflags)(long long res, void *path_, long long flags_) {
++ const char *path = (const char *)path_;
++ if (path) {
++ POST_READ(path, __sanitizer::internal_strlen(path) + 1);
++ }
++}
+PRE_SYSCALL(issetugid)(void) { /* Nothing to do */ }
-+POST_SYSCALL(issetugid)(long res) {}
-+PRE_SYSCALL(utrace)(void *label_, void *addr_, long len_) {
++POST_SYSCALL(issetugid)(long long res) { /* Nothing to do */ }
++PRE_SYSCALL(utrace)(void *label_, void *addr_, long long len_) {
+ const char *label = (const char *)label_;
+ if (label) {
+ PRE_READ(label, __sanitizer::internal_strlen(label) + 1);
@@ -1265,180 +2201,291 @@ $NetBSD$
+ PRE_READ(addr_, len_);
+ }
+}
-+POST_SYSCALL(utrace)(long res, void *label_, void *addr_, long len_) {}
++POST_SYSCALL(utrace)(long long res, void *label_, void *addr_, long long len_) {
++ const char *label = (const char *)label_;
++ if (label) {
++ POST_READ(label, __sanitizer::internal_strlen(label) + 1);
++ }
++ if (addr_) {
++ POST_READ(addr_, len_);
++ }
++}
+PRE_SYSCALL(getcontext)(void *ucp_) { /* Nothing to do */ }
-+POST_SYSCALL(getcontext)(long res, void *ucp_) {}
++POST_SYSCALL(getcontext)(long long res, void *ucp_) { /* Nothing to do */ }
+PRE_SYSCALL(setcontext)(void *ucp_) {
+ if (ucp_) {
+ PRE_READ(ucp_, ucontext_t_sz);
+ }
+}
-+POST_SYSCALL(setcontext)(long res, void *ucp_) {}
-+PRE_SYSCALL(_lwp_create)(void *ucp_, long flags_, void *new_lwp_) {
++POST_SYSCALL(setcontext)(long long res, void *ucp_) {}
++PRE_SYSCALL(_lwp_create)(void *ucp_, long long flags_, void *new_lwp_) {
+ if (ucp_) {
+ PRE_READ(ucp_, ucontext_t_sz);
+ }
+}
-+POST_SYSCALL(_lwp_create)(long res, void *ucp_, long flags_, void *new_lwp_) {}
++POST_SYSCALL(_lwp_create)
++(long long res, void *ucp_, long long flags_, void *new_lwp_) {}
+PRE_SYSCALL(_lwp_exit)(void) { /* Nothing to do */ }
-+POST_SYSCALL(_lwp_exit)(long res) {}
++POST_SYSCALL(_lwp_exit)(long long res) { /* Nothing to do */ }
+PRE_SYSCALL(_lwp_self)(void) { /* Nothing to do */ }
-+POST_SYSCALL(_lwp_self)(long res) {}
-+PRE_SYSCALL(_lwp_wait)(long wait_for_, void *departed_) { /* Nothing to do */ }
-+POST_SYSCALL(_lwp_wait)(long res, long wait_for_, void *departed_) {}
-+PRE_SYSCALL(_lwp_suspend)(long target_) { /* Nothing to do */ }
-+POST_SYSCALL(_lwp_suspend)(long res, long target_) {}
-+PRE_SYSCALL(_lwp_continue)(long target_) { /* Nothing to do */ }
-+POST_SYSCALL(_lwp_continue)(long res, long target_) {}
-+PRE_SYSCALL(_lwp_wakeup)(long target_) { /* Nothing to do */ }
-+POST_SYSCALL(_lwp_wakeup)(long res, long target_) {}
++POST_SYSCALL(_lwp_self)(long long res) { /* Nothing to do */ }
++PRE_SYSCALL(_lwp_wait)(long long wait_for_, void *departed_) {
++ /* Nothing to do */
++}
++POST_SYSCALL(_lwp_wait)(long long res, long long wait_for_, void *departed_) {
++ /* Nothing to do */
++}
++PRE_SYSCALL(_lwp_suspend)(long long target_) { /* Nothing to do */ }
++POST_SYSCALL(_lwp_suspend)(long long res, long long target_) {
++ /* Nothing to do */
++}
++PRE_SYSCALL(_lwp_continue)(long long target_) { /* Nothing to do */ }
++POST_SYSCALL(_lwp_continue)(long long res, long long target_) {
++ /* Nothing to do */
++}
++PRE_SYSCALL(_lwp_wakeup)(long long target_) { /* Nothing to do */ }
++POST_SYSCALL(_lwp_wakeup)(long long res, long long target_) {
++ /* Nothing to do */
++}
+PRE_SYSCALL(_lwp_getprivate)(void) { /* Nothing to do */ }
-+POST_SYSCALL(_lwp_getprivate)(long res) {}
++POST_SYSCALL(_lwp_getprivate)(long long res) { /* Nothing to do */ }
+PRE_SYSCALL(_lwp_setprivate)(void *ptr_) { /* Nothing to do */ }
-+POST_SYSCALL(_lwp_setprivate)(long res, void *ptr_) {}
-+PRE_SYSCALL(_lwp_kill)(long target_, long signo_) { /* Nothing to do */ }
-+POST_SYSCALL(_lwp_kill)(long res, long target_, long signo_) {}
-+PRE_SYSCALL(_lwp_detach)(long target_) { /* Nothing to do */ }
-+POST_SYSCALL(_lwp_detach)(long res, long target_) {}
++POST_SYSCALL(_lwp_setprivate)(long long res, void *ptr_) { /* Nothing to do */ }
++PRE_SYSCALL(_lwp_kill)(long long target_, long long signo_) {
++ /* Nothing to do */
++}
++POST_SYSCALL(_lwp_kill)(long long res, long long target_, long long signo_) {
++ /* Nothing to do */
++}
++PRE_SYSCALL(_lwp_detach)(long long target_) { /* Nothing to do */ }
++POST_SYSCALL(_lwp_detach)(long long res, long long target_) {
++ /* Nothing to do */
++}
+PRE_SYSCALL(compat_50__lwp_park)
-+(void *ts_, long unpark_, void *hint_, void *unparkhint_) {
++(void *ts_, long long unpark_, void *hint_, void *unparkhint_) {
+ /* TODO */
+}
+POST_SYSCALL(compat_50__lwp_park)
-+(long res, void *ts_, long unpark_, void *hint_, void *unparkhint_) {}
-+PRE_SYSCALL(_lwp_unpark)(long target_, void *hint_) { /* Nothing to do */ }
-+POST_SYSCALL(_lwp_unpark)(long res, long target_, void *hint_) {}
-+PRE_SYSCALL(_lwp_unpark_all)(void *targets_, long ntargets_, void *hint_) {
++(long long res, void *ts_, long long unpark_, void *hint_, void *unparkhint_) {
++ /* TODO */
++}
++PRE_SYSCALL(_lwp_unpark)(long long target_, void *hint_) { /* Nothing to do */ }
++POST_SYSCALL(_lwp_unpark)(long long res, long long target_, void *hint_) {
++ /* Nothing to do */
++}
++PRE_SYSCALL(_lwp_unpark_all)(void *targets_, long long ntargets_, void *hint_) {
+ if (targets_) {
+ PRE_READ(targets_, ntargets_ * sizeof(__sanitizer_lwpid_t));
+ }
+}
+POST_SYSCALL(_lwp_unpark_all)
-+(long res, void *targets_, long ntargets_, void *hint_) {}
-+PRE_SYSCALL(_lwp_setname)(long target_, void *name_) {
++(long long res, void *targets_, long long ntargets_, void *hint_) {}
++PRE_SYSCALL(_lwp_setname)(long long target_, void *name_) {
+ const char *name = (const char *)name_;
+ if (name) {
+ PRE_READ(name, __sanitizer::internal_strlen(name) + 1);
+ }
+}
-+POST_SYSCALL(_lwp_setname)(long res, long target_, void *name_) {}
-+PRE_SYSCALL(_lwp_getname)(long target_, void *name_, long len_) {
++POST_SYSCALL(_lwp_setname)(long long res, long long target_, void *name_) {
++ const char *name = (const char *)name_;
++ if (name) {
++ POST_READ(name, __sanitizer::internal_strlen(name) + 1);
++ }
++}
++PRE_SYSCALL(_lwp_getname)(long long target_, void *name_, long long len_) {
++ /* Nothing to do */
++}
++POST_SYSCALL(_lwp_getname)
++(long long res, long long target_, void *name_, long long len_) {
++ /* Nothing to do */
++}
++PRE_SYSCALL(_lwp_ctl)(long long features_, void **address_) {
++ /* Nothing to do */
++}
++POST_SYSCALL(_lwp_ctl)(long long res, long long features_, void **address_) {
+ /* Nothing to do */
+}
-+POST_SYSCALL(_lwp_getname)(long res, long target_, void *name_, long len_) {}
-+PRE_SYSCALL(_lwp_ctl)(long features_, void **address_) { /* Nothing to do */ }
-+POST_SYSCALL(_lwp_ctl)(long res, long features_, void **address_) {}
+/* syscall 326 has been skipped */
+/* syscall 327 has been skipped */
+/* syscall 328 has been skipped */
+/* syscall 329 has been skipped */
+PRE_SYSCALL(compat_60_sa_register)
-+(void *newv_, void **oldv_, long flags_, long stackinfo_offset_) {
++(void *newv_, void **oldv_, long long flags_, long long stackinfo_offset_) {
+ /* TODO */
+}
+POST_SYSCALL(compat_60_sa_register)
-+(long res, void *newv_, void **oldv_, long flags_, long stackinfo_offset_) {}
-+PRE_SYSCALL(compat_60_sa_stacks)(long num_, void *stacks_) { /* TODO */ }
-+POST_SYSCALL(compat_60_sa_stacks)(long res, long num_, void *stacks_) {}
++(long long res, void *newv_, void **oldv_, long long flags_,
++ long long stackinfo_offset_) {
++ /* TODO */
++}
++PRE_SYSCALL(compat_60_sa_stacks)(long long num_, void *stacks_) { /* TODO */ }
++POST_SYSCALL(compat_60_sa_stacks)
++(long long res, long long num_, void *stacks_) {
++ /* TODO */
++}
+PRE_SYSCALL(compat_60_sa_enable)(void) { /* TODO */ }
-+POST_SYSCALL(compat_60_sa_enable)(long res) {}
-+PRE_SYSCALL(compat_60_sa_setconcurrency)(long concurrency_) { /* TODO */ }
-+POST_SYSCALL(compat_60_sa_setconcurrency)(long res, long concurrency_) {}
++POST_SYSCALL(compat_60_sa_enable)(long long res) { /* TODO */ }
++PRE_SYSCALL(compat_60_sa_setconcurrency)(long long concurrency_) { /* TODO */ }
++POST_SYSCALL(compat_60_sa_setconcurrency)
++(long long res, long long concurrency_) {
++ /* TODO */
++}
+PRE_SYSCALL(compat_60_sa_yield)(void) { /* TODO */ }
-+POST_SYSCALL(compat_60_sa_yield)(long res) {}
-+PRE_SYSCALL(compat_60_sa_preempt)(long sa_id_) { /* TODO */ }
-+POST_SYSCALL(compat_60_sa_preempt)(long res, long sa_id_) {}
++POST_SYSCALL(compat_60_sa_yield)(long long res) { /* TODO */ }
++PRE_SYSCALL(compat_60_sa_preempt)(long long sa_id_) { /* TODO */ }
++POST_SYSCALL(compat_60_sa_preempt)(long long res, long long sa_id_) {
++ /* TODO */
++}
+/* syscall 336 has been skipped */
+/* syscall 337 has been skipped */
+/* syscall 338 has been skipped */
+/* syscall 339 has been skipped */
+PRE_SYSCALL(__sigaction_sigtramp)
-+(long signum_, void *nsa_, void *osa_, void *tramp_, long vers_) {
++(long long signum_, void *nsa_, void *osa_, void *tramp_, long long vers_) {
+ if (nsa_) {
+ PRE_READ(nsa_, sizeof(__sanitizer_sigaction));
+ }
+}
+POST_SYSCALL(__sigaction_sigtramp)
-+(long res, long signum_, void *nsa_, void *osa_, void *tramp_, long vers_) {}
-+PRE_SYSCALL(pmc_get_info)(long ctr_, long op_, void *args_) { /* TODO */ }
-+POST_SYSCALL(pmc_get_info)(long res, long ctr_, long op_, void *args_) {}
-+PRE_SYSCALL(pmc_control)(long ctr_, long op_, void *args_) { /* TODO */ }
-+POST_SYSCALL(pmc_control)(long res, long ctr_, long op_, void *args_) {}
-+PRE_SYSCALL(rasctl)(void *addr_, long len_, long op_) { /* Nothing to do */ }
-+POST_SYSCALL(rasctl)(long res, void *addr_, long len_, long op_) {}
++(long long res, long long signum_, void *nsa_, void *osa_, void *tramp_,
++ long long vers_) {
++ if (nsa_) {
++ PRE_READ(nsa_, sizeof(__sanitizer_sigaction));
++ }
++}
++PRE_SYSCALL(pmc_get_info)(long long ctr_, long long op_, void *args_) {
++ /* TODO */
++}
++POST_SYSCALL(pmc_get_info)
++(long long res, long long ctr_, long long op_, void *args_) {
++ /* TODO */
++}
++PRE_SYSCALL(pmc_control)(long long ctr_, long long op_, void *args_) {
++ /* TODO */
++}
++POST_SYSCALL(pmc_control)
++(long long res, long long ctr_, long long op_, void *args_) {
++ /* TODO */
++}
++PRE_SYSCALL(rasctl)(void *addr_, long long len_, long long op_) {
++ /* Nothing to do */
++}
++POST_SYSCALL(rasctl)
++(long long res, void *addr_, long long len_, long long op_) {
++ /* Nothing to do */
++}
+PRE_SYSCALL(kqueue)(void) { /* Nothing to do */ }
-+POST_SYSCALL(kqueue)(long res) {}
++POST_SYSCALL(kqueue)(long long res) { /* Nothing to do */ }
+PRE_SYSCALL(compat_50_kevent)
-+(long fd_, void *changelist_, long nchanges_, void *eventlist_, long nevents_,
-+ void *timeout_) {
++(long long fd_, void *changelist_, long long nchanges_, void *eventlist_,
++ long long nevents_, void *timeout_) {
+ /* TODO */
+}
+POST_SYSCALL(compat_50_kevent)
-+(long res, long fd_, void *changelist_, long nchanges_, void *eventlist_,
-+ long nevents_, void *timeout_) {}
++(long long res, long long fd_, void *changelist_, long long nchanges_,
++ void *eventlist_, long long nevents_, void *timeout_) {
++ /* TODO */
++}
+PRE_SYSCALL(_sched_setparam)
-+(long pid_, long lid_, long policy_, void *params_) {
++(long long pid_, long long lid_, long long policy_, void *params_) {
+ if (params_) {
+ PRE_READ(params_, struct_sched_param_sz);
+ }
+}
+POST_SYSCALL(_sched_setparam)
-+(long res, long pid_, long lid_, long policy_, void *params_) {}
++(long long res, long long pid_, long long lid_, long long policy_,
++ void *params_) {
++ if (params_) {
++ PRE_READ(params_, struct_sched_param_sz);
++ }
++}
+PRE_SYSCALL(_sched_getparam)
-+(long pid_, long lid_, void *policy_, void *params_) {
++(long long pid_, long long lid_, void *policy_, void *params_) {
+ /* Nothing to do */
+}
+POST_SYSCALL(_sched_getparam)
-+(long res, long pid_, long lid_, void *policy_, void *params_) {}
++(long long res, long long pid_, long long lid_, void *policy_, void *params_) {
++ /* Nothing to do */
++}
+PRE_SYSCALL(_sched_setaffinity)
-+(long pid_, long lid_, long size_, void *cpuset_) {
++(long long pid_, long long lid_, long long size_, void *cpuset_) {
+ if (cpuset_) {
+ PRE_READ(cpuset_, size_);
+ }
+}
+POST_SYSCALL(_sched_setaffinity)
-+(long res, long pid_, long lid_, long size_, void *cpuset_) {}
++(long long res, long long pid_, long long lid_, long long size_,
++ void *cpuset_) {
++ if (cpuset_) {
++ PRE_READ(cpuset_, size_);
++ }
++}
+PRE_SYSCALL(_sched_getaffinity)
-+(long pid_, long lid_, long size_, void *cpuset_) {
++(long long pid_, long long lid_, long long size_, void *cpuset_) {
+ /* Nothing to do */
+}
+POST_SYSCALL(_sched_getaffinity)
-+(long res, long pid_, long lid_, long size_, void *cpuset_) {}
++(long long res, long long pid_, long long lid_, long long size_,
++ void *cpuset_) {
++ /* Nothing to do */
++}
+PRE_SYSCALL(sched_yield)(void) { /* Nothing to do */ }
-+POST_SYSCALL(sched_yield)(long res) {}
-+PRE_SYSCALL(_sched_protect)(long priority_) { /* Nothing to do */ }
-+POST_SYSCALL(_sched_protect)(long res, long priority_) {}
++POST_SYSCALL(sched_yield)(long long res) { /* Nothing to do */ }
++PRE_SYSCALL(_sched_protect)(long long priority_) { /* Nothing to do */ }
++POST_SYSCALL(_sched_protect)(long long res, long long priority_) {
++ /* Nothing to do */
++}
+/* syscall 352 has been skipped */
+/* syscall 353 has been skipped */
-+PRE_SYSCALL(fsync_range)(long fd_, long flags_, long start_, long length_) {
++PRE_SYSCALL(fsync_range)
++(long long fd_, long long flags_, long long start_, long long length_) {
+ /* Nothing to do */
+}
+POST_SYSCALL(fsync_range)
-+(long res, long fd_, long flags_, long start_, long length_) {}
-+PRE_SYSCALL(uuidgen)(void *store_, long count_) { /* Nothing to do */ }
-+POST_SYSCALL(uuidgen)(long res, void *store_, long count_) {}
-+PRE_SYSCALL(getvfsstat)(void *buf_, long bufsize_, long flags_) {
++(long long res, long long fd_, long long flags_, long long start_,
++ long long length_) {
++ /* Nothing to do */
++}
++PRE_SYSCALL(uuidgen)(void *store_, long long count_) { /* Nothing to do */ }
++POST_SYSCALL(uuidgen)(long long res, void *store_, long long count_) {
++ /* Nothing to do */
++}
++PRE_SYSCALL(getvfsstat)(void *buf_, long long bufsize_, long long flags_) {
++ /* Nothing to do */
++}
++POST_SYSCALL(getvfsstat)
++(long long res, void *buf_, long long bufsize_, long long flags_) {
+ /* Nothing to do */
+}
-+POST_SYSCALL(getvfsstat)(long res, void *buf_, long bufsize_, long flags_) {}
-+PRE_SYSCALL(statvfs1)(void *path_, void *buf_, long flags_) {
++PRE_SYSCALL(statvfs1)(void *path_, void *buf_, long long flags_) {
+ const char *path = (const char *)path_;
+ if (path) {
+ PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
+ }
+}
-+POST_SYSCALL(statvfs1)(long res, void *path_, void *buf_, long flags_) {}
-+PRE_SYSCALL(fstatvfs1)(long fd_, void *buf_, long flags_) {
++POST_SYSCALL(statvfs1)
++(long long res, void *path_, void *buf_, long long flags_) {
++ const char *path = (const char *)path_;
++ if (path) {
++ POST_READ(path, __sanitizer::internal_strlen(path) + 1);
++ }
++}
++PRE_SYSCALL(fstatvfs1)(long long fd_, void *buf_, long long flags_) {
++ /* Nothing to do */
++}
++POST_SYSCALL(fstatvfs1)
++(long long res, long long fd_, void *buf_, long long flags_) {
+ /* Nothing to do */
+}
-+POST_SYSCALL(fstatvfs1)(long res, long fd_, void *buf_, long flags_) {}
-+PRE_SYSCALL(compat_30_fhstatvfs1)(void *fhp_, void *buf_, long flags_) {
++PRE_SYSCALL(compat_30_fhstatvfs1)(void *fhp_, void *buf_, long long flags_) {
+ /* TODO */
+}
+POST_SYSCALL(compat_30_fhstatvfs1)
-+(long res, void *fhp_, void *buf_, long flags_) {}
++(long long res, void *fhp_, void *buf_, long long flags_) {
++ /* TODO */
++}
+PRE_SYSCALL(extattrctl)
-+(void *path_, long cmd_, void *filename_, long attrnamespace_,
++(void *path_, long long cmd_, void *filename_, long long attrnamespace_,
+ void *attrname_) {
+ const char *path = (const char *)path_;
+ if (path) {
@@ -1446,296 +2493,455 @@ $NetBSD$
+ }
+}
+POST_SYSCALL(extattrctl)
-+(long res, void *path_, long cmd_, void *filename_, long attrnamespace_,
-+ void *attrname_) {}
++(long long res, void *path_, long long cmd_, void *filename_,
++ long long attrnamespace_, void *attrname_) {
++ const char *path = (const char *)path_;
++ if (path) {
++ POST_READ(path, __sanitizer::internal_strlen(path) + 1);
++ }
++}
+PRE_SYSCALL(extattr_set_file)
-+(void *path_, long attrnamespace_, void *attrname_, void *data_, long nbytes_) {
++(void *path_, long long attrnamespace_, void *attrname_, void *data_,
++ long long nbytes_) {
+ const char *path = (const char *)path_;
+ if (path) {
+ PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
+ }
+}
+POST_SYSCALL(extattr_set_file)
-+(long res, void *path_, long attrnamespace_, void *attrname_, void *data_,
-+ long nbytes_) {}
++(long long res, void *path_, long long attrnamespace_, void *attrname_,
++ void *data_, long long nbytes_) {
++ const char *path = (const char *)path_;
++ if (path) {
++ POST_READ(path, __sanitizer::internal_strlen(path) + 1);
++ }
++}
+PRE_SYSCALL(extattr_get_file)
-+(void *path_, long attrnamespace_, void *attrname_, void *data_, long nbytes_) {
++(void *path_, long long attrnamespace_, void *attrname_, void *data_,
++ long long nbytes_) {
+ const char *path = (const char *)path_;
+ if (path) {
+ PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
+ }
+}
+POST_SYSCALL(extattr_get_file)
-+(long res, void *path_, long attrnamespace_, void *attrname_, void *data_,
-+ long nbytes_) {}
++(long long res, void *path_, long long attrnamespace_, void *attrname_,
++ void *data_, long long nbytes_) {
++ const char *path = (const char *)path_;
++ if (path) {
++ POST_READ(path, __sanitizer::internal_strlen(path) + 1);
++ }
++}
+PRE_SYSCALL(extattr_delete_file)
-+(void *path_, long attrnamespace_, void *attrname_) {
++(void *path_, long long attrnamespace_, void *attrname_) {
+ const char *path = (const char *)path_;
+ if (path) {
+ PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
+ }
+}
+POST_SYSCALL(extattr_delete_file)
-+(long res, void *path_, long attrnamespace_, void *attrname_) {}
++(long long res, void *path_, long long attrnamespace_, void *attrname_) {
++ const char *path = (const char *)path_;
++ if (path) {
++ POST_READ(path, __sanitizer::internal_strlen(path) + 1);
++ }
++}
+PRE_SYSCALL(extattr_set_fd)
-+(long fd_, long attrnamespace_, void *attrname_, void *data_, long nbytes_) {
++(long long fd_, long long attrnamespace_, void *attrname_, void *data_,
++ long long nbytes_) {
+ /* TODO */
+}
+POST_SYSCALL(extattr_set_fd)
-+(long res, long fd_, long attrnamespace_, void *attrname_, void *data_,
-+ long nbytes_) {}
++(long long res, long long fd_, long long attrnamespace_, void *attrname_,
++ void *data_, long long nbytes_) {
++ /* TODO */
++}
+PRE_SYSCALL(extattr_get_fd)
-+(long fd_, long attrnamespace_, void *attrname_, void *data_, long nbytes_) {
++(long long fd_, long long attrnamespace_, void *attrname_, void *data_,
++ long long nbytes_) {
+ /* TODO */
+}
+POST_SYSCALL(extattr_get_fd)
-+(long res, long fd_, long attrnamespace_, void *attrname_, void *data_,
-+ long nbytes_) {}
-+PRE_SYSCALL(extattr_delete_fd)(long fd_, long attrnamespace_, void *attrname_) {
++(long long res, long long fd_, long long attrnamespace_, void *attrname_,
++ void *data_, long long nbytes_) {
++ /* TODO */
++}
++PRE_SYSCALL(extattr_delete_fd)
++(long long fd_, long long attrnamespace_, void *attrname_) {
+ /* TODO */
+}
+POST_SYSCALL(extattr_delete_fd)
-+(long res, long fd_, long attrnamespace_, void *attrname_) {}
++(long long res, long long fd_, long long attrnamespace_, void *attrname_) {
++ /* TODO */
++}
+PRE_SYSCALL(extattr_set_link)
-+(void *path_, long attrnamespace_, void *attrname_, void *data_, long nbytes_) {
++(void *path_, long long attrnamespace_, void *attrname_, void *data_,
++ long long nbytes_) {
+ const char *path = (const char *)path_;
+ if (path) {
+ PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
+ }
+}
+POST_SYSCALL(extattr_set_link)
-+(long res, void *path_, long attrnamespace_, void *attrname_, void *data_,
-+ long nbytes_) {}
++(long long res, void *path_, long long attrnamespace_, void *attrname_,
++ void *data_, long long nbytes_) {
++ const char *path = (const char *)path_;
++ if (path) {
++ POST_READ(path, __sanitizer::internal_strlen(path) + 1);
++ }
++}
+PRE_SYSCALL(extattr_get_link)
-+(void *path_, long attrnamespace_, void *attrname_, void *data_, long nbytes_) {
++(void *path_, long long attrnamespace_, void *attrname_, void *data_,
++ long long nbytes_) {
+ const char *path = (const char *)path_;
+ if (path) {
+ PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
+ }
+}
+POST_SYSCALL(extattr_get_link)
-+(long res, void *path_, long attrnamespace_, void *attrname_, void *data_,
-+ long nbytes_) {}
++(long long res, void *path_, long long attrnamespace_, void *attrname_,
++ void *data_, long long nbytes_) {
++ const char *path = (const char *)path_;
++ if (path) {
++ POST_READ(path, __sanitizer::internal_strlen(path) + 1);
++ }
++}
+PRE_SYSCALL(extattr_delete_link)
-+(void *path_, long attrnamespace_, void *attrname_) {
++(void *path_, long long attrnamespace_, void *attrname_) {
+ const char *path = (const char *)path_;
+ if (path) {
+ PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
+ }
+}
+POST_SYSCALL(extattr_delete_link)
-+(long res, void *path_, long attrnamespace_, void *attrname_) {}
++(long long res, void *path_, long long attrnamespace_, void *attrname_) {
++ const char *path = (const char *)path_;
++ if (path) {
++ POST_READ(path, __sanitizer::internal_strlen(path) + 1);
++ }
++}
+PRE_SYSCALL(extattr_list_fd)
-+(long fd_, long attrnamespace_, void *data_, long nbytes_) {
++(long long fd_, long long attrnamespace_, void *data_, long long nbytes_) {
+ /* TODO */
+}
+POST_SYSCALL(extattr_list_fd)
-+(long res, long fd_, long attrnamespace_, void *data_, long nbytes_) {}
++(long long res, long long fd_, long long attrnamespace_, void *data_,
++ long long nbytes_) {
++ /* TODO */
++}
+PRE_SYSCALL(extattr_list_file)
-+(void *path_, long attrnamespace_, void *data_, long nbytes_) {
++(void *path_, long long attrnamespace_, void *data_, long long nbytes_) {
+ const char *path = (const char *)path_;
+ if (path) {
+ PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
+ }
+}
+POST_SYSCALL(extattr_list_file)
-+(long res, void *path_, long attrnamespace_, void *data_, long nbytes_) {}
++(long long res, void *path_, long long attrnamespace_, void *data_,
++ long long nbytes_) {
++ const char *path = (const char *)path_;
++ if (path) {
++ POST_READ(path, __sanitizer::internal_strlen(path) + 1);
++ }
++}
+PRE_SYSCALL(extattr_list_link)
-+(void *path_, long attrnamespace_, void *data_, long nbytes_) {
++(void *path_, long long attrnamespace_, void *data_, long long nbytes_) {
+ const char *path = (const char *)path_;
+ if (path) {
+ PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
+ }
+}
+POST_SYSCALL(extattr_list_link)
-+(long res, void *path_, long attrnamespace_, void *data_, long nbytes_) {}
++(long long res, void *path_, long long attrnamespace_, void *data_,
++ long long nbytes_) {
++ const char *path = (const char *)path_;
++ if (path) {
++ POST_READ(path, __sanitizer::internal_strlen(path) + 1);
++ }
++}
+PRE_SYSCALL(compat_50_pselect)
-+(long nd_, void *in_, void *ou_, void *ex_, void *ts_, void *mask_) {
++(long long nd_, void *in_, void *ou_, void *ex_, void *ts_, void *mask_) {
+ /* TODO */
+}
+POST_SYSCALL(compat_50_pselect)
-+(long res, long nd_, void *in_, void *ou_, void *ex_, void *ts_, void *mask_) {}
-+PRE_SYSCALL(compat_50_pollts)(void *fds_, long nfds_, void *ts_, void *mask_) {
++(long long res, long long nd_, void *in_, void *ou_, void *ex_, void *ts_,
++ void *mask_) {
++ /* TODO */
++}
++PRE_SYSCALL(compat_50_pollts)
++(void *fds_, long long nfds_, void *ts_, void *mask_) {
+ /* TODO */
+}
+POST_SYSCALL(compat_50_pollts)
-+(long res, void *fds_, long nfds_, void *ts_, void *mask_) {}
++(long long res, void *fds_, long long nfds_, void *ts_, void *mask_) {
++ /* TODO */
++}
+PRE_SYSCALL(setxattr)
-+(void *path_, void *name_, void *value_, long size_, long flags_) {
++(void *path_, void *name_, void *value_, long long size_, long long flags_) {
+ const char *path = (const char *)path_;
+ if (path) {
+ PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
+ }
+}
+POST_SYSCALL(setxattr)
-+(long res, void *path_, void *name_, void *value_, long size_, long flags_) {}
++(long long res, void *path_, void *name_, void *value_, long long size_,
++ long long flags_) {
++ const char *path = (const char *)path_;
++ if (path) {
++ POST_READ(path, __sanitizer::internal_strlen(path) + 1);
++ }
++}
+PRE_SYSCALL(lsetxattr)
-+(void *path_, void *name_, void *value_, long size_, long flags_) {
++(void *path_, void *name_, void *value_, long long size_, long long flags_) {
++ const char *path = (const char *)path_;
++ if (path) {
++ PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
++ }
++}
++POST_SYSCALL(lsetxattr)
++(long long res, void *path_, void *name_, void *value_, long long size_,
++ long long flags_) {
+ const char *path = (const char *)path_;
+ if (path) {
-+ PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
++ POST_READ(path, __sanitizer::internal_strlen(path) + 1);
+ }
+}
-+POST_SYSCALL(lsetxattr)
-+(long res, void *path_, void *name_, void *value_, long size_, long flags_) {}
+PRE_SYSCALL(fsetxattr)
-+(long fd_, void *name_, void *value_, long size_, long flags_) {
++(long long fd_, void *name_, void *value_, long long size_, long long flags_) {
+ /* Nothing to do */
+}
+POST_SYSCALL(fsetxattr)
-+(long res, long fd_, void *name_, void *value_, long size_, long flags_) {}
-+PRE_SYSCALL(getxattr)(void *path_, void *name_, void *value_, long size_) {
++(long long res, long long fd_, void *name_, void *value_, long long size_,
++ long long flags_) {
++ /* Nothing to do */
++}
++PRE_SYSCALL(getxattr)(void *path_, void *name_, void *value_, long long size_) {
+ const char *path = (const char *)path_;
+ if (path) {
+ PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
+ }
+}
+POST_SYSCALL(getxattr)
-+(long res, void *path_, void *name_, void *value_, long size_) {}
-+PRE_SYSCALL(lgetxattr)(void *path_, void *name_, void *value_, long size_) {
++(long long res, void *path_, void *name_, void *value_, long long size_) {
++ const char *path = (const char *)path_;
++ if (path) {
++ POST_READ(path, __sanitizer::internal_strlen(path) + 1);
++ }
++}
++PRE_SYSCALL(lgetxattr)
++(void *path_, void *name_, void *value_, long long size_) {
+ const char *path = (const char *)path_;
+ if (path) {
+ PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
+ }
+}
+POST_SYSCALL(lgetxattr)
-+(long res, void *path_, void *name_, void *value_, long size_) {}
-+PRE_SYSCALL(fgetxattr)(long fd_, void *name_, void *value_, long size_) {
++(long long res, void *path_, void *name_, void *value_, long long size_) {
++ const char *path = (const char *)path_;
++ if (path) {
++ POST_READ(path, __sanitizer::internal_strlen(path) + 1);
++ }
++}
++PRE_SYSCALL(fgetxattr)
++(long long fd_, void *name_, void *value_, long long size_) {
+ /* Nothing to do */
+}
+POST_SYSCALL(fgetxattr)
-+(long res, long fd_, void *name_, void *value_, long size_) {}
-+PRE_SYSCALL(listxattr)(void *path_, void *list_, long size_) {
++(long long res, long long fd_, void *name_, void *value_, long long size_) {
++ /* Nothing to do */
++}
++PRE_SYSCALL(listxattr)(void *path_, void *list_, long long size_) {
+ const char *path = (const char *)path_;
+ if (path) {
+ PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
+ }
+}
-+POST_SYSCALL(listxattr)(long res, void *path_, void *list_, long size_) {}
-+PRE_SYSCALL(llistxattr)(void *path_, void *list_, long size_) {
++POST_SYSCALL(listxattr)
++(long long res, void *path_, void *list_, long long size_) {
++ const char *path = (const char *)path_;
++ if (path) {
++ POST_READ(path, __sanitizer::internal_strlen(path) + 1);
++ }
++}
++PRE_SYSCALL(llistxattr)(void *path_, void *list_, long long size_) {
+ const char *path = (const char *)path_;
+ if (path) {
+ PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
+ }
+}
-+POST_SYSCALL(llistxattr)(long res, void *path_, void *list_, long size_) {}
-+PRE_SYSCALL(flistxattr)(long fd_, void *list_, long size_) { /* TODO */ }
-+POST_SYSCALL(flistxattr)(long res, long fd_, void *list_, long size_) {}
++POST_SYSCALL(llistxattr)
++(long long res, void *path_, void *list_, long long size_) {
++ const char *path = (const char *)path_;
++ if (path) {
++ POST_READ(path, __sanitizer::internal_strlen(path) + 1);
++ }
++}
++PRE_SYSCALL(flistxattr)(long long fd_, void *list_, long long size_) {
++ /* TODO */
++}
++POST_SYSCALL(flistxattr)
++(long long res, long long fd_, void *list_, long long size_) {
++ /* TODO */
++}
+PRE_SYSCALL(removexattr)(void *path_, void *name_) {
+ const char *path = (const char *)path_;
+ if (path) {
+ PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
+ }
+}
-+POST_SYSCALL(removexattr)(long res, void *path_, void *name_) {}
++POST_SYSCALL(removexattr)(long long res, void *path_, void *name_) {
++ const char *path = (const char *)path_;
++ if (path) {
++ POST_READ(path, __sanitizer::internal_strlen(path) + 1);
++ }
++}
+PRE_SYSCALL(lremovexattr)(void *path_, void *name_) {
+ const char *path = (const char *)path_;
+ if (path) {
+ PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
+ }
+}
-+POST_SYSCALL(lremovexattr)(long res, void *path_, void *name_) {}
-+PRE_SYSCALL(fremovexattr)(long fd_, void *name_) { /* TODO */ }
-+POST_SYSCALL(fremovexattr)(long res, long fd_, void *name_) {}
++POST_SYSCALL(lremovexattr)(long long res, void *path_, void *name_) {
++ const char *path = (const char *)path_;
++ if (path) {
++ POST_READ(path, __sanitizer::internal_strlen(path) + 1);
++ }
++}
++PRE_SYSCALL(fremovexattr)(long long fd_, void *name_) { /* TODO */ }
++POST_SYSCALL(fremovexattr)(long long res, long long fd_, void *name_) {
++ /* TODO */
++}
+PRE_SYSCALL(compat_50___stat30)(void *path_, void *ub_) { /* TODO */ }
-+POST_SYSCALL(compat_50___stat30)(long res, void *path_, void *ub_) {}
-+PRE_SYSCALL(compat_50___fstat30)(long fd_, void *sb_) { /* TODO */ }
-+POST_SYSCALL(compat_50___fstat30)(long res, long fd_, void *sb_) {}
++POST_SYSCALL(compat_50___stat30)(long long res, void *path_, void *ub_) {
++ /* TODO */
++}
++PRE_SYSCALL(compat_50___fstat30)(long long fd_, void *sb_) { /* TODO */ }
++POST_SYSCALL(compat_50___fstat30)(long long res, long long fd_, void *sb_) {
++ /* TODO */
++}
+PRE_SYSCALL(compat_50___lstat30)(void *path_, void *ub_) { /* TODO */ }
-+POST_SYSCALL(compat_50___lstat30)(long res, void *path_, void *ub_) {}
-+PRE_SYSCALL(__getdents30)(long fd_, void *buf_, long count_) {
++POST_SYSCALL(compat_50___lstat30)(long long res, void *path_, void *ub_) {
++ /* TODO */
++}
++PRE_SYSCALL(__getdents30)(long long fd_, void *buf_, long long count_) {
++ /* Nothing to do */
++}
++POST_SYSCALL(__getdents30)
++(long long res, long long fd_, void *buf_, long long count_) {
+ /* Nothing to do */
+}
-+POST_SYSCALL(__getdents30)(long res, long fd_, void *buf_, long count_) {}
-+PRE_SYSCALL(posix_fadvise)(long) { /* Nothing to do */ }
-+POST_SYSCALL(posix_fadvise)(long res, long) {}
++PRE_SYSCALL(posix_fadvise)(long long) { /* Nothing to do */ }
++POST_SYSCALL(posix_fadvise)(long long res, long long) { /* Nothing to do */ }
+PRE_SYSCALL(compat_30___fhstat30)(void *fhp_, void *sb_) { /* TODO */ }
-+POST_SYSCALL(compat_30___fhstat30)(long res, void *fhp_, void *sb_) {}
++POST_SYSCALL(compat_30___fhstat30)(long long res, void *fhp_, void *sb_) {
++ /* TODO */
++}
+PRE_SYSCALL(compat_50___ntp_gettime30)(void *ntvp_) { /* TODO */ }
-+POST_SYSCALL(compat_50___ntp_gettime30)(long res, void *ntvp_) {}
-+PRE_SYSCALL(__socket30)(long domain_, long type_, long protocol_) {
++POST_SYSCALL(compat_50___ntp_gettime30)(long long res, void *ntvp_) {
++ /* TODO */
++}
++PRE_SYSCALL(__socket30)
++(long long domain_, long long type_, long long protocol_) {
++ /* Nothing to do */
++}
++POST_SYSCALL(__socket30)
++(long long res, long long domain_, long long type_, long long protocol_) {
+ /* Nothing to do */
+}
-+POST_SYSCALL(__socket30)(long res, long domain_, long type_, long protocol_) {}
+PRE_SYSCALL(__getfh30)(void *fname_, void *fhp_, void *fh_size_) {
+ const char *fname = (const char *)fname_;
+ if (fname) {
+ PRE_READ(fname, __sanitizer::internal_strlen(fname) + 1);
+ }
+}
-+POST_SYSCALL(__getfh30)(long res, void *fname_, void *fhp_, void *fh_size_) {}
-+PRE_SYSCALL(__fhopen40)(void *fhp_, long fh_size_, long flags_) {
++POST_SYSCALL(__getfh30)
++(long long res, void *fname_, void *fhp_, void *fh_size_) {
++ const char *fname = (const char *)fname_;
++ if (res == 0) {
++ if (fname) {
++ POST_READ(fname, __sanitizer::internal_strlen(fname) + 1);
++ }
++ }
++}
++PRE_SYSCALL(__fhopen40)(void *fhp_, long long fh_size_, long long flags_) {
+ if (fhp_) {
+ PRE_READ(fhp_, fh_size_);
+ }
+}
-+POST_SYSCALL(__fhopen40)(long res, void *fhp_, long fh_size_, long flags_) {}
++POST_SYSCALL(__fhopen40)
++(long long res, void *fhp_, long long fh_size_, long long flags_) {}
+PRE_SYSCALL(__fhstatvfs140)
-+(void *fhp_, long fh_size_, void *buf_, long flags_) {
++(void *fhp_, long long fh_size_, void *buf_, long long flags_) {
+ if (fhp_) {
+ PRE_READ(fhp_, fh_size_);
+ }
+}
+POST_SYSCALL(__fhstatvfs140)
-+(long res, void *fhp_, long fh_size_, void *buf_, long flags_) {}
-+PRE_SYSCALL(compat_50___fhstat40)(void *fhp_, long fh_size_, void *sb_) {
++(long long res, void *fhp_, long long fh_size_, void *buf_, long long flags_) {}
++PRE_SYSCALL(compat_50___fhstat40)(void *fhp_, long long fh_size_, void *sb_) {
+ if (fhp_) {
+ PRE_READ(fhp_, fh_size_);
+ }
+}
+POST_SYSCALL(compat_50___fhstat40)
-+(long res, void *fhp_, long fh_size_, void *sb_) {}
-+PRE_SYSCALL(aio_cancel)(long fildes_, void *aiocbp_) {
++(long long res, void *fhp_, long long fh_size_, void *sb_) {}
++PRE_SYSCALL(aio_cancel)(long long fildes_, void *aiocbp_) {
+ if (aiocbp_) {
+ PRE_READ(aiocbp_, sizeof(struct __sanitizer_aiocb));
+ }
+}
-+POST_SYSCALL(aio_cancel)(long res, long fildes_, void *aiocbp_) {}
++POST_SYSCALL(aio_cancel)(long long res, long long fildes_, void *aiocbp_) {}
+PRE_SYSCALL(aio_error)(void *aiocbp_) {
+ if (aiocbp_) {
+ PRE_READ(aiocbp_, sizeof(struct __sanitizer_aiocb));
+ }
+}
-+POST_SYSCALL(aio_error)(long res, void *aiocbp_) {}
-+PRE_SYSCALL(aio_fsync)(long op_, void *aiocbp_) {
++POST_SYSCALL(aio_error)(long long res, void *aiocbp_) {}
++PRE_SYSCALL(aio_fsync)(long long op_, void *aiocbp_) {
+ if (aiocbp_) {
+ PRE_READ(aiocbp_, sizeof(struct __sanitizer_aiocb));
+ }
+}
-+POST_SYSCALL(aio_fsync)(long res, long op_, void *aiocbp_) {}
++POST_SYSCALL(aio_fsync)(long long res, long long op_, void *aiocbp_) {}
+PRE_SYSCALL(aio_read)(void *aiocbp_) {
+ if (aiocbp_) {
+ PRE_READ(aiocbp_, sizeof(struct __sanitizer_aiocb));
+ }
+}
-+POST_SYSCALL(aio_read)(long res, void *aiocbp_) {}
++POST_SYSCALL(aio_read)(long long res, void *aiocbp_) {}
+PRE_SYSCALL(aio_return)(void *aiocbp_) {
+ if (aiocbp_) {
+ PRE_READ(aiocbp_, sizeof(struct __sanitizer_aiocb));
+ }
+}
-+POST_SYSCALL(aio_return)(long res, void *aiocbp_) {}
-+PRE_SYSCALL(compat_50_aio_suspend)(void *list_, long nent_, void *timeout_) {
++POST_SYSCALL(aio_return)(long long res, void *aiocbp_) {}
++PRE_SYSCALL(compat_50_aio_suspend)
++(void *list_, long long nent_, void *timeout_) {
+ /* TODO */
+}
+POST_SYSCALL(compat_50_aio_suspend)
-+(long res, void *list_, long nent_, void *timeout_) {}
++(long long res, void *list_, long long nent_, void *timeout_) {
++ /* TODO */
++}
+PRE_SYSCALL(aio_write)(void *aiocbp_) {
+ if (aiocbp_) {
+ PRE_READ(aiocbp_, sizeof(struct __sanitizer_aiocb));
+ }
+}
-+POST_SYSCALL(aio_write)(long res, void *aiocbp_) {}
-+PRE_SYSCALL(lio_listio)(long mode_, void *list_, long nent_, void *sig_) {
++POST_SYSCALL(aio_write)(long long res, void *aiocbp_) {}
++PRE_SYSCALL(lio_listio)
++(long long mode_, void *list_, long long nent_, void *sig_) {
+ /* Nothing to do */
+}
+POST_SYSCALL(lio_listio)
-+(long res, long mode_, void *list_, long nent_, void *sig_) {}
++(long long res, long long mode_, void *list_, long long nent_, void *sig_) {
++ /* Nothing to do */
++}
+/* syscall 407 has been skipped */
+/* syscall 408 has been skipped */
+/* syscall 409 has been skipped */
+PRE_SYSCALL(__mount50)
-+(void *type_, void *path_, long flags_, void *data_, long data_len_) {
++(void *type_, void *path_, long long flags_, void *data_, long long data_len_) {
+ const char *type = (const char *)type_;
+ const char *path = (const char *)path_;
+ if (type) {
@@ -1749,44 +2955,75 @@ $NetBSD$
+ }
+}
+POST_SYSCALL(__mount50)
-+(long res, void *type_, void *path_, long flags_, void *data_, long data_len_) {
++(long long res, void *type_, void *path_, long long flags_, void *data_,
++ long long data_len_) {
++ const char *type = (const char *)type_;
++ const char *path = (const char *)path_;
++ if (type) {
++ POST_READ(type, __sanitizer::internal_strlen(type) + 1);
++ }
++ if (path) {
++ POST_READ(path, __sanitizer::internal_strlen(path) + 1);
++ }
++ if (data_) {
++ POST_READ(data_, data_len_);
++ }
+}
+PRE_SYSCALL(mremap)
-+(void *old_address_, long old_size_, void *new_address_, long new_size_,
-+ long flags_) {
++(void *old_address_, long long old_size_, void *new_address_,
++ long long new_size_, long long flags_) {
+ /* Nothing to do */
+}
+POST_SYSCALL(mremap)
-+(long res, void *old_address_, long old_size_, void *new_address_,
-+ long new_size_, long flags_) {}
++(long long res, void *old_address_, long long old_size_, void *new_address_,
++ long long new_size_, long long flags_) {
++ /* Nothing to do */
++}
+PRE_SYSCALL(pset_create)(void *psid_) { /* Nothing to do */ }
-+POST_SYSCALL(pset_create)(long res, void *psid_) {}
-+PRE_SYSCALL(pset_destroy)(long psid_) { /* Nothing to do */ }
-+POST_SYSCALL(pset_destroy)(long res, long psid_) {}
-+PRE_SYSCALL(pset_assign)(long psid_, long cpuid_, void *opsid_) {
++POST_SYSCALL(pset_create)(long long res, void *psid_) { /* Nothing to do */ }
++PRE_SYSCALL(pset_destroy)(long long psid_) { /* Nothing to do */ }
++POST_SYSCALL(pset_destroy)(long long res, long long psid_) {
++ /* Nothing to do */
++}
++PRE_SYSCALL(pset_assign)(long long psid_, long long cpuid_, void *opsid_) {
++ /* Nothing to do */
++}
++POST_SYSCALL(pset_assign)
++(long long res, long long psid_, long long cpuid_, void *opsid_) {
+ /* Nothing to do */
+}
-+POST_SYSCALL(pset_assign)(long res, long psid_, long cpuid_, void *opsid_) {}
+PRE_SYSCALL(_pset_bind)
-+(long idtype_, long first_id_, long second_id_, long psid_, void *opsid_) {
++(long long idtype_, long long first_id_, long long second_id_, long long psid_,
++ void *opsid_) {
+ /* Nothing to do */
+}
+POST_SYSCALL(_pset_bind)
-+(long res, long idtype_, long first_id_, long second_id_, long psid_,
-+ void *opsid_) {}
++(long long res, long long idtype_, long long first_id_, long long second_id_,
++ long long psid_, void *opsid_) {
++ /* Nothing to do */
++}
+PRE_SYSCALL(__posix_fadvise50)
-+(long fd_, long PAD_, long offset_, long len_, long advice_) {
++(long long fd_, long long PAD_, long long offset_, long long len_,
++ long long advice_) {
+ /* Nothing to do */
+}
+POST_SYSCALL(__posix_fadvise50)
-+(long res, long fd_, long PAD_, long offset_, long len_, long advice_) {}
-+PRE_SYSCALL(__select50)(long nd_, void *in_, void *ou_, void *ex_, void *tv_) {
++(long long res, long long fd_, long long PAD_, long long offset_,
++ long long len_, long long advice_) {
++ /* Nothing to do */
++}
++PRE_SYSCALL(__select50)
++(long long nd_, void *in_, void *ou_, void *ex_, void *tv_) {
+ /* Nothing to do */
+}
+POST_SYSCALL(__select50)
-+(long res, long nd_, void *in_, void *ou_, void *ex_, void *tv_) {}
++(long long res, long long nd_, void *in_, void *ou_, void *ex_, void *tv_) {
++ /* Nothing to do */
++}
+PRE_SYSCALL(__gettimeofday50)(void *tp_, void *tzp_) { /* Nothing to do */ }
-+POST_SYSCALL(__gettimeofday50)(long res, void *tp_, void *tzp_) {}
++POST_SYSCALL(__gettimeofday50)(long long res, void *tp_, void *tzp_) {
++ /* Nothing to do */
++}
+PRE_SYSCALL(__settimeofday50)(void *tv_, void *tzp_) {
+ if (tv_) {
+ PRE_READ(tv_, timeval_sz);
@@ -1795,7 +3032,7 @@ $NetBSD$
+ PRE_READ(tzp_, struct_timezone_sz);
+ }
+}
-+POST_SYSCALL(__settimeofday50)(long res, void *tv_, void *tzp_) {}
++POST_SYSCALL(__settimeofday50)(long long res, void *tv_, void *tzp_) {}
+PRE_SYSCALL(__utimes50)(void *path_, void *tptr_) {
+ struct __sanitizer_timespec **tptr = (struct __sanitizer_timespec **)tptr_;
+ const char *path = (const char *)path_;
@@ -1807,23 +3044,25 @@ $NetBSD$
+ PRE_READ(tptr[1], struct_timespec_sz);
+ }
+}
-+POST_SYSCALL(__utimes50)(long res, void *path_, void *tptr_) {}
++POST_SYSCALL(__utimes50)(long long res, void *path_, void *tptr_) {}
+PRE_SYSCALL(__adjtime50)(void *delta_, void *olddelta_) {
+ if (delta_) {
+ PRE_READ(delta_, timeval_sz);
+ }
+}
-+POST_SYSCALL(__adjtime50)(long res, void *delta_, void *olddelta_) {}
++POST_SYSCALL(__adjtime50)(long long res, void *delta_, void *olddelta_) {}
+PRE_SYSCALL(__lfs_segwait50)(void *fsidp_, void *tv_) { /* TODO */ }
-+POST_SYSCALL(__lfs_segwait50)(long res, void *fsidp_, void *tv_) {}
-+PRE_SYSCALL(__futimes50)(long fd_, void *tptr_) {
++POST_SYSCALL(__lfs_segwait50)(long long res, void *fsidp_, void *tv_) {
++ /* TODO */
++}
++PRE_SYSCALL(__futimes50)(long long fd_, void *tptr_) {
+ struct __sanitizer_timespec **tptr = (struct __sanitizer_timespec **)tptr_;
+ if (tptr) {
+ PRE_READ(tptr[0], struct_timespec_sz);
+ PRE_READ(tptr[1], struct_timespec_sz);
+ }
+}
-+POST_SYSCALL(__futimes50)(long res, long fd_, void *tptr_) {}
++POST_SYSCALL(__futimes50)(long long res, long long fd_, void *tptr_) {}
+PRE_SYSCALL(__lutimes50)(void *path_, void *tptr_) {
+ struct __sanitizer_timespec **tptr = (struct __sanitizer_timespec **)tptr_;
+ const char *path = (const char *)path_;
@@ -1835,8 +3074,18 @@ $NetBSD$
+ PRE_READ(tptr[1], struct_timespec_sz);
+ }
+}
-+POST_SYSCALL(__lutimes50)(long res, void *path_, void *tptr_) {}
-+PRE_SYSCALL(__setitimer50)(long which_, void *itv_, void *oitv_) {
++POST_SYSCALL(__lutimes50)(long long res, void *path_, void *tptr_) {
++ struct __sanitizer_timespec **tptr = (struct __sanitizer_timespec **)tptr_;
++ const char *path = (const char *)path_;
++ if (path) {
++ POST_READ(path, __sanitizer::internal_strlen(path) + 1);
++ }
++ if (tptr) {
++ POST_READ(tptr[0], struct_timespec_sz);
++ POST_READ(tptr[1], struct_timespec_sz);
++ }
++}
++PRE_SYSCALL(__setitimer50)(long long which_, void *itv_, void *oitv_) {
+ struct __sanitizer_itimerval *itv = (struct __sanitizer_itimerval *)itv_;
+ if (itv) {
+ PRE_READ(&itv->it_interval.tv_sec, sizeof(__sanitizer_time_t));
@@ -1845,27 +3094,37 @@ $NetBSD$
+ PRE_READ(&itv->it_value.tv_usec, sizeof(__sanitizer_suseconds_t));
+ }
+}
-+POST_SYSCALL(__setitimer50)(long res, long which_, void *itv_, void *oitv_) {}
-+PRE_SYSCALL(__getitimer50)(long which_, void *itv_) { /* Nothing to do */ }
-+POST_SYSCALL(__getitimer50)(long res, long which_, void *itv_) {}
-+PRE_SYSCALL(__clock_gettime50)(long clock_id_, void *tp_) {
++POST_SYSCALL(__setitimer50)
++(long long res, long long which_, void *itv_, void *oitv_) {}
++PRE_SYSCALL(__getitimer50)(long long which_, void *itv_) { /* Nothing to do */ }
++POST_SYSCALL(__getitimer50)(long long res, long long which_, void *itv_) {
++ /* Nothing to do */
++}
++PRE_SYSCALL(__clock_gettime50)(long long clock_id_, void *tp_) {
+ /* Nothing to do */
+}
-+POST_SYSCALL(__clock_gettime50)(long res, long clock_id_, void *tp_) {}
-+PRE_SYSCALL(__clock_settime50)(long clock_id_, void *tp_) {
++POST_SYSCALL(__clock_gettime50)(long long res, long long clock_id_, void *tp_) {
++ /* Nothing to do */
++}
++PRE_SYSCALL(__clock_settime50)(long long clock_id_, void *tp_) {
+ if (tp_) {
+ PRE_READ(tp_, struct_timespec_sz);
+ }
+}
-+POST_SYSCALL(__clock_settime50)(long res, long clock_id_, void *tp_) {}
-+PRE_SYSCALL(__clock_getres50)(long clock_id_, void *tp_) { /* Nothing to do */ }
-+POST_SYSCALL(__clock_getres50)(long res, long clock_id_, void *tp_) {}
++POST_SYSCALL(__clock_settime50)
++(long long res, long long clock_id_, void *tp_) {}
++PRE_SYSCALL(__clock_getres50)(long long clock_id_, void *tp_) {
++ /* Nothing to do */
++}
++POST_SYSCALL(__clock_getres50)(long long res, long long clock_id_, void *tp_) {
++ /* Nothing to do */
++}
+PRE_SYSCALL(__nanosleep50)(void *rqtp_, void *rmtp_) {
+ if (rqtp_) {
+ PRE_READ(rqtp_, struct_timespec_sz);
+ }
+}
-+POST_SYSCALL(__nanosleep50)(long res, void *rqtp_, void *rmtp_) {}
++POST_SYSCALL(__nanosleep50)(long long res, void *rqtp_, void *rmtp_) {}
+PRE_SYSCALL(____sigtimedwait50)(void *set_, void *info_, void *timeout_) {
+ if (set_) {
+ PRE_READ(set_, sizeof(__sanitizer_sigset_t));
@@ -1875,9 +3134,9 @@ $NetBSD$
+ }
+}
+POST_SYSCALL(____sigtimedwait50)
-+(long res, void *set_, void *info_, void *timeout_) {}
++(long long res, void *set_, void *info_, void *timeout_) {}
+PRE_SYSCALL(__mq_timedsend50)
-+(long mqdes_, void *msg_ptr_, long msg_len_, long msg_prio_,
++(long long mqdes_, void *msg_ptr_, long long msg_len_, long long msg_prio_,
+ void *abs_timeout_) {
+ if (msg_ptr_) {
+ PRE_READ(msg_ptr_, msg_len_);
@@ -1887,10 +3146,10 @@ $NetBSD$
+ }
+}
+POST_SYSCALL(__mq_timedsend50)
-+(long res, long mqdes_, void *msg_ptr_, long msg_len_, long msg_prio_,
-+ void *abs_timeout_) {}
++(long long res, long long mqdes_, void *msg_ptr_, long long msg_len_,
++ long long msg_prio_, void *abs_timeout_) {}
+PRE_SYSCALL(__mq_timedreceive50)
-+(long mqdes_, void *msg_ptr_, long msg_len_, void *msg_prio_,
++(long long mqdes_, void *msg_ptr_, long long msg_len_, void *msg_prio_,
+ void *abs_timeout_) {
+ if (msg_ptr_) {
+ PRE_READ(msg_ptr_, msg_len_);
@@ -1900,17 +3159,19 @@ $NetBSD$
+ }
+}
+POST_SYSCALL(__mq_timedreceive50)
-+(long res, long mqdes_, void *msg_ptr_, long msg_len_, void *msg_prio_,
-+ void *abs_timeout_) {}
++(long long res, long long mqdes_, void *msg_ptr_, long long msg_len_,
++ void *msg_prio_, void *abs_timeout_) {}
+PRE_SYSCALL(compat_60__lwp_park)
-+(void *ts_, long unpark_, void *hint_, void *unparkhint_) {
++(void *ts_, long long unpark_, void *hint_, void *unparkhint_) {
+ /* TODO */
+}
+POST_SYSCALL(compat_60__lwp_park)
-+(long res, void *ts_, long unpark_, void *hint_, void *unparkhint_) {}
++(long long res, void *ts_, long long unpark_, void *hint_, void *unparkhint_) {
++ /* TODO */
++}
+PRE_SYSCALL(__kevent50)
-+(long fd_, void *changelist_, long nchanges_, void *eventlist_, long nevents_,
-+ void *timeout_) {
++(long long fd_, void *changelist_, long long nchanges_, void *eventlist_,
++ long long nevents_, void *timeout_) {
+ if (changelist_) {
+ PRE_READ(changelist_, nchanges_ * struct_kevent_sz);
+ }
@@ -1919,10 +3180,10 @@ $NetBSD$
+ }
+}
+POST_SYSCALL(__kevent50)
-+(long res, long fd_, void *changelist_, long nchanges_, void *eventlist_,
-+ long nevents_, void *timeout_) {}
++(long long res, long long fd_, void *changelist_, long long nchanges_,
++ void *eventlist_, long long nevents_, void *timeout_) {}
+PRE_SYSCALL(__pselect50)
-+(long nd_, void *in_, void *ou_, void *ex_, void *ts_, void *mask_) {
++(long long nd_, void *in_, void *ou_, void *ex_, void *ts_, void *mask_) {
+ if (ts_) {
+ PRE_READ(ts_, struct_timespec_sz);
+ }
@@ -1931,8 +3192,9 @@ $NetBSD$
+ }
+}
+POST_SYSCALL(__pselect50)
-+(long res, long nd_, void *in_, void *ou_, void *ex_, void *ts_, void *mask_) {}
-+PRE_SYSCALL(__pollts50)(void *fds_, long nfds_, void *ts_, void *mask_) {
++(long long res, long long nd_, void *in_, void *ou_, void *ex_, void *ts_,
++ void *mask_) {}
++PRE_SYSCALL(__pollts50)(void *fds_, long long nfds_, void *ts_, void *mask_) {
+ if (ts_) {
+ PRE_READ(ts_, struct_timespec_sz);
+ }
@@ -1941,8 +3203,8 @@ $NetBSD$
+ }
+}
+POST_SYSCALL(__pollts50)
-+(long res, void *fds_, long nfds_, void *ts_, void *mask_) {}
-+PRE_SYSCALL(__aio_suspend50)(void *list_, long nent_, void *timeout_) {
++(long long res, void *fds_, long long nfds_, void *ts_, void *mask_) {}
++PRE_SYSCALL(__aio_suspend50)(void *list_, long long nent_, void *timeout_) {
+ int i;
+ const struct aiocb *const *list = (const struct aiocb *const *)list_;
+ if (list) {
@@ -1957,40 +3219,70 @@ $NetBSD$
+ }
+}
+POST_SYSCALL(__aio_suspend50)
-+(long res, void *list_, long nent_, void *timeout_) {}
++(long long res, void *list_, long long nent_, void *timeout_) {}
+PRE_SYSCALL(__stat50)(void *path_, void *ub_) {
+ const char *path = (const char *)path_;
+ if (path) {
+ PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
+ }
+}
-+POST_SYSCALL(__stat50)(long res, void *path_, void *ub_) {}
-+PRE_SYSCALL(__fstat50)(long fd_, void *sb_) { /* Nothing to do */ }
-+POST_SYSCALL(__fstat50)(long res, long fd_, void *sb_) {}
++POST_SYSCALL(__stat50)(long long res, void *path_, void *ub_) {
++ const char *path = (const char *)path_;
++ if (res == 0) {
++ if (path) {
++ POST_READ(path, __sanitizer::internal_strlen(path) + 1);
++ }
++ }
++}
++PRE_SYSCALL(__fstat50)(long long fd_, void *sb_) { /* Nothing to do */ }
++POST_SYSCALL(__fstat50)(long long res, long long fd_, void *sb_) {
++ /* Nothing to do */
++}
+PRE_SYSCALL(__lstat50)(void *path_, void *ub_) {
+ const char *path = (const char *)path_;
+ if (path) {
+ PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
+ }
+}
-+POST_SYSCALL(__lstat50)(long res, void *path_, void *ub_) {}
-+PRE_SYSCALL(____semctl50)(long semid_, long semnum_, long cmd_, void *arg_) {
++POST_SYSCALL(__lstat50)(long long res, void *path_, void *ub_) {
++ const char *path = (const char *)path_;
++ if (res == 0) {
++ if (path) {
++ POST_READ(path, __sanitizer::internal_strlen(path) + 1);
++ }
++ }
++}
++PRE_SYSCALL(____semctl50)
++(long long semid_, long long semnum_, long long cmd_, void *arg_) {
+ /* Nothing to do */
+}
+POST_SYSCALL(____semctl50)
-+(long res, long semid_, long semnum_, long cmd_, void *arg_) {}
-+PRE_SYSCALL(__shmctl50)(long shmid_, long cmd_, void *buf_) {
++(long long res, long long semid_, long long semnum_, long long cmd_,
++ void *arg_) {
++ /* Nothing to do */
++}
++PRE_SYSCALL(__shmctl50)(long long shmid_, long long cmd_, void *buf_) {
++ /* Nothing to do */
++}
++POST_SYSCALL(__shmctl50)
++(long long res, long long shmid_, long long cmd_, void *buf_) {
++ /* Nothing to do */
++}
++PRE_SYSCALL(__msgctl50)(long long msqid_, long long cmd_, void *buf_) {
++ /* Nothing to do */
++}
++POST_SYSCALL(__msgctl50)
++(long long res, long long msqid_, long long cmd_, void *buf_) {
++ /* Nothing to do */
++}
++PRE_SYSCALL(__getrusage50)(long long who_, void *rusage_) {
+ /* Nothing to do */
+}
-+POST_SYSCALL(__shmctl50)(long res, long shmid_, long cmd_, void *buf_) {}
-+PRE_SYSCALL(__msgctl50)(long msqid_, long cmd_, void *buf_) {
++POST_SYSCALL(__getrusage50)(long long res, long long who_, void *rusage_) {
+ /* Nothing to do */
+}
-+POST_SYSCALL(__msgctl50)(long res, long msqid_, long cmd_, void *buf_) {}
-+PRE_SYSCALL(__getrusage50)(long who_, void *rusage_) { /* Nothing to do */ }
-+POST_SYSCALL(__getrusage50)(long res, long who_, void *rusage_) {}
+PRE_SYSCALL(__timer_settime50)
-+(long timerid_, long flags_, void *value_, void *ovalue_) {
++(long long timerid_, long long flags_, void *value_, void *ovalue_) {
+ struct __sanitizer_itimerval *value = (struct __sanitizer_itimerval *)value_;
+ if (value) {
+ PRE_READ(&value->it_interval.tv_sec, sizeof(__sanitizer_time_t));
@@ -2000,52 +3292,101 @@ $NetBSD$
+ }
+}
+POST_SYSCALL(__timer_settime50)
-+(long res, long timerid_, long flags_, void *value_, void *ovalue_) {}
-+PRE_SYSCALL(__timer_gettime50)(long timerid_, void *value_) {
++(long long res, long long timerid_, long long flags_, void *value_,
++ void *ovalue_) {
++ struct __sanitizer_itimerval *value = (struct __sanitizer_itimerval *)value_;
++ if (res == 0) {
++ if (value) {
++ POST_READ(&value->it_interval.tv_sec, sizeof(__sanitizer_time_t));
++ POST_READ(&value->it_interval.tv_usec, sizeof(__sanitizer_suseconds_t));
++ POST_READ(&value->it_value.tv_sec, sizeof(__sanitizer_time_t));
++ POST_READ(&value->it_value.tv_usec, sizeof(__sanitizer_suseconds_t));
++ }
++ }
++}
++PRE_SYSCALL(__timer_gettime50)(long long timerid_, void *value_) {
++ /* Nothing to do */
++}
++POST_SYSCALL(__timer_gettime50)
++(long long res, long long timerid_, void *value_) {
+ /* Nothing to do */
+}
-+POST_SYSCALL(__timer_gettime50)(long res, long timerid_, void *value_) {}
+#if defined(NTP) || !defined(_KERNEL_OPT)
+PRE_SYSCALL(__ntp_gettime50)(void *ntvp_) { /* Nothing to do */ }
-+POST_SYSCALL(__ntp_gettime50)(long res, void *ntvp_) {}
++POST_SYSCALL(__ntp_gettime50)(long long res, void *ntvp_) {
++ /* Nothing to do */
++}
+#else
+/* syscall 448 has been skipped */
+#endif
-+PRE_SYSCALL(__wait450)(long pid_, void *status_, long options_, void *rusage_) {
++PRE_SYSCALL(__wait450)
++(long long pid_, void *status_, long long options_, void *rusage_) {
+ /* Nothing to do */
+}
+POST_SYSCALL(__wait450)
-+(long res, long pid_, void *status_, long options_, void *rusage_) {}
-+PRE_SYSCALL(__mknod50)(void *path_, long mode_, long dev_) {
++(long long res, long long pid_, void *status_, long long options_,
++ void *rusage_) {
++ /* Nothing to do */
++}
++PRE_SYSCALL(__mknod50)(void *path_, long long mode_, long long dev_) {
+ const char *path = (const char *)path_;
+ if (path) {
+ PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
+ }
+}
-+POST_SYSCALL(__mknod50)(long res, void *path_, long mode_, long dev_) {}
-+PRE_SYSCALL(__fhstat50)(void *fhp_, long fh_size_, void *sb_) {
++POST_SYSCALL(__mknod50)
++(long long res, void *path_, long long mode_, long long dev_) {
++ const char *path = (const char *)path_;
++ if (res == 0) {
++ if (path) {
++ POST_READ(path, __sanitizer::internal_strlen(path) + 1);
++ }
++ }
++}
++PRE_SYSCALL(__fhstat50)(void *fhp_, long long fh_size_, void *sb_) {
+ if (fhp_) {
+ PRE_READ(fhp_, fh_size_);
+ }
+}
-+POST_SYSCALL(__fhstat50)(long res, void *fhp_, long fh_size_, void *sb_) {}
++POST_SYSCALL(__fhstat50)
++(long long res, void *fhp_, long long fh_size_, void *sb_) {
++ if (res == 0) {
++ if (fhp_) {
++ POST_READ(fhp_, fh_size_);
++ }
++ }
++}
+/* syscall 452 has been skipped */
-+PRE_SYSCALL(pipe2)(void *fildes_, long flags_) { /* Nothing to do */ }
-+POST_SYSCALL(pipe2)(long res, void *fildes_, long flags_) {}
-+PRE_SYSCALL(dup3)(long from_, long to_, long flags_) { /* Nothing to do */ }
-+POST_SYSCALL(dup3)(long res, long from_, long to_, long flags_) {}
-+PRE_SYSCALL(kqueue1)(long flags_) { /* Nothing to do */ }
-+POST_SYSCALL(kqueue1)(long res, long flags_) {}
++PRE_SYSCALL(pipe2)(void *fildes_, long long flags_) { /* Nothing to do */ }
++POST_SYSCALL(pipe2)(long long res, void *fildes_, long long flags_) {
++ /* Nothing to do */
++}
++PRE_SYSCALL(dup3)(long long from_, long long to_, long long flags_) {
++ /* Nothing to do */
++}
++POST_SYSCALL(dup3)
++(long long res, long long from_, long long to_, long long flags_) {
++ /* Nothing to do */
++}
++PRE_SYSCALL(kqueue1)(long long flags_) { /* Nothing to do */ }
++POST_SYSCALL(kqueue1)(long long res, long long flags_) { /* Nothing to do */ }
+PRE_SYSCALL(paccept)
-+(long s_, void *name_, void *anamelen_, void *mask_, long flags_) {
++(long long s_, void *name_, void *anamelen_, void *mask_, long long flags_) {
+ if (mask_) {
+ PRE_READ(mask_, sizeof(__sanitizer_sigset_t));
+ }
+}
+POST_SYSCALL(paccept)
-+(long res, long s_, void *name_, void *anamelen_, void *mask_, long flags_) {}
++(long long res, long long s_, void *name_, void *anamelen_, void *mask_,
++ long long flags_) {
++ if (res >= 0) {
++ if (mask_) {
++ PRE_READ(mask_, sizeof(__sanitizer_sigset_t));
++ }
++ }
++}
+PRE_SYSCALL(linkat)
-+(long fd1_, void *name1_, long fd2_, void *name2_, long flags_) {
++(long long fd1_, void *name1_, long long fd2_, void *name2_, long long flags_) {
+ const char *name1 = (const char *)name1_;
+ const char *name2 = (const char *)name2_;
+ if (name1) {
@@ -2056,8 +3397,21 @@ $NetBSD$
+ }
+}
+POST_SYSCALL(linkat)
-+(long res, long fd1_, void *name1_, long fd2_, void *name2_, long flags_) {}
-+PRE_SYSCALL(renameat)(long fromfd_, void *from_, long tofd_, void *to_) {
++(long long res, long long fd1_, void *name1_, long long fd2_, void *name2_,
++ long long flags_) {
++ const char *name1 = (const char *)name1_;
++ const char *name2 = (const char *)name2_;
++ if (res == 0) {
++ if (name1) {
++ POST_READ(name1, __sanitizer::internal_strlen(name1) + 1);
++ }
++ if (name2) {
++ POST_READ(name2, __sanitizer::internal_strlen(name2) + 1);
++ }
++ }
++}
++PRE_SYSCALL(renameat)
++(long long fromfd_, void *from_, long long tofd_, void *to_) {
+ const char *from = (const char *)from_;
+ const char *to = (const char *)to_;
+ if (from) {
@@ -2068,80 +3422,134 @@ $NetBSD$
+ }
+}
+POST_SYSCALL(renameat)
-+(long res, long fromfd_, void *from_, long tofd_, void *to_) {}
-+PRE_SYSCALL(mkfifoat)(long fd_, void *path_, long mode_) {
++(long long res, long long fromfd_, void *from_, long long tofd_, void *to_) {
++ const char *from = (const char *)from_;
++ const char *to = (const char *)to_;
++ if (res == 0) {
++ if (from) {
++ POST_READ(from, __sanitizer::internal_strlen(from) + 1);
++ }
++ if (to) {
++ POST_READ(to, __sanitizer::internal_strlen(to) + 1);
++ }
++ }
++}
++PRE_SYSCALL(mkfifoat)(long long fd_, void *path_, long long mode_) {
+ const char *path = (const char *)path_;
+ if (path) {
+ PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
+ }
+}
-+POST_SYSCALL(mkfifoat)(long res, long fd_, void *path_, long mode_) {}
-+PRE_SYSCALL(mknodat)(long fd_, void *path_, long mode_, long PAD_, long dev_) {
++POST_SYSCALL(mkfifoat)
++(long long res, long long fd_, void *path_, long long mode_) {
++ const char *path = (const char *)path_;
++ if (res == 0) {
++ if (path) {
++ POST_READ(path, __sanitizer::internal_strlen(path) + 1);
++ }
++ }
++}
++PRE_SYSCALL(mknodat)
++(long long fd_, void *path_, long long mode_, long long PAD_, long long dev_) {
+ const char *path = (const char *)path_;
+ if (path) {
+ PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
+ }
+}
+POST_SYSCALL(mknodat)
-+(long res, long fd_, void *path_, long mode_, long PAD_, long dev_) {}
-+PRE_SYSCALL(mkdirat)(long fd_, void *path_, long mode_) {
++(long long res, long long fd_, void *path_, long long mode_, long long PAD_,
++ long long dev_) {
++ const char *path = (const char *)path_;
++ if (res == 0) {
++ if (path) {
++ POST_READ(path, __sanitizer::internal_strlen(path) + 1);
++ }
++ }
++}
++PRE_SYSCALL(mkdirat)(long long fd_, void *path_, long long mode_) {
+ const char *path = (const char *)path_;
+ if (path) {
+ PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
+ }
+}
-+POST_SYSCALL(mkdirat)(long res, long fd_, void *path_, long mode_) {}
-+PRE_SYSCALL(faccessat)(long fd_, void *path_, long amode_, long flag_) {
++POST_SYSCALL(mkdirat)
++(long long res, long long fd_, void *path_, long long mode_) {
++ const char *path = (const char *)path_;
++ if (res == 0) {
++ if (path) {
++ POST_READ(path, __sanitizer::internal_strlen(path) + 1);
++ }
++ }
++}
++PRE_SYSCALL(faccessat)
++(long long fd_, void *path_, long long amode_, long long flag_) {
+ const char *path = (const char *)path_;
+ if (path) {
+ PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
+ }
+}
+POST_SYSCALL(faccessat)
-+(long res, long fd_, void *path_, long amode_, long flag_) {}
-+PRE_SYSCALL(fchmodat)(long fd_, void *path_, long mode_, long flag_) {
++(long long res, long long fd_, void *path_, long long amode_, long long flag_) {
++ const char *path = (const char *)path_;
++ if (res == 0) {
++ if (path) {
++ POST_READ(path, __sanitizer::internal_strlen(path) + 1);
++ }
++ }
++}
++PRE_SYSCALL(fchmodat)
++(long long fd_, void *path_, long long mode_, long long flag_) {
+ const char *path = (const char *)path_;
+ if (path) {
+ PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
+ }
+}
+POST_SYSCALL(fchmodat)
-+(long res, long fd_, void *path_, long mode_, long flag_) {}
++(long long res, long long fd_, void *path_, long long mode_, long long flag_) {
++ const char *path = (const char *)path_;
++ if (res == 0) {
++ if (path) {
++ POST_READ(path, __sanitizer::internal_strlen(path) + 1);
++ }
++ }
++}
+PRE_SYSCALL(fchownat)
-+(long fd_, void *path_, long owner_, long group_, long flag_) {
++(long long fd_, void *path_, long long owner_, long long group_,
++ long long flag_) {
+ const char *path = (const char *)path_;
+ if (path) {
+ PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
+ }
+}
+POST_SYSCALL(fchownat)
-+(long res, long fd_, void *path_, long owner_, long group_, long flag_) {}
-+PRE_SYSCALL(fexecve)(long fd_, void *argp_, void *envp_) {
-+ char **argp = (char **)argp_;
-+ char **envp = (char **)envp_;
-+ if (argp && argp[0]) {
-+ char *a = argp[0];
-+ while (a++) {
-+ PRE_READ(a, __sanitizer::internal_strlen(a) + 1);
-+ }
-+ }
-+ if (envp && envp[0]) {
-+ char *e = envp[0];
-+ while (e++) {
-+ PRE_READ(e, __sanitizer::internal_strlen(e) + 1);
++(long long res, long long fd_, void *path_, long long owner_, long long group_,
++ long long flag_) {
++ const char *path = (const char *)path_;
++ if (res == 0) {
++ if (path) {
++ POST_READ(path, __sanitizer::internal_strlen(path) + 1);
+ }
+ }
+}
-+POST_SYSCALL(fexecve)(long res, long fd_, void *argp_, void *envp_) {}
-+PRE_SYSCALL(fstatat)(long fd_, void *path_, void *buf_, long flag_) {
++PRE_SYSCALL(fexecve)(long long fd_, void *argp_, void *envp_) { /* TODO */ }
++POST_SYSCALL(fexecve)(long long res, long long fd_, void *argp_, void *envp_) {
++ /* TODO */
++}
++PRE_SYSCALL(fstatat)(long long fd_, void *path_, void *buf_, long long flag_) {
+ const char *path = (const char *)path_;
+ if (path) {
+ PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
+ }
+}
+POST_SYSCALL(fstatat)
-+(long res, long fd_, void *path_, void *buf_, long flag_) {}
-+PRE_SYSCALL(utimensat)(long fd_, void *path_, void *tptr_, long flag_) {
++(long long res, long long fd_, void *path_, void *buf_, long long flag_) {
++ const char *path = (const char *)path_;
++ if (path) {
++ POST_READ(path, __sanitizer::internal_strlen(path) + 1);
++ }
++}
++PRE_SYSCALL(utimensat)
++(long long fd_, void *path_, void *tptr_, long long flag_) {
+ const char *path = (const char *)path_;
+ if (path) {
+ PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
@@ -2151,24 +3559,51 @@ $NetBSD$
+ }
+}
+POST_SYSCALL(utimensat)
-+(long res, long fd_, void *path_, void *tptr_, long flag_) {}
-+PRE_SYSCALL(openat)(long fd_, void *path_, long oflags_, long mode_) {
++(long long res, long long fd_, void *path_, void *tptr_, long long flag_) {
++ const char *path = (const char *)path_;
++ if (res > 0) {
++ if (path) {
++ POST_READ(path, __sanitizer::internal_strlen(path) + 1);
++ }
++ if (tptr_) {
++ POST_READ(tptr_, struct_timespec_sz);
++ }
++ }
++}
++PRE_SYSCALL(openat)
++(long long fd_, void *path_, long long oflags_, long long mode_) {
+ const char *path = (const char *)path_;
+ if (path) {
+ PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
+ }
+}
+POST_SYSCALL(openat)
-+(long res, long fd_, void *path_, long oflags_, long mode_) {}
-+PRE_SYSCALL(readlinkat)(long fd_, void *path_, void *buf_, long bufsize_) {
++(long long res, long long fd_, void *path_, long long oflags_,
++ long long mode_) {
++ const char *path = (const char *)path_;
++ if (res > 0) {
++ if (path) {
++ POST_READ(path, __sanitizer::internal_strlen(path) + 1);
++ }
++ }
++}
++PRE_SYSCALL(readlinkat)
++(long long fd_, void *path_, void *buf_, long long bufsize_) {
+ const char *path = (const char *)path_;
+ if (path) {
+ PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
+ }
+}
+POST_SYSCALL(readlinkat)
-+(long res, long fd_, void *path_, void *buf_, long bufsize_) {}
-+PRE_SYSCALL(symlinkat)(void *path1_, long fd_, void *path2_) {
++(long long res, long long fd_, void *path_, void *buf_, long long bufsize_) {
++ const char *path = (const char *)path_;
++ if (res > 0) {
++ if (path) {
++ POST_READ(path, __sanitizer::internal_strlen(path) + 1);
++ }
++ }
++}
++PRE_SYSCALL(symlinkat)(void *path1_, long long fd_, void *path2_) {
+ const char *path1 = (const char *)path1_;
+ const char *path2 = (const char *)path2_;
+ if (path1) {
@@ -2178,29 +3613,64 @@ $NetBSD$
+ PRE_READ(path2, __sanitizer::internal_strlen(path2) + 1);
+ }
+}
-+POST_SYSCALL(symlinkat)(long res, void *path1_, long fd_, void *path2_) {}
-+PRE_SYSCALL(unlinkat)(long fd_, void *path_, long flag_) {
++POST_SYSCALL(symlinkat)
++(long long res, void *path1_, long long fd_, void *path2_) {
++ const char *path1 = (const char *)path1_;
++ const char *path2 = (const char *)path2_;
++ if (res == 0) {
++ if (path1) {
++ POST_READ(path1, __sanitizer::internal_strlen(path1) + 1);
++ }
++ if (path2) {
++ POST_READ(path2, __sanitizer::internal_strlen(path2) + 1);
++ }
++ }
++}
++PRE_SYSCALL(unlinkat)(long long fd_, void *path_, long long flag_) {
+ const char *path = (const char *)path_;
+ if (path) {
+ PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
+ }
+}
-+POST_SYSCALL(unlinkat)(long res, long fd_, void *path_, long flag_) {}
-+PRE_SYSCALL(futimens)(long fd_, void *tptr_) {
++POST_SYSCALL(unlinkat)
++(long long res, long long fd_, void *path_, long long flag_) {
++ const char *path = (const char *)path_;
++ if (res == 0) {
++ if (path) {
++ POST_READ(path, __sanitizer::internal_strlen(path) + 1);
++ }
++ }
++}
++PRE_SYSCALL(futimens)(long long fd_, void *tptr_) {
+ struct __sanitizer_timespec **tptr = (struct __sanitizer_timespec **)tptr_;
+ if (tptr) {
+ PRE_READ(tptr[0], struct_timespec_sz);
+ PRE_READ(tptr[1], struct_timespec_sz);
+ }
+}
-+POST_SYSCALL(futimens)(long res, long fd_, void *tptr_) {}
++POST_SYSCALL(futimens)(long long res, long long fd_, void *tptr_) {
++ struct __sanitizer_timespec **tptr = (struct __sanitizer_timespec **)tptr_;
++ if (res == 0) {
++ if (tptr) {
++ POST_READ(tptr[0], struct_timespec_sz);
++ POST_READ(tptr[1], struct_timespec_sz);
++ }
++ }
++}
+PRE_SYSCALL(__quotactl)(void *path_, void *args_) {
+ const char *path = (const char *)path_;
+ if (path) {
+ PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
+ }
+}
-+POST_SYSCALL(__quotactl)(long res, void *path_, void *args_) {}
++POST_SYSCALL(__quotactl)(long long res, void *path_, void *args_) {
++ const char *path = (const char *)path_;
++ if (res == 0) {
++ if (path) {
++ POST_READ(path, __sanitizer::internal_strlen(path) + 1);
++ }
++ }
++}
+PRE_SYSCALL(posix_spawn)
+(void *pid_, void *path_, void *file_actions_, void *attrp_, void *argv_,
+ void *envp_) {
@@ -2210,17 +3680,32 @@ $NetBSD$
+ }
+}
+POST_SYSCALL(posix_spawn)
-+(long res, void *pid_, void *path_, void *file_actions_, void *attrp_,
-+ void *argv_, void *envp_) {}
++(long long res, void *pid_, void *path_, void *file_actions_, void *attrp_,
++ void *argv_, void *envp_) {
++ const char *path = (const char *)path_;
++ if (pid_) {
++ if (path) {
++ POST_READ(path, __sanitizer::internal_strlen(path) + 1);
++ }
++ }
++}
+PRE_SYSCALL(recvmmsg)
-+(long s_, void *mmsg_, long vlen_, long flags_, void *timeout_) {
++(long long s_, void *mmsg_, long long vlen_, long long flags_, void *timeout_) {
+ if (timeout_) {
+ PRE_READ(timeout_, struct_timespec_sz);
+ }
+}
+POST_SYSCALL(recvmmsg)
-+(long res, long s_, void *mmsg_, long vlen_, long flags_, void *timeout_) {}
-+PRE_SYSCALL(sendmmsg)(long s_, void *mmsg_, long vlen_, long flags_) {
++(long long res, long long s_, void *mmsg_, long long vlen_, long long flags_,
++ void *timeout_) {
++ if (res >= 0) {
++ if (timeout_) {
++ POST_READ(timeout_, struct_timespec_sz);
++ }
++ }
++}
++PRE_SYSCALL(sendmmsg)
++(long long s_, void *mmsg_, long long vlen_, long long flags_) {
+ struct __sanitizer_mmsghdr *mmsg = (struct __sanitizer_mmsghdr *)mmsg_;
+ unsigned int vlen = (vlen_ > 1024 ? 1024 : vlen_);
+ if (mmsg) {
@@ -2228,47 +3713,78 @@ $NetBSD$
+ }
+}
+POST_SYSCALL(sendmmsg)
-+(long res, long s_, void *mmsg_, long vlen_, long flags_) {}
++(long long res, long long s_, void *mmsg_, long long vlen_, long long flags_) {
++ struct __sanitizer_mmsghdr *mmsg = (struct __sanitizer_mmsghdr *)mmsg_;
++ unsigned int vlen = (vlen_ > 1024 ? 1024 : vlen_);
++ if (res >= 0) {
++ if (mmsg) {
++ POST_READ(mmsg, sizeof(struct __sanitizer_mmsghdr) * vlen);
++ }
++ }
++}
+PRE_SYSCALL(clock_nanosleep)
-+(long clock_id_, long flags_, void *rqtp_, void *rmtp_) {
++(long long clock_id_, long long flags_, void *rqtp_, void *rmtp_) {
+ if (rqtp_) {
+ PRE_READ(rqtp_, struct_timespec_sz);
+ }
+}
+POST_SYSCALL(clock_nanosleep)
-+(long res, long clock_id_, long flags_, void *rqtp_, void *rmtp_) {}
++(long long res, long long clock_id_, long long flags_, void *rqtp_,
++ void *rmtp_) {
++ if (rqtp_) {
++ POST_READ(rqtp_, struct_timespec_sz);
++ }
++}
+PRE_SYSCALL(___lwp_park60)
-+(long clock_id_, long flags_, void *ts_, long unpark_, void *hint_,
-+ void *unparkhint_) {
++(long long clock_id_, long long flags_, void *ts_, long long unpark_,
++ void *hint_, void *unparkhint_) {
+ if (ts_) {
+ PRE_READ(ts_, struct_timespec_sz);
+ }
+}
+POST_SYSCALL(___lwp_park60)
-+(long res, long clock_id_, long flags_, void *ts_, long unpark_, void *hint_,
-+ void *unparkhint_) {}
-+PRE_SYSCALL(posix_fallocate)(long fd_, long PAD_, long pos_, long len_) {
++(long long res, long long clock_id_, long long flags_, void *ts_,
++ long long unpark_, void *hint_, void *unparkhint_) {
++ if (res == 0) {
++ if (ts_) {
++ POST_READ(ts_, struct_timespec_sz);
++ }
++ }
++}
++PRE_SYSCALL(posix_fallocate)
++(long long fd_, long long PAD_, long long pos_, long long len_) {
+ /* Nothing to do */
+}
+POST_SYSCALL(posix_fallocate)
-+(long res, long fd_, long PAD_, long pos_, long len_) {}
-+PRE_SYSCALL(fdiscard)(long fd_, long PAD_, long pos_, long len_) {
++(long long res, long long fd_, long long PAD_, long long pos_, long long len_) {
++ /* Nothing to do */
++}
++PRE_SYSCALL(fdiscard)
++(long long fd_, long long PAD_, long long pos_, long long len_) {
++ /* Nothing to do */
++}
++POST_SYSCALL(fdiscard)
++(long long res, long long fd_, long long PAD_, long long pos_, long long len_) {
+ /* Nothing to do */
+}
-+POST_SYSCALL(fdiscard)(long res, long fd_, long PAD_, long pos_, long len_) {}
+PRE_SYSCALL(wait6)
-+(long idtype_, long id_, void *status_, long options_, void *wru_,
-+ void *info_) {
++(long long idtype_, long long id_, void *status_, long long options_,
++ void *wru_, void *info_) {
+ /* Nothing to do */
+}
+POST_SYSCALL(wait6)
-+(long res, long idtype_, long id_, void *status_, long options_, void *wru_,
-+ void *info_) {}
-+PRE_SYSCALL(clock_getcpuclockid2)(long idtype_, long id_, void *clock_id_) {
++(long long res, long long idtype_, long long id_, void *status_,
++ long long options_, void *wru_, void *info_) {
++ /* Nothing to do */
++}
++PRE_SYSCALL(clock_getcpuclockid2)
++(long long idtype_, long long id_, void *clock_id_) {
+ /* Nothing to do */
+}
+POST_SYSCALL(clock_getcpuclockid2)
-+(long res, long idtype_, long id_, void *clock_id_) {}
++(long long res, long long idtype_, long long id_, void *clock_id_) {
++ /* Nothing to do */
++}
+#undef SYS_MAXSYSARGS
+} // extern "C"
+
diff --git a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.cc b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.cc
index 55175b5d12..cb98d0b252 100644
--- a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.cc
+++ b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.cc
@@ -10,10 +10,19 @@ $NetBSD$
#include <sys/filio.h>
#include <sys/ipc.h>
#include <sys/mman.h>
-@@ -99,18 +100,66 @@ unsigned struct_sockaddr_sz = sizeof(str
+@@ -44,6 +45,7 @@
+ #include <sys/mtio.h>
+ #include <sys/ptrace.h>
+ #include <sys/resource.h>
++#include <sys/sem.h>
+ #include <sys/shm.h>
+ #include <sys/signal.h>
+ #include <sys/socket.h>
+@@ -99,18 +101,83 @@ unsigned struct_sockaddr_sz = sizeof(str
unsigned ucontext_t_sz = sizeof(ucontext_t);
unsigned struct_rlimit_sz = sizeof(struct rlimit);
unsigned struct_timespec_sz = sizeof(struct timespec);
++unsigned struct_sembuf_sz = sizeof(struct sembuf);
+unsigned struct_kevent_sz = sizeof(struct kevent);
unsigned struct_utimbuf_sz = sizeof(struct utimbuf);
unsigned struct_itimerspec_sz = sizeof(struct itimerspec);
@@ -29,30 +38,46 @@ $NetBSD$
const uptr sa_siginfo = (uptr)SA_SIGINFO;
+int ptrace_pt_io = PT_IO;
++int ptrace_pt_lwpinfo = PT_LWPINFO;
+int ptrace_pt_set_event_mask = PT_SET_EVENT_MASK;
++int ptrace_pt_get_event_mask = PT_GET_EVENT_MASK;
++int ptrace_pt_get_process_state = PT_GET_PROCESS_STATE;
+int ptrace_pt_set_siginfo = PT_SET_SIGINFO;
++int ptrace_pt_get_siginfo = PT_GET_SIGINFO;
+int ptrace_pt_set_sigmask = PT_SET_SIGMASK;
++int ptrace_pt_get_sigmask = PT_GET_SIGMASK;
++int ptrace_piod_read_d = PIOD_READ_D;
+int ptrace_piod_write_d = PIOD_WRITE_D;
++int ptrace_piod_read_i = PIOD_READ_I;
+int ptrace_piod_write_i = PIOD_WRITE_I;
++int ptrace_piod_read_auxv = PIOD_READ_AUXV;
+
-+#if defined(PT_SETREGS)
++#if defined(PT_SETREGS) && defined(PT_GETREGS)
+int ptrace_pt_setregs = PT_SETREGS;
++int ptrace_pt_getregs = PT_GETREGS;
+#else
+int ptrace_pt_setregs = -1;
++int ptrace_pt_getregs = -1;
+#endif
+
-+#if defined(PT_SETFPREGS)
++#if defined(PT_SETFPREGS) && defined(PT_GETFPREGS)
+int ptrace_pt_setfpregs = PT_SETFPREGS;
++int ptrace_pt_getfpregs = PT_GETFPREGS;
+#else
+int ptrace_pt_setfpregs = -1;
++int ptrace_pt_getfpregs = -1;
+#endif
+
-+#if defined(PT_SETDBREGS)
++#if defined(PT_SETDBREGS) && defined(PT_GETDBREGS)
+int ptrace_pt_setdbregs = PT_SETDBREGS;
++int ptrace_pt_getdbregs = PT_GETDBREGS;
+#else
+int ptrace_pt_setdbregs = -1;
++int ptrace_pt_getdbregs = -1;
+#endif
+
++unsigned struct_ptrace_ptrace_io_desc_struct_sz = sizeof(struct ptrace_io_desc);
++unsigned struct_ptrace_ptrace_lwpinfo_struct_sz = sizeof(struct ptrace_lwpinfo);
+unsigned struct_ptrace_ptrace_event_struct_sz = sizeof(ptrace_event_t);
+unsigned struct_ptrace_ptrace_siginfo_struct_sz = sizeof(ptrace_siginfo_t);
+
diff --git a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.h b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.h
index 764f9dfe7d..021e7efab4 100644
--- a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.h
+++ b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.h
@@ -1,10 +1,12 @@
$NetBSD$
---- lib/sanitizer_common/sanitizer_platform_limits_netbsd.h.orig 2017-12-21 18:53:10.665534563 +0000
+--- lib/sanitizer_common/sanitizer_platform_limits_netbsd.h.orig 2017-12-21 18:53:10.000000000 +0000
+++ lib/sanitizer_common/sanitizer_platform_limits_netbsd.h
-@@ -58,32 +58,34 @@ extern unsigned struct_rlimit_sz;
+@@ -57,33 +57,36 @@ extern unsigned ucontext_t_sz;
+ extern unsigned struct_rlimit_sz;
extern unsigned struct_utimbuf_sz;
extern unsigned struct_timespec_sz;
++extern unsigned struct_sembuf_sz;
-struct __sanitizer_iocb {
+extern unsigned struct_kevent_sz;
@@ -58,7 +60,13 @@ $NetBSD$
struct __sanitizer_sem_t {
uptr data[5];
};
-@@ -135,6 +137,23 @@ typedef unsigned __sanitizer_pthread_key
+@@ -131,10 +134,29 @@ struct __sanitizer_ifaddrs {
+ unsigned int ifa_addrflags;
+ };
+
++typedef unsigned int __sanitizer_socklen_t;
++
+ typedef unsigned __sanitizer_pthread_key_t;
typedef long long __sanitizer_time_t;
@@ -82,7 +90,7 @@ $NetBSD$
struct __sanitizer_passwd {
char *pw_name;
char *pw_passwd;
-@@ -189,6 +208,12 @@ struct __sanitizer_msghdr {
+@@ -189,6 +211,12 @@ struct __sanitizer_msghdr {
unsigned msg_controllen;
int msg_flags;
};
@@ -95,7 +103,7 @@ $NetBSD$
struct __sanitizer_cmsghdr {
unsigned cmsg_len;
int cmsg_level;
-@@ -241,6 +266,22 @@ struct __sanitizer_sigaction {
+@@ -241,6 +269,22 @@ struct __sanitizer_sigaction {
int sa_flags;
};
@@ -118,7 +126,7 @@ $NetBSD$
typedef __sanitizer_sigset_t __sanitizer_kernel_sigset_t;
struct __sanitizer_kernel_sigaction_t {
-@@ -298,6 +339,8 @@ struct __sanitizer_pollfd {
+@@ -298,6 +342,8 @@ struct __sanitizer_pollfd {
typedef unsigned __sanitizer_nfds_t;
@@ -127,19 +135,30 @@ $NetBSD$
struct __sanitizer_glob_t {
uptr gl_pathc;
uptr gl_matchc;
-@@ -317,6 +360,30 @@ extern int glob_altdirfunc;
+@@ -317,6 +363,48 @@ extern int glob_altdirfunc;
extern unsigned path_max;
+extern int ptrace_pt_io;
++extern int ptrace_pt_lwpinfo;
+extern int ptrace_pt_set_event_mask;
++extern int ptrace_pt_get_event_mask;
++extern int ptrace_pt_get_process_state;
+extern int ptrace_pt_set_siginfo;
++extern int ptrace_pt_get_siginfo;
+extern int ptrace_pt_set_sigmask;
++extern int ptrace_pt_get_sigmask;
++extern int ptrace_piod_read_d;
+extern int ptrace_piod_write_d;
++extern int ptrace_piod_read_i;
+extern int ptrace_piod_write_i;
++extern int ptrace_piod_read_auxv;
+extern int ptrace_pt_setregs;
++extern int ptrace_pt_getregs;
+extern int ptrace_pt_setfpregs;
++extern int ptrace_pt_getfpregs;
+extern int ptrace_pt_setdbregs;
++extern int ptrace_pt_getdbregs;
+
+struct __sanitizer_ptrace_io_desc {
+ int piod_op;
@@ -148,6 +167,13 @@ $NetBSD$
+ uptr piod_len;
+};
+
++struct __sanitizer_ptrace_lwpinfo {
++ __sanitizer_lwpid_t pl_lwpid;
++ int pl_event;
++};
++
++extern unsigned struct_ptrace_ptrace_io_desc_struct_sz;
++extern unsigned struct_ptrace_ptrace_lwpinfo_struct_sz;
+extern unsigned struct_ptrace_ptrace_event_struct_sz;
+extern unsigned struct_ptrace_ptrace_siginfo_struct_sz;
+
diff --git a/compiler-rt-netbsd/patches/patch-lib_scudo_scudo__platform.h b/compiler-rt-netbsd/patches/patch-lib_scudo_scudo__platform.h
index acb040857a..079581bc5a 100644
--- a/compiler-rt-netbsd/patches/patch-lib_scudo_scudo__platform.h
+++ b/compiler-rt-netbsd/patches/patch-lib_scudo_scudo__platform.h
@@ -1,6 +1,6 @@
$NetBSD$
---- lib/scudo/scudo_platform.h.orig 2017-12-21 18:53:10.258335228 +0000
+--- lib/scudo/scudo_platform.h.orig 2017-12-21 18:53:10.000000000 +0000
+++ lib/scudo/scudo_platform.h
@@ -17,7 +17,7 @@
diff --git a/compiler-rt-netbsd/patches/patch-utils_generate__netbsd__syscalls.awk b/compiler-rt-netbsd/patches/patch-utils_generate__netbsd__syscalls.awk
index bce9ce3706..edbbbaba48 100644
--- a/compiler-rt-netbsd/patches/patch-utils_generate__netbsd__syscalls.awk
+++ b/compiler-rt-netbsd/patches/patch-utils_generate__netbsd__syscalls.awk
@@ -1,15 +1,11 @@
$NetBSD$
---- utils/generate_netbsd_syscalls.awk.orig 2017-12-21 18:53:40.997641029 +0000
+--- utils/generate_netbsd_syscalls.awk.orig 2017-12-27 10:21:12.203494254 +0000
+++ utils/generate_netbsd_syscalls.awk
-@@ -0,0 +1,2337 @@
+@@ -0,0 +1,2989 @@
+#!/usr/bin/awk -f
+
-+# TODO:
-+# - Research Linux specific restart_syscall for NetBSD, not needed?
-+#
-+
-+#===-- make_netbsd_syscalls_header.awk -------------------------------------===#
++#===-- generate_netbsd_syscalls.awk ----------------------------------------===#
+#
+# The LLVM Compiler Infrastructure
+#
@@ -247,7 +243,7 @@ $NetBSD$
+ pcmd("// actions for the active sanitizer.")
+ pcmd("// Usage:")
+ pcmd("// __sanitizer_syscall_pre_getfoo(...args...);")
-+ pcmd("// long res = syscall(SYS_getfoo, ...args...);")
++ pcmd("// long long res = syscall(SYS_getfoo, ...args...);")
+ pcmd("// __sanitizer_syscall_post_getfoo(res, ...args...);")
+ pcmd("//")
+ pcmd("// DO NOT EDIT! THIS FILE HAS BEEN GENERATED!")
@@ -284,8 +280,8 @@ $NetBSD$
+ outargs = ""
+
+ if (syscallargs[i] != "void") {
-+ outargs = "(long)(" syscallargs[i] ")"
-+ gsub(/\$/, "), (long)(", outargs)
++ outargs = "(long long)(" syscallargs[i] ")"
++ gsub(/\$/, "), (long long)(", outargs)
+ }
+
+ pcmd("#define __sanitizer_syscall_pre_" sn "(" inargs ") \\")
@@ -333,14 +329,14 @@ $NetBSD$
+ preargs = syscallargs[i]
+
+ if (preargs != "void") {
-+ preargs = "long " preargs
-+ gsub(/\$/, ", long ", preargs)
++ preargs = "long long " preargs
++ gsub(/\$/, ", long long ", preargs)
+ }
+
+ if (preargs == "void") {
-+ postargs = "long res"
++ postargs = "long long res"
+ } else {
-+ postargs = "long res, " preargs
++ postargs = "long long res, " preargs
+ }
+
+ pcmd("void __sanitizer_syscall_pre_impl_" sn "(" preargs ");")
@@ -404,7 +400,7 @@ $NetBSD$
+ pcmd("// Release memory visibility to fd.")
+ pcmd("// COMMON_SYSCALL_PRE_FORK()")
+ pcmd("// Called before fork syscall.")
-+ pcmd("// COMMON_SYSCALL_POST_FORK(long res)")
++ pcmd("// COMMON_SYSCALL_POST_FORK(long long res)")
+ pcmd("// Called after fork syscall.")
+ pcmd("//")
+ pcmd("// DO NOT EDIT! THIS FILE HAS BEEN GENERATED!")
@@ -479,25 +475,25 @@ $NetBSD$
+ preargs = syscallfullargs[i]
+
+ if (preargs != "void") {
-+ preargs = "long " preargs
-+ gsub(/\$/, ", long ", preargs)
-+ gsub(/long \*/, "void *", preargs)
++ preargs = "long long " preargs
++ gsub(/\$/, ", long long ", preargs)
++ gsub(/long long \*/, "void *", preargs)
+ }
+
+ if (preargs == "void") {
-+ postargs = "long res"
++ postargs = "long long res"
+ } else {
-+ postargs = "long res, " preargs
++ postargs = "long long res, " preargs
+ }
+
+ pcmd("PRE_SYSCALL(" sn ")(" preargs ")")
+ pcmd("{")
-+ pre_syscall(sn)
++ syscall_body(sn, "pre")
+ pcmd("}")
+
+ pcmd("POST_SYSCALL(" sn ")(" postargs ")")
+ pcmd("{")
-+ post_syscall(sn)
++ syscall_body(sn, "post")
+ pcmd("}")
+ }
+
@@ -531,7 +527,7 @@ $NetBSD$
+ print string | cmd
+}
+
-+function pre_syscall(syscall)
++function syscall_body(syscall, mode)
+{
+ # Hardcode sanitizing rules here
+ # These syscalls don't change often so they are hand coded
@@ -540,77 +536,161 @@ $NetBSD$
+ } else if (syscall == "exit") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "fork") {
-+ pcmd("COMMON_SYSCALL_PRE_FORK();")
++ if (mode == "pre") {
++ pcmd("COMMON_SYSCALL_PRE_FORK();")
++ } else {
++ pcmd("COMMON_SYSCALL_POST_FORK(res);")
++ }
+ } else if (syscall == "read") {
-+ pcmd("if (buf_) {")
-+ pcmd(" PRE_WRITE(buf_, nbyte_);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("if (buf_) {")
++ pcmd(" PRE_WRITE(buf_, nbyte_);")
++ pcmd("}")
++ } else {
++ pcmd("if (res > 0) {")
++ pcmd(" POST_WRITE(buf_, res);")
++ pcmd("}")
++ }
+ } else if (syscall == "write") {
-+ pcmd("if (buf_) {")
-+ pcmd(" PRE_READ(buf_, nbyte_);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("if (buf_) {")
++ pcmd(" PRE_READ(buf_, nbyte_);")
++ pcmd("}")
++ } else {
++ pcmd("if (res > 0) {")
++ pcmd(" POST_READ(buf_, res);")
++ pcmd("}")
++ }
+ } else if (syscall == "open") {
-+ pcmd("const char *path = (const char *)path_;")
-+ pcmd("if (path) {")
-+ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("if (res > 0) {")
++ pcmd(" const char *path = (const char *)path_;")
++ pcmd(" if (path) {")
++ pcmd(" POST_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd(" }")
++ pcmd("}")
++ }
+ } else if (syscall == "close") {
-+ pcmd("COMMON_SYSCALL_FD_CLOSE((int)fd_);")
++ if (mode == "pre") {
++ pcmd("COMMON_SYSCALL_FD_CLOSE((int)fd_);")
++ } else {
++ pcmd("/* Nothing to do */")
++ }
+ } else if (syscall == "compat_50_wait4") {
-+ pcmd("/* Nothing to do */")
++ pcmd("/* TODO */")
+ } else if (syscall == "compat_43_ocreat") {
-+ pcmd("const char *path = (const char *)path_;")
-+ pcmd("if (path) {")
-+ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
-+ pcmd("}")
++ pcmd("/* TODO */")
+ } else if (syscall == "link") {
-+ pcmd("const char *path = (const char *)path_;")
-+ pcmd("const char *link = (const char *)link_;")
-+ pcmd("if (path) {")
-+ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
-+ pcmd("}")
-+ pcmd("if (link) {")
-+ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(link) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("const char *link = (const char *)link_;")
++ pcmd("if (path) {")
++ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ pcmd("if (link) {")
++ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(link) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("if (res == 0) {")
++ pcmd(" const char *path = (const char *)path_;")
++ pcmd(" const char *link = (const char *)link_;")
++ pcmd(" if (path) {")
++ pcmd(" POST_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd(" }")
++ pcmd(" if (link) {")
++ pcmd(" POST_READ(path, __sanitizer::internal_strlen(link) + 1);")
++ pcmd(" }")
++ pcmd("}")
++ }
+ } else if (syscall == "unlink") {
-+ pcmd("const char *path = (const char *)path_;")
-+ pcmd("if (path) {")
-+ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("if (res == 0) {")
++ pcmd(" const char *path = (const char *)path_;")
++ pcmd(" if (path) {")
++ pcmd(" POST_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd(" }")
++ pcmd("}")
++ }
+ } else if (syscall == "chdir") {
-+ pcmd("const char *path = (const char *)path_;")
-+ pcmd("if (path) {")
-+ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("if (res == 0) {")
++ pcmd(" const char *path = (const char *)path_;")
++ pcmd(" if (path) {")
++ pcmd(" POST_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd(" }")
++ pcmd("}")
++ }
+ } else if (syscall == "fchdir") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "compat_50_mknod") {
-+ pcmd("const char *path = (const char *)path_;")
-+ pcmd("if (path) {")
-+ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
-+ pcmd("}")
++ pcmd("/* TODO */")
+ } else if (syscall == "chmod") {
-+ pcmd("const char *path = (const char *)path_;")
-+ pcmd("if (path) {")
-+ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("if (res == 0) {")
++ pcmd(" const char *path = (const char *)path_;")
++ pcmd(" if (path) {")
++ pcmd(" POST_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd(" }")
++ pcmd("}")
++ }
+ } else if (syscall == "chown") {
-+ pcmd("const char *path = (const char *)path_;")
-+ pcmd("if (path) {")
-+ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("if (res == 0) {")
++ pcmd(" const char *path = (const char *)path_;")
++ pcmd(" if (path) {")
++ pcmd(" POST_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd(" }")
++ pcmd("}")
++ }
+ } else if (syscall == "break") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "compat_20_getfsstat") {
-+ pcmd("/* Nothing to do */")
++ pcmd("/* TODO */")
+ } else if (syscall == "compat_43_olseek") {
-+ pcmd("/* Nothing to do */")
++ pcmd("/* TODO */")
+ } else if (syscall == "getpid") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "compat_40_mount") {
-+ pcmd("/* Nothing to do */")
++ pcmd("/* TODO */")
+ } else if (syscall == "unmount") {
-+ pcmd("/* Nothing to do */")
++ if (mode == "pre") {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("if (res == 0) {")
++ pcmd(" const char *path = (const char *)path_;")
++ pcmd(" if (path) {")
++ pcmd(" POST_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd(" }")
++ pcmd("}")
++ }
+ } else if (syscall == "setuid") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "getuid") {
@@ -618,46 +698,173 @@ $NetBSD$
+ } else if (syscall == "geteuid") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "ptrace") {
-+ pcmd("if (req_ == ptrace_pt_io) {")
-+ pcmd(" struct __sanitizer_ptrace_io_desc *piod = (struct __sanitizer_ptrace_io_desc *)addr_;")
-+ pcmd(" if (piod->piod_op == ptrace_piod_write_d || piod->piod_op == ptrace_piod_write_i) {")
-+ pcmd(" PRE_READ(piod->piod_addr, piod->piod_len);")
-+ pcmd(" }")
-+ pcmd("} else if (req_ == ptrace_pt_set_event_mask) {")
-+ pcmd(" PRE_READ(addr_, struct_ptrace_ptrace_event_struct_sz);")
-+ pcmd("} else if (req_ == ptrace_pt_set_siginfo) {")
-+ pcmd(" PRE_READ(addr_, struct_ptrace_ptrace_siginfo_struct_sz);")
-+ pcmd("} else if (req_ == ptrace_pt_set_sigmask) {")
-+ pcmd(" PRE_READ(addr_, sizeof(__sanitizer_sigset_t));")
-+ pcmd("} else if (req_ == ptrace_pt_setregs) {")
-+ pcmd(" PRE_READ(addr_, struct_ptrace_reg_struct_sz);")
-+ pcmd("} else if (req_ == ptrace_pt_setfpregs) {")
-+ pcmd(" PRE_READ(addr_, struct_ptrace_fpreg_struct_sz);")
-+ pcmd("} else if (req_ == ptrace_pt_setdbregs) {")
-+ pcmd(" PRE_READ(addr_, struct_ptrace_dbreg_struct_sz);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("if (req_ == ptrace_pt_io) {")
++ pcmd(" struct __sanitizer_ptrace_io_desc *addr = (struct __sanitizer_ptrace_io_desc *)addr_;")
++ pcmd(" PRE_READ(addr, struct_ptrace_ptrace_io_desc_struct_sz);")
++ pcmd(" if (addr->piod_op == ptrace_piod_write_d || addr->piod_op == ptrace_piod_write_i) {")
++ pcmd(" PRE_READ(addr->piod_addr, addr->piod_len);")
++ pcmd(" }")
++ pcmd(" if (addr->piod_op == ptrace_piod_read_d || addr->piod_op == ptrace_piod_read_i || addr->piod_op == ptrace_piod_read_auxv) {")
++ pcmd(" PRE_WRITE(addr->piod_addr, addr->piod_len);")
++ pcmd(" }")
++ pcmd("} else if (req_ == ptrace_pt_lwpinfo) {")
++ pcmd(" struct __sanitizer_ptrace_lwpinfo *addr = (struct __sanitizer_ptrace_lwpinfo *)addr_;")
++ pcmd(" PRE_READ(&addr->pl_lwpid, sizeof(__sanitizer_lwpid_t));")
++ pcmd(" PRE_WRITE(addr, struct_ptrace_ptrace_lwpinfo_struct_sz);")
++ pcmd("} else if (req_ == ptrace_pt_set_event_mask) {")
++ pcmd(" PRE_READ(addr_, struct_ptrace_ptrace_event_struct_sz);")
++ pcmd("} else if (req_ == ptrace_pt_get_event_mask) {")
++ pcmd(" PRE_WRITE(addr_, struct_ptrace_ptrace_event_struct_sz);")
++ pcmd("} else if (req_ == ptrace_pt_set_siginfo) {")
++ pcmd(" PRE_READ(addr_, struct_ptrace_ptrace_siginfo_struct_sz);")
++ pcmd("} else if (req_ == ptrace_pt_get_siginfo) {")
++ pcmd(" PRE_WRITE(addr_, struct_ptrace_ptrace_siginfo_struct_sz);")
++ pcmd("} else if (req_ == ptrace_pt_set_sigmask) {")
++ pcmd(" PRE_READ(addr_, sizeof(__sanitizer_sigset_t));")
++ pcmd("} else if (req_ == ptrace_pt_get_sigmask) {")
++ pcmd(" PRE_WRITE(addr_, sizeof(__sanitizer_sigset_t));")
++ pcmd("} else if (req_ == ptrace_pt_setregs) {")
++ pcmd(" PRE_READ(addr_, struct_ptrace_reg_struct_sz);")
++ pcmd("} else if (req_ == ptrace_pt_getregs) {")
++ pcmd(" PRE_WRITE(addr_, struct_ptrace_reg_struct_sz);")
++ pcmd("} else if (req_ == ptrace_pt_setfpregs) {")
++ pcmd(" PRE_READ(addr_, struct_ptrace_fpreg_struct_sz);")
++ pcmd("} else if (req_ == ptrace_pt_getfpregs) {")
++ pcmd(" PRE_WRITE(addr_, struct_ptrace_fpreg_struct_sz);")
++ pcmd("} else if (req_ == ptrace_pt_setdbregs) {")
++ pcmd(" PRE_READ(addr_, struct_ptrace_dbreg_struct_sz);")
++ pcmd("} else if (req_ == ptrace_pt_getdbregs) {")
++ pcmd(" PRE_WRITE(addr_, struct_ptrace_dbreg_struct_sz);")
++ pcmd("}")
++ } else {
++ pcmd("if (res == 0) {")
++ pcmd(" if (req_ == ptrace_pt_io) {")
++ pcmd(" struct __sanitizer_ptrace_io_desc *addr = (struct __sanitizer_ptrace_io_desc *)addr_;")
++ pcmd(" POST_READ(addr, struct_ptrace_ptrace_io_desc_struct_sz);")
++ pcmd(" if (addr->piod_op == ptrace_piod_write_d || addr->piod_op == ptrace_piod_write_i) {")
++ pcmd(" POST_READ(addr->piod_addr, addr->piod_len);")
++ pcmd(" }")
++ pcmd(" if (addr->piod_op == ptrace_piod_read_d || addr->piod_op == ptrace_piod_read_i || addr->piod_op == ptrace_piod_read_auxv) {")
++ pcmd(" POST_WRITE(addr->piod_addr, addr->piod_len);")
++ pcmd(" }")
++ pcmd(" } else if (req_ == ptrace_pt_lwpinfo) {")
++ pcmd(" struct __sanitizer_ptrace_lwpinfo *addr = (struct __sanitizer_ptrace_lwpinfo *)addr_;")
++ pcmd(" POST_READ(&addr->pl_lwpid, sizeof(__sanitizer_lwpid_t));")
++ pcmd(" POST_WRITE(addr, struct_ptrace_ptrace_lwpinfo_struct_sz);")
++ pcmd(" } else if (req_ == ptrace_pt_set_event_mask) {")
++ pcmd(" POST_READ(addr_, struct_ptrace_ptrace_event_struct_sz);")
++ pcmd(" } else if (req_ == ptrace_pt_get_event_mask) {")
++ pcmd(" POST_WRITE(addr_, struct_ptrace_ptrace_event_struct_sz);")
++ pcmd(" } else if (req_ == ptrace_pt_set_siginfo) {")
++ pcmd(" POST_READ(addr_, struct_ptrace_ptrace_siginfo_struct_sz);")
++ pcmd(" } else if (req_ == ptrace_pt_get_siginfo) {")
++ pcmd(" POST_WRITE(addr_, struct_ptrace_ptrace_siginfo_struct_sz);")
++ pcmd(" } else if (req_ == ptrace_pt_set_sigmask) {")
++ pcmd(" POST_READ(addr_, sizeof(__sanitizer_sigset_t));")
++ pcmd(" } else if (req_ == ptrace_pt_get_sigmask) {")
++ pcmd(" POST_WRITE(addr_, sizeof(__sanitizer_sigset_t));")
++ pcmd(" } else if (req_ == ptrace_pt_setregs) {")
++ pcmd(" POST_READ(addr_, struct_ptrace_reg_struct_sz);")
++ pcmd(" } else if (req_ == ptrace_pt_getregs) {")
++ pcmd(" POST_WRITE(addr_, struct_ptrace_reg_struct_sz);")
++ pcmd(" } else if (req_ == ptrace_pt_setfpregs) {")
++ pcmd(" POST_READ(addr_, struct_ptrace_fpreg_struct_sz);")
++ pcmd(" } else if (req_ == ptrace_pt_getfpregs) {")
++ pcmd(" POST_WRITE(addr_, struct_ptrace_fpreg_struct_sz);")
++ pcmd(" } else if (req_ == ptrace_pt_setdbregs) {")
++ pcmd(" POST_READ(addr_, struct_ptrace_dbreg_struct_sz);")
++ pcmd(" } else if (req_ == ptrace_pt_getdbregs) {")
++ pcmd(" POST_WRITE(addr_, struct_ptrace_dbreg_struct_sz);")
++ pcmd(" }")
++ pcmd("}")
++ }
+ } else if (syscall == "recvmsg") {
-+ pcmd("PRE_READ(msg_, sizeof(__sanitizer_msghdr));")
++ if (mode == "pre") {
++ pcmd("PRE_WRITE(msg_, sizeof(__sanitizer_msghdr));")
++ } else {
++ pcmd("if (res > 0) {")
++ pcmd(" POST_WRITE(msg_, sizeof(__sanitizer_msghdr));")
++ pcmd("}")
++ }
+ } else if (syscall == "sendmsg") {
-+ pcmd("/* Nothing to do */")
++ if (mode == "pre") {
++ pcmd("PRE_READ(msg_, sizeof(__sanitizer_msghdr));")
++ } else {
++ pcmd("if (res > 0) {")
++ pcmd(" POST_READ(msg_, sizeof(__sanitizer_msghdr));")
++ pcmd("}")
++ }
+ } else if (syscall == "recvfrom") {
-+ pcmd("/* Nothing to do */")
++ if (mode == "pre") {
++ pcmd("PRE_WRITE(buf_, len_);")
++ pcmd("PRE_WRITE(from_, struct_sockaddr_sz);")
++ pcmd("PRE_WRITE(fromlenaddr_, sizeof(__sanitizer_socklen_t));")
++ } else {
++ pcmd("if (res >= 0) {")
++ pcmd(" POST_WRITE(buf_, res);")
++ pcmd(" POST_WRITE(from_, struct_sockaddr_sz);")
++ pcmd(" POST_WRITE(fromlenaddr_, sizeof(__sanitizer_socklen_t));")
++ pcmd("}")
++ }
+ } else if (syscall == "accept") {
-+ pcmd("/* Nothing to do */")
++ if (mode == "pre") {
++ pcmd("PRE_WRITE(name_, struct_sockaddr_sz);")
++ pcmd("PRE_WRITE(anamelen_, sizeof(__sanitizer_socklen_t));")
++ } else {
++ pcmd("if (res == 0) {")
++ pcmd(" POST_WRITE(name_, struct_sockaddr_sz);")
++ pcmd(" POST_WRITE(anamelen_, sizeof(__sanitizer_socklen_t));")
++ pcmd("}")
++ }
+ } else if (syscall == "getpeername") {
-+ pcmd("/* Nothing to do */")
++ if (mode == "pre") {
++ pcmd("PRE_WRITE(asa_, struct_sockaddr_sz);")
++ pcmd("PRE_WRITE(alen_, sizeof(__sanitizer_socklen_t));")
++ } else {
++ pcmd("if (res == 0) {")
++ pcmd(" POST_WRITE(asa_, struct_sockaddr_sz);")
++ pcmd(" POST_WRITE(alen_, sizeof(__sanitizer_socklen_t));")
++ pcmd("}")
++ }
+ } else if (syscall == "getsockname") {
-+ pcmd("/* Nothing to do */")
++ if (mode == "pre") {
++ pcmd("PRE_WRITE(asa_, struct_sockaddr_sz);")
++ pcmd("PRE_WRITE(alen_, sizeof(__sanitizer_socklen_t));")
++ } else {
++ pcmd("if (res == 0) {")
++ pcmd(" POST_WRITE(asa_, struct_sockaddr_sz);")
++ pcmd(" POST_WRITE(alen_, sizeof(__sanitizer_socklen_t));")
++ pcmd("}")
++ }
+ } else if (syscall == "access") {
-+ pcmd("const char *path = (const char *)path_;")
-+ pcmd("if (path) {")
-+ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("if (res == 0) {")
++ pcmd(" const char *path = (const char *)path_;")
++ pcmd(" if (path) {")
++ pcmd(" POST_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd(" }")
++ pcmd("}")
++ }
+ } else if (syscall == "chflags") {
-+ pcmd("const char *path = (const char *)path_;")
-+ pcmd("if (path) {")
-+ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("if (res == 0) {")
++ pcmd(" const char *path = (const char *)path_;")
++ pcmd(" if (path) {")
++ pcmd(" POST_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd(" }")
++ pcmd("}")
++ }
+ } else if (syscall == "fchflags") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "sync") {
@@ -665,115 +872,222 @@ $NetBSD$
+ } else if (syscall == "kill") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "compat_43_stat43") {
-+ pcmd("const char *path = (const char *)path_;")
-+ pcmd("if (path) {")
-+ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
-+ pcmd("}")
++ pcmd("/* TODO */")
+ } else if (syscall == "getppid") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "compat_43_lstat43") {
-+ pcmd("const char *path = (const char *)path_;")
-+ pcmd("if (path) {")
-+ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
-+ pcmd("}")
++ pcmd("/* TODO */")
+ } else if (syscall == "dup") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "pipe") {
-+ pcmd("/* Nothing to do */")
++ pcmd("/* pipe returns two descriptors through two returned values */")
+ } else if (syscall == "getegid") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "profil") {
-+ pcmd("/* Nothing to do */")
++ if (mode == "pre") {
++ pcmd("if (samples_) {")
++ pcmd(" PRE_WRITE(samples_, size_);")
++ pcmd("}")
++ } else {
++ pcmd("if (res == 0) {")
++ pcmd(" if (samples_) {")
++ pcmd(" POST_WRITE(samples_, size_);")
++ pcmd(" }")
++ pcmd("}")
++ }
+ } else if (syscall == "ktrace") {
-+ pcmd("/* Nothing to do */")
++ if (mode == "pre") {
++ pcmd("const char *fname = (const char *)fname_;")
++ pcmd("if (fname) {")
++ pcmd(" PRE_READ(fname, __sanitizer::internal_strlen(fname) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("const char *fname = (const char *)fname_;")
++ pcmd("if (res == 0) {")
++ pcmd(" if (fname) {")
++ pcmd(" POST_READ(fname, __sanitizer::internal_strlen(fname) + 1);")
++ pcmd(" }")
++ pcmd("}")
++ }
+ } else if (syscall == "compat_13_sigaction13") {
-+ pcmd("struct __sanitizer_sigaction13 *nsa = (struct __sanitizer_sigaction13 *)nsa_;")
-+ pcmd("if (nsa) {")
-+ pcmd(" PRE_READ(&nsa->osa_handler, sizeof(nsa->osa_handler));")
-+ pcmd(" PRE_READ(&nsa->osa_flags, sizeof(nsa->osa_flags));")
-+ pcmd(" PRE_READ(&nsa->osa_mask, sizeof(nsa->osa_mask));")
-+ pcmd("}")
++ pcmd("/* TODO */")
+ } else if (syscall == "getgid") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "compat_13_sigprocmask13") {
-+ pcmd("/* Nothing to do */")
++ pcmd("/* TODO */")
+ } else if (syscall == "__getlogin") {
-+ pcmd("/* Nothing to do */")
++ if (mode == "pre") {
++ pcmd("if (namebuf_) {")
++ pcmd(" PRE_WRITE(namebuf_, namelen_);")
++ pcmd("}")
++ } else {
++ pcmd("if (res == 0) {")
++ pcmd(" if (namebuf_) {")
++ pcmd(" POST_WRITE(namebuf_, namelen_);")
++ pcmd(" }")
++ pcmd("}")
++ }
+ } else if (syscall == "__setlogin") {
-+ pcmd("const char *namebuf = (const char *)namebuf_;")
-+ pcmd("if (namebuf) {")
-+ pcmd(" PRE_READ(namebuf, __sanitizer::internal_strlen(namebuf) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *namebuf = (const char *)namebuf_;")
++ pcmd("if (namebuf) {")
++ pcmd(" PRE_READ(namebuf, __sanitizer::internal_strlen(namebuf) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("if (res == 0) {")
++ pcmd(" const char *namebuf = (const char *)namebuf_;")
++ pcmd(" if (namebuf) {")
++ pcmd(" POST_READ(namebuf, __sanitizer::internal_strlen(namebuf) + 1);")
++ pcmd(" }")
++ pcmd("}")
++ }
+ } else if (syscall == "acct") {
-+ pcmd("const char *path = (const char *)path_;")
-+ pcmd("if (path) {")
-+ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("if (res == 0) {")
++ pcmd(" const char *path = (const char *)path_;")
++ pcmd(" if (path) {")
++ pcmd(" POST_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd(" }")
++ pcmd("}")
++ }
+ } else if (syscall == "compat_13_sigpending13") {
-+ pcmd("/* Nothing to do */")
++ pcmd("/* TODO */")
+ } else if (syscall == "compat_13_sigaltstack13") {
-+ pcmd("/* Nothing to do */")
++ pcmd("/* TODO */")
+ } else if (syscall == "ioctl") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "compat_12_oreboot") {
-+ pcmd("/* Nothing to do */")
++ pcmd("/* TODO */")
+ } else if (syscall == "revoke") {
-+ pcmd("const char *path = (const char *)path_;")
-+ pcmd("if (path) {")
-+ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("if (res == 0) {")
++ pcmd(" const char *path = (const char *)path_;")
++ pcmd(" if (path) {")
++ pcmd(" POST_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd(" }")
++ pcmd("}")
++ }
+ } else if (syscall == "symlink") {
-+ pcmd("const char *path = (const char *)path_;")
-+ pcmd("const char *link = (const char *)link_;")
-+ pcmd("if (path) {")
-+ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
-+ pcmd("}")
-+ pcmd("if (link) {")
-+ pcmd(" PRE_READ(link, __sanitizer::internal_strlen(link) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("const char *link = (const char *)link_;")
++ pcmd("if (path) {")
++ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ pcmd("if (link) {")
++ pcmd(" PRE_READ(link, __sanitizer::internal_strlen(link) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("if (res == 0) {")
++ pcmd(" const char *path = (const char *)path_;")
++ pcmd(" const char *link = (const char *)link_;")
++ pcmd(" if (path) {")
++ pcmd(" POST_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd(" }")
++ pcmd(" if (link) {")
++ pcmd(" POST_READ(link, __sanitizer::internal_strlen(link) + 1);")
++ pcmd(" }")
++ pcmd("}")
++ }
+ } else if (syscall == "readlink") {
-+ pcmd("const char *path = (const char *)path_;")
-+ pcmd("if (path) {")
-+ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ pcmd("if (buf_) {")
++ pcmd(" PRE_WRITE(buf_, count_);")
++ pcmd("}")
++ } else {
++ pcmd("if (res > 0) {")
++ pcmd(" const char *path = (const char *)path_;")
++ pcmd(" if (path) {")
++ pcmd(" POST_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd(" }")
++ pcmd(" if (buf_) {")
++ pcmd(" PRE_WRITE(buf_, res);")
++ pcmd(" }")
++ pcmd("}")
++ }
+ } else if (syscall == "execve") {
-+ pcmd("const char *path = (const char *)path_;")
-+ pcmd("char **argp = (char **)argp_;")
-+ pcmd("char **envp = (char **)envp_;")
-+ pcmd("if (path) {")
-+ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
-+ pcmd("}")
-+ pcmd("if (argp && argp[0]) {")
-+ pcmd(" char *a = argp[0];")
-+ pcmd(" while (a++) {")
-+ pcmd(" PRE_READ(a, __sanitizer::internal_strlen(a) + 1);")
-+ pcmd(" }")
-+ pcmd("}")
-+ pcmd("if (envp && envp[0]) {")
-+ pcmd(" char *e = envp[0];")
-+ pcmd(" while (e++) {")
-+ pcmd(" PRE_READ(e, __sanitizer::internal_strlen(e) + 1);")
-+ pcmd(" }")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("char **argp = (char **)argp_;")
++ pcmd("char **envp = (char **)envp_;")
++ pcmd("if (path) {")
++ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ pcmd("if (argp && argp[0]) {")
++ pcmd(" char *a = argp[0];")
++ pcmd(" while (a++) {")
++ pcmd(" PRE_READ(a, __sanitizer::internal_strlen(a) + 1);")
++ pcmd(" }")
++ pcmd("}")
++ pcmd("if (envp && envp[0]) {")
++ pcmd(" char *e = envp[0];")
++ pcmd(" while (e++) {")
++ pcmd(" PRE_READ(e, __sanitizer::internal_strlen(e) + 1);")
++ pcmd(" }")
++ pcmd("}")
++ } else {
++ pcmd("/* If we are here, something went wrong */")
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("char **argp = (char **)argp_;")
++ pcmd("char **envp = (char **)envp_;")
++ pcmd("if (path) {")
++ pcmd(" POST_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ pcmd("if (argp && argp[0]) {")
++ pcmd(" char *a = argp[0];")
++ pcmd(" while (a++) {")
++ pcmd(" POST_READ(a, __sanitizer::internal_strlen(a) + 1);")
++ pcmd(" }")
++ pcmd("}")
++ pcmd("if (envp && envp[0]) {")
++ pcmd(" char *e = envp[0];")
++ pcmd(" while (e++) {")
++ pcmd(" POST_READ(e, __sanitizer::internal_strlen(e) + 1);")
++ pcmd(" }")
++ pcmd("}")
++ }
+ } else if (syscall == "umask") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "chroot") {
-+ pcmd("const char *path = (const char *)path_;")
-+ pcmd("if (path) {")
-+ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("if (res == 0) {")
++ pcmd(" const char *path = (const char *)path_;")
++ pcmd(" if (path) {")
++ pcmd(" POST_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd(" }")
++ pcmd("}")
++ }
+ } else if (syscall == "compat_43_fstat43") {
-+ pcmd("/* Nothing to do */")
++ pcmd("/* TODO */")
+ } else if (syscall == "compat_43_ogetkerninfo") {
-+ pcmd("/* Nothing to do */")
++ pcmd("/* TODO */")
+ } else if (syscall == "compat_43_ogetpagesize") {
-+ pcmd("/* Nothing to do */")
++ pcmd("/* TODO */")
+ } else if (syscall == "compat_12_msync") {
-+ pcmd("/* Nothing to do */")
++ pcmd("/* TODO */")
+ } else if (syscall == "vfork") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "compat_43_ommap") {
-+ pcmd("/* Nothing to do */")
++ pcmd("/* TODO */")
+ } else if (syscall == "munmap") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "mprotect") {
@@ -783,61 +1097,101 @@ $NetBSD$
+ } else if (syscall == "mincore") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "getgroups") {
-+ pcmd("/* Nothing to do */")
++ if (mode == "pre") {
++ pcmd("unsigned int *gidset = (unsigned int *)gidset_;")
++ pcmd("if (gidset) {")
++ pcmd(" PRE_WRITE(gidset, sizeof(*gidset) * gidsetsize_);")
++ pcmd("}")
++ } else {
++ pcmd("if (res == 0) {")
++ pcmd(" unsigned int *gidset = (unsigned int *)gidset_;")
++ pcmd(" if (gidset) {")
++ pcmd(" POST_WRITE(gidset, sizeof(*gidset) * gidsetsize_);")
++ pcmd(" }")
++ pcmd("}")
++ }
+ } else if (syscall == "setgroups") {
-+ pcmd("unsigned int *gidset = (unsigned int *)gidset_;")
-+ pcmd("if (gidset) {")
-+ pcmd(" PRE_READ(gidset, sizeof(*gidset) * gidsetsize_);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("unsigned int *gidset = (unsigned int *)gidset_;")
++ pcmd("if (gidset) {")
++ pcmd(" PRE_READ(gidset, sizeof(*gidset) * gidsetsize_);")
++ pcmd("}")
++ } else {
++ pcmd("if (res == 0) {")
++ pcmd(" unsigned int *gidset = (unsigned int *)gidset_;")
++ pcmd(" if (gidset) {")
++ pcmd(" POST_READ(gidset, sizeof(*gidset) * gidsetsize_);")
++ pcmd(" }")
++ pcmd("}")
++ }
+ } else if (syscall == "getpgrp") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "setpgid") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "compat_50_setitimer") {
-+ pcmd("/* Nothing to do */")
++ pcmd("/* TODO */")
+ } else if (syscall == "compat_43_owait") {
-+ pcmd("/* Nothing to do */")
++ pcmd("/* TODO */")
+ } else if (syscall == "compat_12_oswapon") {
-+ pcmd("const char *name = (const char *)name_;")
-+ pcmd("if (name) {")
-+ pcmd(" PRE_READ(name, __sanitizer::internal_strlen(name) + 1);")
-+ pcmd("}")
++ pcmd("/* TODO */")
+ } else if (syscall == "compat_50_getitimer") {
-+ pcmd("/* Nothing to do */")
++ pcmd("/* TODO */")
+ } else if (syscall == "compat_43_ogethostname") {
-+ pcmd("/* Nothing to do */")
++ pcmd("/* TODO */")
+ } else if (syscall == "compat_43_osethostname") {
-+ pcmd("/* Nothing to do */")
++ pcmd("/* TODO */")
+ } else if (syscall == "compat_43_ogetdtablesize") {
-+ pcmd("/* Nothing to do */")
++ pcmd("/* TODO */")
+ } else if (syscall == "dup2") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "fcntl") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "compat_50_select") {
-+ pcmd("/* Nothing to do */")
++ pcmd("/* TODO */")
+ } else if (syscall == "fsync") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "setpriority") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "compat_30_socket") {
-+ pcmd("/* Nothing to do */")
++ pcmd("/* TODO */")
+ } else if (syscall == "connect") {
-+ pcmd("/* Nothing to do */")
++ if (mode == "pre") {
++ pcmd("PRE_READ(name_, namelen_);")
++ } else {
++ pcmd("if (res == 0) {")
++ pcmd(" POST_READ(name_, namelen_);")
++ pcmd("}")
++ }
+ } else if (syscall == "compat_43_oaccept") {
-+ pcmd("/* Nothing to do */")
++ pcmd("/* TODO */")
+ } else if (syscall == "getpriority") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "compat_43_osend") {
-+ pcmd("/* Nothing to do */")
++ pcmd("/* TODO */")
+ } else if (syscall == "compat_43_orecv") {
-+ pcmd("/* Nothing to do */")
++ pcmd("/* TODO */")
+ } else if (syscall == "compat_13_sigreturn13") {
-+ pcmd("/* Missing on amd64? */")
++ pcmd("/* TODO */")
+ } else if (syscall == "bind") {
-+ pcmd("/* Nothing to do */")
++ if (mode == "pre") {
++ pcmd("PRE_READ(name_, namelen_);")
++ } else {
++ pcmd("if (res == 0) {")
++ pcmd(" PRE_READ(name_, namelen_);")
++ pcmd("}")
++ }
+ } else if (syscall == "setsockopt") {
-+ pcmd("/* Nothing to do */")
++ if (mode == "pre") {
++ pcmd("if (val_) {")
++ pcmd(" PRE_READ(val_, valsize_);")
++ pcmd("}")
++ } else {
++ pcmd("if (res == 0) {")
++ pcmd(" if (val_) {")
++ pcmd(" POST_READ(val_, valsize_);")
++ pcmd(" }")
++ pcmd("}")
++ }
+ } else if (syscall == "listen") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "compat_43_osigvec") {
@@ -859,11 +1213,57 @@ $NetBSD$
+ } else if (syscall == "compat_50_getrusage") {
+ pcmd("/* TODO */")
+ } else if (syscall == "getsockopt") {
-+ pcmd("/* Nothing to do */")
++ pcmd("/* TODO */")
+ } else if (syscall == "readv") {
-+ pcmd("/* Nothing to do */")
++ if (mode == "pre") {
++ pcmd("struct __sanitizer_iovec *iovp = (struct __sanitizer_iovec *)iovp_;")
++ pcmd("int i;")
++ pcmd("if (iovp) {")
++ pcmd(" PRE_READ(iovp, sizeof(struct __sanitizer_iovec) * iovcnt_);")
++ pcmd(" for (i = 0; i < iovcnt_; i++) {")
++ pcmd(" PRE_WRITE(iovp[i].iov_base, iovp[i].iov_len);")
++ pcmd(" }")
++ pcmd("}")
++ } else {
++ pcmd("struct __sanitizer_iovec *iovp = (struct __sanitizer_iovec *)iovp_;")
++ pcmd("int i;")
++ pcmd("uptr m, n = res;")
++ pcmd("if (res > 0) {")
++ pcmd(" if (iovp) {")
++ pcmd(" POST_READ(iovp, sizeof(struct __sanitizer_iovec) * iovcnt_);")
++ pcmd(" for (i = 0; i < iovcnt_ && n > 0; i++) {")
++ pcmd(" m = n > iovp[i].iov_len ? iovp[i].iov_len : n;")
++ pcmd(" POST_WRITE(iovp[i].iov_base, m);")
++ pcmd(" n -= m;")
++ pcmd(" }")
++ pcmd(" }")
++ pcmd("}")
++ }
+ } else if (syscall == "writev") {
-+ pcmd("/* Nothing to do */")
++ if (mode == "pre") {
++ pcmd("struct __sanitizer_iovec *iovp = (struct __sanitizer_iovec *)iovp_;")
++ pcmd("int i;")
++ pcmd("if (iovp) {")
++ pcmd(" PRE_READ(iovp, sizeof(struct __sanitizer_iovec) * iovcnt_);")
++ pcmd(" for (i = 0; i < iovcnt_; i++) {")
++ pcmd(" PRE_READ(iovp[i].iov_base, iovp[i].iov_len);")
++ pcmd(" }")
++ pcmd("}")
++ } else {
++ pcmd("struct __sanitizer_iovec *iovp = (struct __sanitizer_iovec *)iovp_;")
++ pcmd("int i;")
++ pcmd("uptr m, n = res;")
++ pcmd("if (res > 0) {")
++ pcmd(" if (iovp) {")
++ pcmd(" POST_READ(iovp, sizeof(struct __sanitizer_iovec) * iovcnt_);")
++ pcmd(" for (i = 0; i < iovcnt_ && n > 0; i++) {")
++ pcmd(" m = n > iovp[i].iov_len ? iovp[i].iov_len : n;")
++ pcmd(" POST_READ(iovp[i].iov_base, m);")
++ pcmd(" n -= m;")
++ pcmd(" }")
++ pcmd(" }")
++ pcmd("}")
++ }
+ } else if (syscall == "compat_50_settimeofday") {
+ pcmd("/* TODO */")
+ } else if (syscall == "fchown") {
@@ -877,14 +1277,27 @@ $NetBSD$
+ } else if (syscall == "setregid") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "rename") {
-+ pcmd("const char *from = (const char *)from_;")
-+ pcmd("const char *to = (const char *)to_;")
-+ pcmd("if (from) {")
-+ pcmd(" PRE_READ(from, __sanitizer::internal_strlen(from) + 1);")
-+ pcmd("}")
-+ pcmd("if (to) {")
-+ pcmd(" PRE_READ(to, __sanitizer::internal_strlen(to) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *from = (const char *)from_;")
++ pcmd("const char *to = (const char *)to_;")
++ pcmd("if (from) {")
++ pcmd(" PRE_READ(from, __sanitizer::internal_strlen(from) + 1);")
++ pcmd("}")
++ pcmd("if (to) {")
++ pcmd(" PRE_READ(to, __sanitizer::internal_strlen(to) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("if (res == 0) {")
++ pcmd(" const char *from = (const char *)from_;")
++ pcmd(" const char *to = (const char *)to_;")
++ pcmd(" if (from) {")
++ pcmd(" POST_READ(from, __sanitizer::internal_strlen(from) + 1);")
++ pcmd(" }")
++ pcmd(" if (to) {")
++ pcmd(" POST_READ(to, __sanitizer::internal_strlen(to) + 1);")
++ pcmd(" }")
++ pcmd("}")
++ }
+ } else if (syscall == "compat_43_otruncate") {
+ pcmd("/* TODO */")
+ } else if (syscall == "compat_43_oftruncate") {
@@ -892,26 +1305,67 @@ $NetBSD$
+ } else if (syscall == "flock") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "mkfifo") {
-+ pcmd("const char *path = (const char *)path_;")
-+ pcmd("if (path) {")
-+ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("if (res == 0) {")
++ pcmd(" const char *path = (const char *)path_;")
++ pcmd(" if (path) {")
++ pcmd(" POST_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd(" }")
++ pcmd("}")
++ }
+ } else if (syscall == "sendto") {
-+ pcmd("/* Nothing to do */")
++ if (mode == "pre") {
++ pcmd("PRE_READ(buf_, len_);")
++ pcmd("PRE_READ(to_, tolen_);")
++ } else {
++ pcmd("if (res >= 0) {")
++ pcmd(" POST_READ(buf_, len_);")
++ pcmd(" POST_READ(to_, tolen_);")
++ pcmd("}")
++ }
+ } else if (syscall == "shutdown") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "socketpair") {
-+ pcmd("/* Nothing to do */")
++ if (mode == "pre") {
++ pcmd("PRE_WRITE(rsv_, 2 * sizeof(int));")
++ } else {
++ pcmd("if (res == 0) {")
++ pcmd(" POST_WRITE(rsv_, 2 * sizeof(int));")
++ pcmd("}")
++ }
+ } else if (syscall == "mkdir") {
-+ pcmd("const char *path = (const char *)path_;")
-+ pcmd("if (path) {")
-+ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("if (res == 0) {")
++ pcmd(" const char *path = (const char *)path_;")
++ pcmd(" if (path) {")
++ pcmd(" POST_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd(" }")
++ pcmd("}")
++ }
+ } else if (syscall == "rmdir") {
-+ pcmd("const char *path = (const char *)path_;")
-+ pcmd("if (path) {")
-+ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("if (res == 0) {")
++ pcmd(" const char *path = (const char *)path_;")
++ pcmd(" if (path) {")
++ pcmd(" POST_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd(" }")
++ pcmd("}")
++ }
+ } else if (syscall == "compat_50_utimes") {
+ pcmd("/* TODO */")
+ } else if (syscall == "compat_50_adjtime") {
@@ -961,11 +1415,25 @@ $NetBSD$
+ } else if (syscall == "compat_10_oshmsys") {
+ pcmd("/* TODO */")
+ } else if (syscall == "pread") {
-+ pcmd("/* Nothing to do */")
++ if (mode == "pre") {
++ pcmd("if (buf_) {")
++ pcmd(" PRE_WRITE(buf_, nbyte_);")
++ pcmd("}")
++ } else {
++ pcmd("if (res > 0) {")
++ pcmd(" POST_WRITE(buf_, res);")
++ pcmd("}")
++ }
+ } else if (syscall == "pwrite") {
-+ pcmd("if (buf_) {")
-+ pcmd(" PRE_READ(buf_, nbyte_);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("if (buf_) {")
++ pcmd(" PRE_READ(buf_, nbyte_);")
++ pcmd("}")
++ } else {
++ pcmd("if (res > 0) {")
++ pcmd(" POST_READ(buf_, res);")
++ pcmd("}")
++ }
+ } else if (syscall == "compat_30_ntp_gettime") {
+ pcmd("/* TODO */")
+ } else if (syscall == "ntp_adjtime") {
@@ -985,28 +1453,43 @@ $NetBSD$
+ } else if (syscall == "compat_50_lfs_segwait") {
+ pcmd("/* TODO */")
+ } else if (syscall == "compat_12_stat12") {
-+ pcmd("const char *path = (const char *)path_;")
-+ pcmd("if (path) {")
-+ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
-+ pcmd("}")
++ pcmd("/* TODO */")
+ } else if (syscall == "compat_12_fstat12") {
-+ pcmd("/* Nothing to do */")
++ pcmd("/* TODO */")
+ } else if (syscall == "compat_12_lstat12") {
-+ pcmd("const char *path = (const char *)path_;")
-+ pcmd("if (path) {")
-+ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
-+ pcmd("}")
++ pcmd("/* TODO */")
+ } else if (syscall == "pathconf") {
-+ pcmd("const char *path = (const char *)path_;")
-+ pcmd("if (path) {")
-+ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("if (res != -1) {")
++ pcmd(" const char *path = (const char *)path_;")
++ pcmd(" if (path) {")
++ pcmd(" POST_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd(" }")
++ pcmd("}")
++ }
+ } else if (syscall == "fpathconf") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "getrlimit") {
-+ pcmd("/* Nothing to do */")
++ if (mode == "pre") {
++ pcmd("PRE_WRITE(rlp_, struct_rlimit_sz);")
++ } else {
++ pcmd("if (res == 0) {")
++ pcmd(" POST_WRITE(rlp_, struct_rlimit_sz);")
++ pcmd("}")
++ }
+ } else if (syscall == "setrlimit") {
-+ pcmd("/* Nothing to do */")
++ if (mode == "pre") {
++ pcmd("PRE_READ(rlp_, struct_rlimit_sz);")
++ } else {
++ pcmd("if (res == 0) {")
++ pcmd(" POST_READ(rlp_, struct_rlimit_sz);")
++ pcmd("}")
++ }
+ } else if (syscall == "compat_12_getdirentries") {
+ pcmd("/* TODO */")
+ } else if (syscall == "mmap") {
@@ -1016,38 +1499,76 @@ $NetBSD$
+ } else if (syscall == "lseek") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "truncate") {
-+ pcmd("const char *path = (const char *)path_;")
-+ pcmd("if (path) {")
-+ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("if (res == 0) {")
++ pcmd(" const char *path = (const char *)path_;")
++ pcmd(" if (path) {")
++ pcmd(" POST_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd(" }")
++ pcmd("}")
++ }
+ } else if (syscall == "ftruncate") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "__sysctl") {
-+ pcmd("const int *name = (const int *)name_;")
-+ pcmd("if (name) {")
-+ pcmd(" PRE_READ(name, namelen_ * sizeof(*name));")
-+ pcmd("}")
-+ pcmd("if (newv_) {")
-+ pcmd(" PRE_READ(name, newlen_);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const int *name = (const int *)name_;")
++ pcmd("if (name) {")
++ pcmd(" PRE_READ(name, namelen_ * sizeof(*name));")
++ pcmd("}")
++ pcmd("if (newv_) {")
++ pcmd(" PRE_READ(name, newlen_);")
++ pcmd("}")
++ } else {
++ pcmd("if (res == 0) {")
++ pcmd(" const int *name = (const int *)name_;")
++ pcmd(" if (name) {")
++ pcmd(" POST_READ(name, namelen_ * sizeof(*name));")
++ pcmd(" }")
++ pcmd(" if (newv_) {")
++ pcmd(" POST_READ(name, newlen_);")
++ pcmd(" }")
++ pcmd("}")
++ }
+ } else if (syscall == "mlock") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "munlock") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "undelete") {
-+ pcmd("const char *path = (const char *)path_;")
-+ pcmd("if (path) {")
-+ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("if (res == 0) {")
++ pcmd(" const char *path = (const char *)path_;")
++ pcmd(" if (path) {")
++ pcmd(" POST_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd(" }")
++ pcmd("}")
++ }
+ } else if (syscall == "compat_50_futimes") {
+ pcmd("/* TODO */")
+ } else if (syscall == "getpgid") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "reboot") {
-+ pcmd("const char *bootstr = (const char *)bootstr_;")
-+ pcmd("if (bootstr) {")
-+ pcmd(" PRE_READ(bootstr, __sanitizer::internal_strlen(bootstr) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *bootstr = (const char *)bootstr_;")
++ pcmd("if (bootstr) {")
++ pcmd(" PRE_READ(bootstr, __sanitizer::internal_strlen(bootstr) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("/* This call should never return */")
++ pcmd("const char *bootstr = (const char *)bootstr_;")
++ pcmd("if (bootstr) {")
++ pcmd(" POST_READ(bootstr, __sanitizer::internal_strlen(bootstr) + 1);")
++ pcmd("}")
++ }
+ } else if (syscall == "poll") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "afssys") {
@@ -1057,7 +1578,17 @@ $NetBSD$
+ } else if (syscall == "semget") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "semop") {
-+ pcmd("/* Nothing to do */")
++ if (mode == "pre") {
++ pcmd("if (sops_) {")
++ pcmd(" PRE_READ(sops_, nsops_ * struct_sembuf_sz);")
++ pcmd("}")
++ } else {
++ pcmd("if (res == 0) {")
++ pcmd(" if (sops_) {")
++ pcmd(" POST_READ(sops_, nsops_ * struct_sembuf_sz);")
++ pcmd(" }")
++ pcmd("}")
++ }
+ } else if (syscall == "semconfig") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "compat_14_msgctl") {
@@ -1065,9 +1596,17 @@ $NetBSD$
+ } else if (syscall == "msgget") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "msgsnd") {
-+ pcmd("if (msgp_) {")
-+ pcmd(" PRE_READ(msgp_, msgsz_);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("if (msgp_) {")
++ pcmd(" PRE_READ(msgp_, msgsz_);")
++ pcmd("}")
++ } else {
++ pcmd("if (res == 0) {")
++ pcmd(" if (msgp_) {")
++ pcmd(" POST_READ(msgp_, msgsz_);")
++ pcmd(" }")
++ pcmd("}")
++ }
+ } else if (syscall == "msgrcv") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "shmat") {
@@ -1105,25 +1644,39 @@ $NetBSD$
+ } else if (syscall == "compat_50___sigtimedwait") {
+ pcmd("/* TODO */")
+ } else if (syscall == "sigqueueinfo") {
-+ pcmd("if (info_) {")
-+ pcmd(" PRE_READ(info_, siginfo_t_sz);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("if (info_) {")
++ pcmd(" PRE_READ(info_, siginfo_t_sz);")
++ pcmd("}")
++ }
+ } else if (syscall == "modctl") {
+ pcmd("/* TODO */")
+ } else if (syscall == "_ksem_init") {
-+# pcmd("if (idp) {")
-+# pcmd(" PRE_READ(idp, sizeof(intptr_t));")
-+# pcmd("}")
++ pcmd("/* Nothing to do */")
+ } else if (syscall == "_ksem_open") {
-+ pcmd("const char *name = (const char *)name_;")
-+ pcmd("if (name) {")
-+ pcmd(" PRE_READ(name, __sanitizer::internal_strlen(name) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *name = (const char *)name_;")
++ pcmd("if (name) {")
++ pcmd(" PRE_READ(name, __sanitizer::internal_strlen(name) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("const char *name = (const char *)name_;")
++ pcmd("if (name) {")
++ pcmd(" POST_READ(name, __sanitizer::internal_strlen(name) + 1);")
++ pcmd("}")
++ }
+ } else if (syscall == "_ksem_unlink") {
-+ pcmd("const char *name = (const char *)name_;")
-+ pcmd("if (name) {")
-+ pcmd(" PRE_READ(name, __sanitizer::internal_strlen(name) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *name = (const char *)name_;")
++ pcmd("if (name) {")
++ pcmd(" PRE_READ(name, __sanitizer::internal_strlen(name) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("const char *name = (const char *)name_;")
++ pcmd("if (name) {")
++ pcmd(" POST_READ(name, __sanitizer::internal_strlen(name) + 1);")
++ pcmd("}")
++ }
+ } else if (syscall == "_ksem_close") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "_ksem_post") {
@@ -1137,35 +1690,57 @@ $NetBSD$
+ } else if (syscall == "_ksem_destroy") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "_ksem_timedwait") {
-+ pcmd("if (abstime_) {")
-+ pcmd(" PRE_READ(abstime_, struct_timespec_sz);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("if (abstime_) {")
++ pcmd(" PRE_READ(abstime_, struct_timespec_sz);")
++ pcmd("}")
++ }
+ } else if (syscall == "mq_open") {
-+ pcmd("const char *name = (const char *)name_;")
-+ pcmd("if (name) {")
-+ pcmd(" PRE_READ(name, __sanitizer::internal_strlen(name) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *name = (const char *)name_;")
++ pcmd("if (name) {")
++ pcmd(" PRE_READ(name, __sanitizer::internal_strlen(name) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("const char *name = (const char *)name_;")
++ pcmd("if (name) {")
++ pcmd(" POST_READ(name, __sanitizer::internal_strlen(name) + 1);")
++ pcmd("}")
++ }
+ } else if (syscall == "mq_close") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "mq_unlink") {
-+ pcmd("const char *name = (const char *)name_;")
-+ pcmd("if (name) {")
-+ pcmd(" PRE_READ(name, __sanitizer::internal_strlen(name) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *name = (const char *)name_;")
++ pcmd("if (name) {")
++ pcmd(" PRE_READ(name, __sanitizer::internal_strlen(name) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("const char *name = (const char *)name_;")
++ pcmd("if (name) {")
++ pcmd(" POST_READ(name, __sanitizer::internal_strlen(name) + 1);")
++ pcmd("}")
++ }
+ } else if (syscall == "mq_getattr") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "mq_setattr") {
-+ pcmd("if (mqstat_) {")
-+ pcmd(" PRE_READ(mqstat_, struct_mq_attr_sz);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("if (mqstat_) {")
++ pcmd(" PRE_READ(mqstat_, struct_mq_attr_sz);")
++ pcmd("}")
++ }
+ } else if (syscall == "mq_notify") {
-+ pcmd("if (notification_) {")
-+ pcmd(" PRE_READ(notification_, struct_sigevent_sz);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("if (notification_) {")
++ pcmd(" PRE_READ(notification_, struct_sigevent_sz);")
++ pcmd("}")
++ }
+ } else if (syscall == "mq_send") {
-+ pcmd("if (msg_ptr_) {")
-+ pcmd(" PRE_READ(msg_ptr_, msg_len_);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("if (msg_ptr_) {")
++ pcmd(" PRE_READ(msg_ptr_, msg_len_);")
++ pcmd("}")
++ }
+ } else if (syscall == "mq_receive") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "compat_50_mq_timedsend") {
@@ -1173,14 +1748,25 @@ $NetBSD$
+ } else if (syscall == "compat_50_mq_timedreceive") {
+ pcmd("/* TODO */")
+ } else if (syscall == "__posix_rename") {
-+ pcmd("const char *from = (const char *)from_;")
-+ pcmd("const char *to = (const char *)to_;")
-+ pcmd("if (from_) {")
-+ pcmd(" PRE_READ(from, __sanitizer::internal_strlen(from) + 1);")
-+ pcmd("}")
-+ pcmd("if (to) {")
-+ pcmd(" PRE_READ(to, __sanitizer::internal_strlen(to) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *from = (const char *)from_;")
++ pcmd("const char *to = (const char *)to_;")
++ pcmd("if (from_) {")
++ pcmd(" PRE_READ(from, __sanitizer::internal_strlen(from) + 1);")
++ pcmd("}")
++ pcmd("if (to) {")
++ pcmd(" PRE_READ(to, __sanitizer::internal_strlen(to) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("const char *from = (const char *)from_;")
++ pcmd("const char *to = (const char *)to_;")
++ pcmd("if (from) {")
++ pcmd(" POST_READ(from, __sanitizer::internal_strlen(from) + 1);")
++ pcmd("}")
++ pcmd("if (to) {")
++ pcmd(" POST_READ(to, __sanitizer::internal_strlen(to) + 1);")
++ pcmd("}")
++ }
+ } else if (syscall == "swapctl") {
+ pcmd("/* TODO */")
+ } else if (syscall == "compat_30_getdents") {
@@ -1188,15 +1774,29 @@ $NetBSD$
+ } else if (syscall == "minherit") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "lchmod") {
-+ pcmd("const char *path = (const char *)path_;")
-+ pcmd("if (path) {")
-+ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" POST_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ }
+ } else if (syscall == "lchown") {
-+ pcmd("const char *path = (const char *)path_;")
-+ pcmd("if (path) {")
-+ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" POST_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ }
+ } else if (syscall == "compat_50_lutimes") {
+ pcmd("/* TODO */")
+ } else if (syscall == "__msync13") {
@@ -1208,26 +1808,42 @@ $NetBSD$
+ } else if (syscall == "compat_30___lstat13") {
+ pcmd("/* TODO */")
+ } else if (syscall == "__sigaltstack14") {
-+ pcmd("if (nss_) {")
-+ pcmd(" PRE_READ(nss_, struct_sigaltstack_sz);")
-+ pcmd("}")
-+ pcmd("if (oss_) {")
-+ pcmd(" PRE_READ(oss_, struct_sigaltstack_sz);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("if (nss_) {")
++ pcmd(" PRE_READ(nss_, struct_sigaltstack_sz);")
++ pcmd("}")
++ pcmd("if (oss_) {")
++ pcmd(" PRE_READ(oss_, struct_sigaltstack_sz);")
++ pcmd("}")
++ }
+ } else if (syscall == "__vfork14") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "__posix_chown") {
-+ pcmd("const char *path = (const char *)path_;")
-+ pcmd("if (path) {")
-+ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" POST_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ }
+ } else if (syscall == "__posix_fchown") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "__posix_lchown") {
-+ pcmd("const char *path = (const char *)path_;")
-+ pcmd("if (path) {")
-+ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" POST_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ }
+ } else if (syscall == "getsid") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "__clone") {
@@ -1267,30 +1883,51 @@ $NetBSD$
+ } else if (syscall == "compat_50___shmctl13") {
+ pcmd("/* TODO */")
+ } else if (syscall == "lchflags") {
-+ pcmd("const char *path = (const char *)path_;")
-+ pcmd("if (path) {")
-+ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" POST_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ }
+ } else if (syscall == "issetugid") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "utrace") {
-+ pcmd("const char *label = (const char *)label_;")
-+ pcmd("if (label) {")
-+ pcmd(" PRE_READ(label, __sanitizer::internal_strlen(label) + 1);")
-+ pcmd("}")
-+ pcmd("if (addr_) {")
-+ pcmd(" PRE_READ(addr_, len_);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *label = (const char *)label_;")
++ pcmd("if (label) {")
++ pcmd(" PRE_READ(label, __sanitizer::internal_strlen(label) + 1);")
++ pcmd("}")
++ pcmd("if (addr_) {")
++ pcmd(" PRE_READ(addr_, len_);")
++ pcmd("}")
++ } else {
++ pcmd("const char *label = (const char *)label_;")
++ pcmd("if (label) {")
++ pcmd(" POST_READ(label, __sanitizer::internal_strlen(label) + 1);")
++ pcmd("}")
++ pcmd("if (addr_) {")
++ pcmd(" POST_READ(addr_, len_);")
++ pcmd("}")
++ }
+ } else if (syscall == "getcontext") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "setcontext") {
-+ pcmd("if (ucp_) {")
-+ pcmd(" PRE_READ(ucp_, ucontext_t_sz);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("if (ucp_) {")
++ pcmd(" PRE_READ(ucp_, ucontext_t_sz);")
++ pcmd("}")
++ }
+ } else if (syscall == "_lwp_create") {
-+ pcmd("if (ucp_) {")
-+ pcmd(" PRE_READ(ucp_, ucontext_t_sz);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("if (ucp_) {")
++ pcmd(" PRE_READ(ucp_, ucontext_t_sz);")
++ pcmd("}")
++ }
+ } else if (syscall == "_lwp_exit") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "_lwp_self") {
@@ -1316,14 +1953,23 @@ $NetBSD$
+ } else if (syscall == "_lwp_unpark") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "_lwp_unpark_all") {
-+ pcmd("if (targets_) {")
-+ pcmd(" PRE_READ(targets_, ntargets_ * sizeof(__sanitizer_lwpid_t));")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("if (targets_) {")
++ pcmd(" PRE_READ(targets_, ntargets_ * sizeof(__sanitizer_lwpid_t));")
++ pcmd("}")
++ }
+ } else if (syscall == "_lwp_setname") {
-+ pcmd("const char *name = (const char *)name_;")
-+ pcmd("if (name) {")
-+ pcmd(" PRE_READ(name, __sanitizer::internal_strlen(name) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *name = (const char *)name_;")
++ pcmd("if (name) {")
++ pcmd(" PRE_READ(name, __sanitizer::internal_strlen(name) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("const char *name = (const char *)name_;")
++ pcmd("if (name) {")
++ pcmd(" POST_READ(name, __sanitizer::internal_strlen(name) + 1);")
++ pcmd("}")
++ }
+ } else if (syscall == "_lwp_getname") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "_lwp_ctl") {
@@ -1377,34 +2023,69 @@ $NetBSD$
+ } else if (syscall == "getvfsstat") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "statvfs1") {
-+ pcmd("const char *path = (const char *)path_;")
-+ pcmd("if (path) {")
-+ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" POST_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ }
+ } else if (syscall == "fstatvfs1") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "compat_30_fhstatvfs1") {
+ pcmd("/* TODO */")
+ } else if (syscall == "extattrctl") {
-+ pcmd("const char *path = (const char *)path_;")
-+ pcmd("if (path) {")
-+ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" POST_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ }
+ } else if (syscall == "extattr_set_file") {
-+ pcmd("const char *path = (const char *)path_;")
-+ pcmd("if (path) {")
-+ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" POST_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ }
+ } else if (syscall == "extattr_get_file") {
-+ pcmd("const char *path = (const char *)path_;")
-+ pcmd("if (path) {")
-+ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" POST_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ }
+ } else if (syscall == "extattr_delete_file") {
-+ pcmd("const char *path = (const char *)path_;")
-+ pcmd("if (path) {")
-+ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" POST_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ }
+ } else if (syscall == "extattr_set_fd") {
+ pcmd("/* TODO */")
+ } else if (syscall == "extattr_get_fd") {
@@ -1412,82 +2093,173 @@ $NetBSD$
+ } else if (syscall == "extattr_delete_fd") {
+ pcmd("/* TODO */")
+ } else if (syscall == "extattr_set_link") {
-+ pcmd("const char *path = (const char *)path_;")
-+ pcmd("if (path) {")
-+ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" POST_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ }
+ } else if (syscall == "extattr_get_link") {
-+ pcmd("const char *path = (const char *)path_;")
-+ pcmd("if (path) {")
-+ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" POST_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ }
+ } else if (syscall == "extattr_delete_link") {
-+ pcmd("const char *path = (const char *)path_;")
-+ pcmd("if (path) {")
-+ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" POST_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ }
+ } else if (syscall == "extattr_list_fd") {
+ pcmd("/* TODO */")
+ } else if (syscall == "extattr_list_file") {
-+ pcmd("const char *path = (const char *)path_;")
-+ pcmd("if (path) {")
-+ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" POST_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ }
+ } else if (syscall == "extattr_list_link") {
-+ pcmd("const char *path = (const char *)path_;")
-+ pcmd("if (path) {")
-+ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" POST_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ }
+ } else if (syscall == "compat_50_pselect") {
+ pcmd("/* TODO */")
+ } else if (syscall == "compat_50_pollts") {
+ pcmd("/* TODO */")
+ } else if (syscall == "setxattr") {
-+ pcmd("const char *path = (const char *)path_;")
-+ pcmd("if (path) {")
-+ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" POST_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ }
+ } else if (syscall == "lsetxattr") {
-+ pcmd("const char *path = (const char *)path_;")
-+ pcmd("if (path) {")
-+ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" POST_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ }
+ } else if (syscall == "fsetxattr") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "getxattr") {
-+ pcmd("const char *path = (const char *)path_;")
-+ pcmd("if (path) {")
-+ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" POST_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ }
+ } else if (syscall == "lgetxattr") {
-+ pcmd("const char *path = (const char *)path_;")
-+ pcmd("if (path) {")
-+ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" POST_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ }
+ } else if (syscall == "fgetxattr") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "listxattr") {
-+ pcmd("const char *path = (const char *)path_;")
-+ pcmd("if (path) {")
-+ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" POST_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ }
+ } else if (syscall == "llistxattr") {
-+ pcmd("const char *path = (const char *)path_;")
-+ pcmd("if (path) {")
-+ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" POST_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ }
+ } else if (syscall == "flistxattr") {
+ pcmd("/* TODO */")
+ } else if (syscall == "removexattr") {
-+ pcmd("const char *path = (const char *)path_;")
-+ pcmd("if (path) {")
-+ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" POST_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ }
+ } else if (syscall == "lremovexattr") {
-+ pcmd("const char *path = (const char *)path_;")
-+ pcmd("if (path) {")
-+ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" POST_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ }
+ } else if (syscall == "fremovexattr") {
+ pcmd("/* TODO */")
+ } else if (syscall == "compat_50___stat30") {
@@ -1507,62 +2279,103 @@ $NetBSD$
+ } else if (syscall == "__socket30") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "__getfh30") {
-+ pcmd("const char *fname = (const char *)fname_;")
-+ pcmd("if (fname) {")
-+ pcmd(" PRE_READ(fname, __sanitizer::internal_strlen(fname) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *fname = (const char *)fname_;")
++ pcmd("if (fname) {")
++ pcmd(" PRE_READ(fname, __sanitizer::internal_strlen(fname) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("const char *fname = (const char *)fname_;")
++ pcmd("if (res == 0) {")
++ pcmd(" if (fname) {")
++ pcmd(" POST_READ(fname, __sanitizer::internal_strlen(fname) + 1);")
++ pcmd(" }")
++ pcmd("}")
++ }
+ } else if (syscall == "__fhopen40") {
-+ pcmd("if (fhp_) {")
-+ pcmd(" PRE_READ(fhp_, fh_size_);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("if (fhp_) {")
++ pcmd(" PRE_READ(fhp_, fh_size_);")
++ pcmd("}")
++ }
+ } else if (syscall == "__fhstatvfs140") {
-+ pcmd("if (fhp_) {")
-+ pcmd(" PRE_READ(fhp_, fh_size_);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("if (fhp_) {")
++ pcmd(" PRE_READ(fhp_, fh_size_);")
++ pcmd("}")
++ }
+ } else if (syscall == "compat_50___fhstat40") {
-+ pcmd("if (fhp_) {")
-+ pcmd(" PRE_READ(fhp_, fh_size_);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("if (fhp_) {")
++ pcmd(" PRE_READ(fhp_, fh_size_);")
++ pcmd("}")
++ }
+ } else if (syscall == "aio_cancel") {
-+ pcmd("if (aiocbp_) {")
-+ pcmd(" PRE_READ(aiocbp_, sizeof(struct __sanitizer_aiocb));")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("if (aiocbp_) {")
++ pcmd(" PRE_READ(aiocbp_, sizeof(struct __sanitizer_aiocb));")
++ pcmd("}")
++ }
+ } else if (syscall == "aio_error") {
-+ pcmd("if (aiocbp_) {")
-+ pcmd(" PRE_READ(aiocbp_, sizeof(struct __sanitizer_aiocb));")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("if (aiocbp_) {")
++ pcmd(" PRE_READ(aiocbp_, sizeof(struct __sanitizer_aiocb));")
++ pcmd("}")
++ }
+ } else if (syscall == "aio_fsync") {
-+ pcmd("if (aiocbp_) {")
-+ pcmd(" PRE_READ(aiocbp_, sizeof(struct __sanitizer_aiocb));")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("if (aiocbp_) {")
++ pcmd(" PRE_READ(aiocbp_, sizeof(struct __sanitizer_aiocb));")
++ pcmd("}")
++ }
+ } else if (syscall == "aio_read") {
-+ pcmd("if (aiocbp_) {")
-+ pcmd(" PRE_READ(aiocbp_, sizeof(struct __sanitizer_aiocb));")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("if (aiocbp_) {")
++ pcmd(" PRE_READ(aiocbp_, sizeof(struct __sanitizer_aiocb));")
++ pcmd("}")
++ }
+ } else if (syscall == "aio_return") {
-+ pcmd("if (aiocbp_) {")
-+ pcmd(" PRE_READ(aiocbp_, sizeof(struct __sanitizer_aiocb));")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("if (aiocbp_) {")
++ pcmd(" PRE_READ(aiocbp_, sizeof(struct __sanitizer_aiocb));")
++ pcmd("}")
++ }
+ } else if (syscall == "compat_50_aio_suspend") {
+ pcmd("/* TODO */")
+ } else if (syscall == "aio_write") {
-+ pcmd("if (aiocbp_) {")
-+ pcmd(" PRE_READ(aiocbp_, sizeof(struct __sanitizer_aiocb));")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("if (aiocbp_) {")
++ pcmd(" PRE_READ(aiocbp_, sizeof(struct __sanitizer_aiocb));")
++ pcmd("}")
++ }
+ } else if (syscall == "lio_listio") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "__mount50") {
-+ pcmd("const char *type = (const char *)type_;")
-+ pcmd("const char *path = (const char *)path_;")
-+ pcmd("if (type) {")
-+ pcmd(" PRE_READ(type, __sanitizer::internal_strlen(type) + 1);")
-+ pcmd("}")
-+ pcmd("if (path) {")
-+ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
-+ pcmd("}")
-+ pcmd("if (data_) {")
-+ pcmd(" PRE_READ(data_, data_len_);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *type = (const char *)type_;")
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (type) {")
++ pcmd(" PRE_READ(type, __sanitizer::internal_strlen(type) + 1);")
++ pcmd("}")
++ pcmd("if (path) {")
++ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ pcmd("if (data_) {")
++ pcmd(" PRE_READ(data_, data_len_);")
++ pcmd("}")
++ } else {
++ pcmd("const char *type = (const char *)type_;")
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (type) {")
++ pcmd(" POST_READ(type, __sanitizer::internal_strlen(type) + 1);")
++ pcmd("}")
++ pcmd("if (path) {")
++ pcmd(" POST_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ pcmd("if (data_) {")
++ pcmd(" POST_READ(data_, data_len_);")
++ pcmd("}")
++ }
+ } else if (syscall == "mremap") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "pset_create") {
@@ -1580,135 +2393,193 @@ $NetBSD$
+ } else if (syscall == "__gettimeofday50") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "__settimeofday50") {
-+ pcmd("if (tv_) {")
-+ pcmd(" PRE_READ(tv_, timeval_sz);")
-+ pcmd("}")
-+ pcmd("if (tzp_) {")
-+ pcmd(" PRE_READ(tzp_, struct_timezone_sz);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("if (tv_) {")
++ pcmd(" PRE_READ(tv_, timeval_sz);")
++ pcmd("}")
++ pcmd("if (tzp_) {")
++ pcmd(" PRE_READ(tzp_, struct_timezone_sz);")
++ pcmd("}")
++ }
+ } else if (syscall == "__utimes50") {
-+ pcmd("struct __sanitizer_timespec **tptr = (struct __sanitizer_timespec **)tptr_;")
-+ pcmd("const char *path = (const char *)path_;")
-+ pcmd("if (path) {")
-+ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
-+ pcmd("}")
-+ pcmd("if (tptr) {")
-+ pcmd(" PRE_READ(tptr[0], struct_timespec_sz);")
-+ pcmd(" PRE_READ(tptr[1], struct_timespec_sz);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("struct __sanitizer_timespec **tptr = (struct __sanitizer_timespec **)tptr_;")
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ pcmd("if (tptr) {")
++ pcmd(" PRE_READ(tptr[0], struct_timespec_sz);")
++ pcmd(" PRE_READ(tptr[1], struct_timespec_sz);")
++ pcmd("}")
++ }
+ } else if (syscall == "__adjtime50") {
-+ pcmd("if (delta_) {")
-+ pcmd(" PRE_READ(delta_, timeval_sz);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("if (delta_) {")
++ pcmd(" PRE_READ(delta_, timeval_sz);")
++ pcmd("}")
++ }
+ } else if (syscall == "__lfs_segwait50") {
+ pcmd("/* TODO */")
+ } else if (syscall == "__futimes50") {
-+ pcmd("struct __sanitizer_timespec **tptr = (struct __sanitizer_timespec **)tptr_;")
-+ pcmd("if (tptr) {")
-+ pcmd(" PRE_READ(tptr[0], struct_timespec_sz);")
-+ pcmd(" PRE_READ(tptr[1], struct_timespec_sz);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("struct __sanitizer_timespec **tptr = (struct __sanitizer_timespec **)tptr_;")
++ pcmd("if (tptr) {")
++ pcmd(" PRE_READ(tptr[0], struct_timespec_sz);")
++ pcmd(" PRE_READ(tptr[1], struct_timespec_sz);")
++ pcmd("}")
++ }
+ } else if (syscall == "__lutimes50") {
-+ pcmd("struct __sanitizer_timespec **tptr = (struct __sanitizer_timespec **)tptr_;")
-+ pcmd("const char *path = (const char *)path_;")
-+ pcmd("if (path) {")
-+ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
-+ pcmd("}")
-+ pcmd("if (tptr) {")
-+ pcmd(" PRE_READ(tptr[0], struct_timespec_sz);")
-+ pcmd(" PRE_READ(tptr[1], struct_timespec_sz);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("struct __sanitizer_timespec **tptr = (struct __sanitizer_timespec **)tptr_;")
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ pcmd("if (tptr) {")
++ pcmd(" PRE_READ(tptr[0], struct_timespec_sz);")
++ pcmd(" PRE_READ(tptr[1], struct_timespec_sz);")
++ pcmd("}")
++ } else {
++ pcmd("struct __sanitizer_timespec **tptr = (struct __sanitizer_timespec **)tptr_;")
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" POST_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ pcmd("if (tptr) {")
++ pcmd(" POST_READ(tptr[0], struct_timespec_sz);")
++ pcmd(" POST_READ(tptr[1], struct_timespec_sz);")
++ pcmd("}")
++ }
+ } else if (syscall == "__setitimer50") {
-+ pcmd("struct __sanitizer_itimerval *itv = (struct __sanitizer_itimerval *)itv_;")
-+ pcmd("if (itv) {")
-+ pcmd(" PRE_READ(&itv->it_interval.tv_sec, sizeof(__sanitizer_time_t));")
-+ pcmd(" PRE_READ(&itv->it_interval.tv_usec, sizeof(__sanitizer_suseconds_t));")
-+ pcmd(" PRE_READ(&itv->it_value.tv_sec, sizeof(__sanitizer_time_t));")
-+ pcmd(" PRE_READ(&itv->it_value.tv_usec, sizeof(__sanitizer_suseconds_t));")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("struct __sanitizer_itimerval *itv = (struct __sanitizer_itimerval *)itv_;")
++ pcmd("if (itv) {")
++ pcmd(" PRE_READ(&itv->it_interval.tv_sec, sizeof(__sanitizer_time_t));")
++ pcmd(" PRE_READ(&itv->it_interval.tv_usec, sizeof(__sanitizer_suseconds_t));")
++ pcmd(" PRE_READ(&itv->it_value.tv_sec, sizeof(__sanitizer_time_t));")
++ pcmd(" PRE_READ(&itv->it_value.tv_usec, sizeof(__sanitizer_suseconds_t));")
++ pcmd("}")
++ }
+ } else if (syscall == "__getitimer50") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "__clock_gettime50") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "__clock_settime50") {
-+ pcmd("if (tp_) {")
-+ pcmd(" PRE_READ(tp_, struct_timespec_sz);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("if (tp_) {")
++ pcmd(" PRE_READ(tp_, struct_timespec_sz);")
++ pcmd("}")
++ }
+ } else if (syscall == "__clock_getres50") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "__nanosleep50") {
-+ pcmd("if (rqtp_) {")
-+ pcmd(" PRE_READ(rqtp_, struct_timespec_sz);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("if (rqtp_) {")
++ pcmd(" PRE_READ(rqtp_, struct_timespec_sz);")
++ pcmd("}")
++ }
+ } else if (syscall == "____sigtimedwait50") {
-+ pcmd("if (set_) {")
-+ pcmd(" PRE_READ(set_, sizeof(__sanitizer_sigset_t));")
-+ pcmd("}")
-+ pcmd("if (timeout_) {")
-+ pcmd(" PRE_READ(timeout_, struct_timespec_sz);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("if (set_) {")
++ pcmd(" PRE_READ(set_, sizeof(__sanitizer_sigset_t));")
++ pcmd("}")
++ pcmd("if (timeout_) {")
++ pcmd(" PRE_READ(timeout_, struct_timespec_sz);")
++ pcmd("}")
++ }
+ } else if (syscall == "__mq_timedsend50") {
-+ pcmd("if (msg_ptr_) {")
-+ pcmd(" PRE_READ(msg_ptr_, msg_len_);")
-+ pcmd("}")
-+ pcmd("if (abs_timeout_) {")
-+ pcmd(" PRE_READ(abs_timeout_, struct_timespec_sz);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("if (msg_ptr_) {")
++ pcmd(" PRE_READ(msg_ptr_, msg_len_);")
++ pcmd("}")
++ pcmd("if (abs_timeout_) {")
++ pcmd(" PRE_READ(abs_timeout_, struct_timespec_sz);")
++ pcmd("}")
++ }
+ } else if (syscall == "__mq_timedreceive50") {
-+ pcmd("if (msg_ptr_) {")
-+ pcmd(" PRE_READ(msg_ptr_, msg_len_);")
-+ pcmd("}")
-+ pcmd("if (abs_timeout_) {")
-+ pcmd(" PRE_READ(abs_timeout_, struct_timespec_sz);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("if (msg_ptr_) {")
++ pcmd(" PRE_READ(msg_ptr_, msg_len_);")
++ pcmd("}")
++ pcmd("if (abs_timeout_) {")
++ pcmd(" PRE_READ(abs_timeout_, struct_timespec_sz);")
++ pcmd("}")
++ }
+ } else if (syscall == "compat_60__lwp_park") {
+ pcmd("/* TODO */")
+ } else if (syscall == "__kevent50") {
-+ pcmd("if (changelist_) {")
-+ pcmd(" PRE_READ(changelist_, nchanges_ * struct_kevent_sz);")
-+ pcmd("}")
-+ pcmd("if (timeout_) {")
-+ pcmd(" PRE_READ(timeout_, struct_timespec_sz);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("if (changelist_) {")
++ pcmd(" PRE_READ(changelist_, nchanges_ * struct_kevent_sz);")
++ pcmd("}")
++ pcmd("if (timeout_) {")
++ pcmd(" PRE_READ(timeout_, struct_timespec_sz);")
++ pcmd("}")
++ }
+ } else if (syscall == "__pselect50") {
-+ pcmd("if (ts_) {")
-+ pcmd(" PRE_READ(ts_, struct_timespec_sz);")
-+ pcmd("}")
-+ pcmd("if (mask_) {")
-+ pcmd(" PRE_READ(mask_, sizeof(struct __sanitizer_sigset_t));")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("if (ts_) {")
++ pcmd(" PRE_READ(ts_, struct_timespec_sz);")
++ pcmd("}")
++ pcmd("if (mask_) {")
++ pcmd(" PRE_READ(mask_, sizeof(struct __sanitizer_sigset_t));")
++ pcmd("}")
++ }
+ } else if (syscall == "__pollts50") {
-+ pcmd("if (ts_) {")
-+ pcmd(" PRE_READ(ts_, struct_timespec_sz);")
-+ pcmd("}")
-+ pcmd("if (mask_) {")
-+ pcmd(" PRE_READ(mask_, sizeof(struct __sanitizer_sigset_t));")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("if (ts_) {")
++ pcmd(" PRE_READ(ts_, struct_timespec_sz);")
++ pcmd("}")
++ pcmd("if (mask_) {")
++ pcmd(" PRE_READ(mask_, sizeof(struct __sanitizer_sigset_t));")
++ pcmd("}")
++ }
+ } else if (syscall == "__aio_suspend50") {
-+ pcmd("int i;")
-+ pcmd("const struct aiocb * const *list = (const struct aiocb * const *)list_;")
-+ pcmd("if (list) {")
-+ pcmd(" for (i = 0; i < nent_; i++) {")
-+ pcmd(" if (list[i]) {")
-+ pcmd(" PRE_READ(list[i], sizeof(struct __sanitizer_aiocb));")
-+ pcmd(" }")
-+ pcmd(" }")
-+ pcmd("}")
-+ pcmd("if (timeout_) {")
-+ pcmd(" PRE_READ(timeout_, struct_timespec_sz);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("int i;")
++ pcmd("const struct aiocb * const *list = (const struct aiocb * const *)list_;")
++ pcmd("if (list) {")
++ pcmd(" for (i = 0; i < nent_; i++) {")
++ pcmd(" if (list[i]) {")
++ pcmd(" PRE_READ(list[i], sizeof(struct __sanitizer_aiocb));")
++ pcmd(" }")
++ pcmd(" }")
++ pcmd("}")
++ pcmd("if (timeout_) {")
++ pcmd(" PRE_READ(timeout_, struct_timespec_sz);")
++ pcmd("}")
++ }
+ } else if (syscall == "__stat50") {
-+ pcmd("const char *path = (const char *)path_;")
-+ pcmd("if (path) {")
-+ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (res == 0) {")
++ pcmd(" if (path) {")
++ pcmd(" POST_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd(" }")
++ pcmd("}")
++ }
+ } else if (syscall == "__fstat50") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "__lstat50") {
-+ pcmd("const char *path = (const char *)path_;")
-+ pcmd("if (path) {")
-+ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (res == 0) {")
++ pcmd(" if (path) {")
++ pcmd(" POST_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd(" }")
++ pcmd("}")
++ }
+ } else if (syscall == "____semctl50") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "__shmctl50") {
@@ -1718,13 +2589,25 @@ $NetBSD$
+ } else if (syscall == "__getrusage50") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "__timer_settime50") {
-+ pcmd("struct __sanitizer_itimerval *value = (struct __sanitizer_itimerval *)value_;")
-+ pcmd("if (value) {")
-+ pcmd(" PRE_READ(&value->it_interval.tv_sec, sizeof(__sanitizer_time_t));")
-+ pcmd(" PRE_READ(&value->it_interval.tv_usec, sizeof(__sanitizer_suseconds_t));")
-+ pcmd(" PRE_READ(&value->it_value.tv_sec, sizeof(__sanitizer_time_t));")
-+ pcmd(" PRE_READ(&value->it_value.tv_usec, sizeof(__sanitizer_suseconds_t));")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("struct __sanitizer_itimerval *value = (struct __sanitizer_itimerval *)value_;")
++ pcmd("if (value) {")
++ pcmd(" PRE_READ(&value->it_interval.tv_sec, sizeof(__sanitizer_time_t));")
++ pcmd(" PRE_READ(&value->it_interval.tv_usec, sizeof(__sanitizer_suseconds_t));")
++ pcmd(" PRE_READ(&value->it_value.tv_sec, sizeof(__sanitizer_time_t));")
++ pcmd(" PRE_READ(&value->it_value.tv_usec, sizeof(__sanitizer_suseconds_t));")
++ pcmd("}")
++ } else {
++ pcmd("struct __sanitizer_itimerval *value = (struct __sanitizer_itimerval *)value_;")
++ pcmd("if (res == 0) {")
++ pcmd(" if (value) {")
++ pcmd(" POST_READ(&value->it_interval.tv_sec, sizeof(__sanitizer_time_t));")
++ pcmd(" POST_READ(&value->it_interval.tv_usec, sizeof(__sanitizer_suseconds_t));")
++ pcmd(" POST_READ(&value->it_value.tv_sec, sizeof(__sanitizer_time_t));")
++ pcmd(" POST_READ(&value->it_value.tv_usec, sizeof(__sanitizer_suseconds_t));")
++ pcmd(" }")
++ pcmd("}")
++ }
+ } else if (syscall == "__timer_gettime50") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "__ntp_gettime50") {
@@ -1732,14 +2615,31 @@ $NetBSD$
+ } else if (syscall == "__wait450") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "__mknod50") {
-+ pcmd("const char *path = (const char *)path_;")
-+ pcmd("if (path) {")
-+ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (res == 0) {")
++ pcmd(" if (path) {")
++ pcmd(" POST_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd(" }")
++ pcmd("}")
++ }
+ } else if (syscall == "__fhstat50") {
-+ pcmd("if (fhp_) {")
-+ pcmd(" PRE_READ(fhp_, fh_size_);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("if (fhp_) {")
++ pcmd(" PRE_READ(fhp_, fh_size_);")
++ pcmd("}")
++ } else {
++ pcmd("if (res == 0) {")
++ pcmd(" if (fhp_) {")
++ pcmd(" POST_READ(fhp_, fh_size_);")
++ pcmd(" }")
++ pcmd("}")
++ }
+ } else if (syscall == "pipe2") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "dup3") {
@@ -1747,143 +2647,337 @@ $NetBSD$
+ } else if (syscall == "kqueue1") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "paccept") {
-+ pcmd("if (mask_) {")
-+ pcmd(" PRE_READ(mask_, sizeof(__sanitizer_sigset_t));")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("if (mask_) {")
++ pcmd(" PRE_READ(mask_, sizeof(__sanitizer_sigset_t));")
++ pcmd("}")
++ } else {
++ pcmd("if (res >= 0) {")
++ pcmd(" if (mask_) {")
++ pcmd(" PRE_READ(mask_, sizeof(__sanitizer_sigset_t));")
++ pcmd(" }")
++ pcmd("}")
++ }
+ } else if (syscall == "linkat") {
-+ pcmd("const char *name1 = (const char *)name1_;")
-+ pcmd("const char *name2 = (const char *)name2_;")
-+ pcmd("if (name1) {")
-+ pcmd(" PRE_READ(name1, __sanitizer::internal_strlen(name1) + 1);")
-+ pcmd("}")
-+ pcmd("if (name2) {")
-+ pcmd(" PRE_READ(name2, __sanitizer::internal_strlen(name2) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *name1 = (const char *)name1_;")
++ pcmd("const char *name2 = (const char *)name2_;")
++ pcmd("if (name1) {")
++ pcmd(" PRE_READ(name1, __sanitizer::internal_strlen(name1) + 1);")
++ pcmd("}")
++ pcmd("if (name2) {")
++ pcmd(" PRE_READ(name2, __sanitizer::internal_strlen(name2) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("const char *name1 = (const char *)name1_;")
++ pcmd("const char *name2 = (const char *)name2_;")
++ pcmd("if (res == 0) {")
++ pcmd(" if (name1) {")
++ pcmd(" POST_READ(name1, __sanitizer::internal_strlen(name1) + 1);")
++ pcmd(" }")
++ pcmd(" if (name2) {")
++ pcmd(" POST_READ(name2, __sanitizer::internal_strlen(name2) + 1);")
++ pcmd(" }")
++ pcmd("}")
++ }
+ } else if (syscall == "renameat") {
-+ pcmd("const char *from = (const char *)from_;")
-+ pcmd("const char *to = (const char *)to_;")
-+ pcmd("if (from) {")
-+ pcmd(" PRE_READ(from, __sanitizer::internal_strlen(from) + 1);")
-+ pcmd("}")
-+ pcmd("if (to) {")
-+ pcmd(" PRE_READ(to, __sanitizer::internal_strlen(to) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *from = (const char *)from_;")
++ pcmd("const char *to = (const char *)to_;")
++ pcmd("if (from) {")
++ pcmd(" PRE_READ(from, __sanitizer::internal_strlen(from) + 1);")
++ pcmd("}")
++ pcmd("if (to) {")
++ pcmd(" PRE_READ(to, __sanitizer::internal_strlen(to) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("const char *from = (const char *)from_;")
++ pcmd("const char *to = (const char *)to_;")
++ pcmd("if (res == 0) {")
++ pcmd(" if (from) {")
++ pcmd(" POST_READ(from, __sanitizer::internal_strlen(from) + 1);")
++ pcmd(" }")
++ pcmd(" if (to) {")
++ pcmd(" POST_READ(to, __sanitizer::internal_strlen(to) + 1);")
++ pcmd(" }")
++ pcmd("}")
++ }
+ } else if (syscall == "mkfifoat") {
-+ pcmd("const char *path = (const char *)path_;")
-+ pcmd("if (path) {")
-+ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (res == 0) {")
++ pcmd(" if (path) {")
++ pcmd(" POST_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd(" }")
++ pcmd("}")
++ }
+ } else if (syscall == "mknodat") {
-+ pcmd("const char *path = (const char *)path_;")
-+ pcmd("if (path) {")
-+ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (res == 0) {")
++ pcmd(" if (path) {")
++ pcmd(" POST_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd(" }")
++ pcmd("}")
++ }
+ } else if (syscall == "mkdirat") {
-+ pcmd("const char *path = (const char *)path_;")
-+ pcmd("if (path) {")
-+ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (res == 0) {")
++ pcmd(" if (path) {")
++ pcmd(" POST_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd(" }")
++ pcmd("}")
++ }
+ } else if (syscall == "faccessat") {
-+ pcmd("const char *path = (const char *)path_;")
-+ pcmd("if (path) {")
-+ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (res == 0) {")
++ pcmd(" if (path) {")
++ pcmd(" POST_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd(" }")
++ pcmd("}")
++ }
+ } else if (syscall == "fchmodat") {
-+ pcmd("const char *path = (const char *)path_;")
-+ pcmd("if (path) {")
-+ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (res == 0) {")
++ pcmd(" if (path) {")
++ pcmd(" POST_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd(" }")
++ pcmd("}")
++ }
+ } else if (syscall == "fchownat") {
-+ pcmd("const char *path = (const char *)path_;")
-+ pcmd("if (path) {")
-+ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (res == 0) {")
++ pcmd(" if (path) {")
++ pcmd(" POST_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd(" }")
++ pcmd("}")
++ }
+ } else if (syscall == "fexecve") {
-+ pcmd("char **argp = (char **)argp_;")
-+ pcmd("char **envp = (char **)envp_;")
-+ pcmd("if (argp && argp[0]) {")
-+ pcmd(" char *a = argp[0];")
-+ pcmd(" while (a++) {")
-+ pcmd(" PRE_READ(a, __sanitizer::internal_strlen(a) + 1);")
-+ pcmd(" }")
-+ pcmd("}")
-+ pcmd("if (envp && envp[0]) {")
-+ pcmd(" char *e = envp[0];")
-+ pcmd(" while (e++) {")
-+ pcmd(" PRE_READ(e, __sanitizer::internal_strlen(e) + 1);")
-+ pcmd(" }")
-+ pcmd("}")
++ pcmd("/* TODO */")
+ } else if (syscall == "fstatat") {
-+ pcmd("const char *path = (const char *)path_;")
-+ pcmd("if (path) {")
-+ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" POST_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ }
+ } else if (syscall == "utimensat") {
-+ pcmd("const char *path = (const char *)path_;")
-+ pcmd("if (path) {")
-+ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
-+ pcmd("}")
-+ pcmd("if (tptr_) {")
-+ pcmd(" PRE_READ(tptr_, struct_timespec_sz);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ pcmd("if (tptr_) {")
++ pcmd(" PRE_READ(tptr_, struct_timespec_sz);")
++ pcmd("}")
++ } else {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (res > 0) {")
++ pcmd(" if (path) {")
++ pcmd(" POST_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd(" }")
++ pcmd(" if (tptr_) {")
++ pcmd(" POST_READ(tptr_, struct_timespec_sz);")
++ pcmd(" }")
++ pcmd("}")
++ }
+ } else if (syscall == "openat") {
-+ pcmd("const char *path = (const char *)path_;")
-+ pcmd("if (path) {")
-+ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (res > 0) {")
++ pcmd(" if (path) {")
++ pcmd(" POST_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd(" }")
++ pcmd("}")
++ }
+ } else if (syscall == "readlinkat") {
-+ pcmd("const char *path = (const char *)path_;")
-+ pcmd("if (path) {")
-+ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (res > 0) {")
++ pcmd(" if (path) {")
++ pcmd(" POST_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd(" }")
++ pcmd("}")
++ }
+ } else if (syscall == "symlinkat") {
-+ pcmd("const char *path1 = (const char *)path1_;")
-+ pcmd("const char *path2 = (const char *)path2_;")
-+ pcmd("if (path1) {")
-+ pcmd(" PRE_READ(path1, __sanitizer::internal_strlen(path1) + 1);")
-+ pcmd("}")
-+ pcmd("if (path2) {")
-+ pcmd(" PRE_READ(path2, __sanitizer::internal_strlen(path2) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *path1 = (const char *)path1_;")
++ pcmd("const char *path2 = (const char *)path2_;")
++ pcmd("if (path1) {")
++ pcmd(" PRE_READ(path1, __sanitizer::internal_strlen(path1) + 1);")
++ pcmd("}")
++ pcmd("if (path2) {")
++ pcmd(" PRE_READ(path2, __sanitizer::internal_strlen(path2) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("const char *path1 = (const char *)path1_;")
++ pcmd("const char *path2 = (const char *)path2_;")
++ pcmd("if (res == 0) {")
++ pcmd(" if (path1) {")
++ pcmd(" POST_READ(path1, __sanitizer::internal_strlen(path1) + 1);")
++ pcmd(" }")
++ pcmd(" if (path2) {")
++ pcmd(" POST_READ(path2, __sanitizer::internal_strlen(path2) + 1);")
++ pcmd(" }")
++ pcmd("}")
++ }
+ } else if (syscall == "unlinkat") {
-+ pcmd("const char *path = (const char *)path_;")
-+ pcmd("if (path) {")
-+ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (res == 0) {")
++ pcmd(" if (path) {")
++ pcmd(" POST_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd(" }")
++ pcmd("}")
++ }
+ } else if (syscall == "futimens") {
-+ pcmd("struct __sanitizer_timespec **tptr = (struct __sanitizer_timespec **)tptr_;")
-+ pcmd("if (tptr) {")
-+ pcmd(" PRE_READ(tptr[0], struct_timespec_sz);")
-+ pcmd(" PRE_READ(tptr[1], struct_timespec_sz);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("struct __sanitizer_timespec **tptr = (struct __sanitizer_timespec **)tptr_;")
++ pcmd("if (tptr) {")
++ pcmd(" PRE_READ(tptr[0], struct_timespec_sz);")
++ pcmd(" PRE_READ(tptr[1], struct_timespec_sz);")
++ pcmd("}")
++ } else {
++ pcmd("struct __sanitizer_timespec **tptr = (struct __sanitizer_timespec **)tptr_;")
++ pcmd("if (res == 0) {")
++ pcmd(" if (tptr) {")
++ pcmd(" POST_READ(tptr[0], struct_timespec_sz);")
++ pcmd(" POST_READ(tptr[1], struct_timespec_sz);")
++ pcmd(" }")
++ pcmd("}")
++ }
+ } else if (syscall == "__quotactl") {
-+ pcmd("const char *path = (const char *)path_;")
-+ pcmd("if (path) {")
-+ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (res == 0) {")
++ pcmd(" if (path) {")
++ pcmd(" POST_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd(" }")
++ pcmd("}")
++ }
+ } else if (syscall == "posix_spawn") {
-+ pcmd("const char *path = (const char *)path_;")
-+ pcmd("if (path) {")
-+ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (path) {")
++ pcmd(" PRE_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd("}")
++ } else {
++ pcmd("const char *path = (const char *)path_;")
++ pcmd("if (pid_) {")
++ pcmd(" if (path) {")
++ pcmd(" POST_READ(path, __sanitizer::internal_strlen(path) + 1);")
++ pcmd(" }")
++ pcmd("}")
++ }
+ } else if (syscall == "recvmmsg") {
-+ pcmd("if (timeout_) {")
-+ pcmd(" PRE_READ(timeout_, struct_timespec_sz);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("if (timeout_) {")
++ pcmd(" PRE_READ(timeout_, struct_timespec_sz);")
++ pcmd("}")
++ } else {
++ pcmd("if (res >= 0) {")
++ pcmd(" if (timeout_) {")
++ pcmd(" POST_READ(timeout_, struct_timespec_sz);")
++ pcmd(" }")
++ pcmd("}")
++ }
+ } else if (syscall == "sendmmsg") {
-+ pcmd("struct __sanitizer_mmsghdr *mmsg = (struct __sanitizer_mmsghdr *)mmsg_;")
-+ pcmd("unsigned int vlen = (vlen_ > 1024 ? 1024 : vlen_);");
-+ pcmd("if (mmsg) {")
-+ pcmd(" PRE_READ(mmsg, sizeof(struct __sanitizer_mmsghdr) * vlen);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("struct __sanitizer_mmsghdr *mmsg = (struct __sanitizer_mmsghdr *)mmsg_;")
++ pcmd("unsigned int vlen = (vlen_ > 1024 ? 1024 : vlen_);")
++ pcmd("if (mmsg) {")
++ pcmd(" PRE_READ(mmsg, sizeof(struct __sanitizer_mmsghdr) * vlen);")
++ pcmd("}")
++ } else {
++ pcmd("struct __sanitizer_mmsghdr *mmsg = (struct __sanitizer_mmsghdr *)mmsg_;")
++ pcmd("unsigned int vlen = (vlen_ > 1024 ? 1024 : vlen_);")
++ pcmd("if (res >= 0) {")
++ pcmd(" if (mmsg) {")
++ pcmd(" POST_READ(mmsg, sizeof(struct __sanitizer_mmsghdr) * vlen);")
++ pcmd(" }")
++ pcmd("}")
++ }
+ } else if (syscall == "clock_nanosleep") {
-+ pcmd("if (rqtp_) {")
-+ pcmd(" PRE_READ(rqtp_, struct_timespec_sz);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("if (rqtp_) {")
++ pcmd(" PRE_READ(rqtp_, struct_timespec_sz);")
++ pcmd("}")
++ } else {
++ pcmd("if (rqtp_) {")
++ pcmd(" POST_READ(rqtp_, struct_timespec_sz);")
++ pcmd("}")
++ }
+ } else if (syscall == "___lwp_park60") {
-+ pcmd("if (ts_) {")
-+ pcmd(" PRE_READ(ts_, struct_timespec_sz);")
-+ pcmd("}")
++ if (mode == "pre") {
++ pcmd("if (ts_) {")
++ pcmd(" PRE_READ(ts_, struct_timespec_sz);")
++ pcmd("}")
++ } else {
++ pcmd("if (res == 0) {")
++ pcmd(" if (ts_) {")
++ pcmd(" POST_READ(ts_, struct_timespec_sz);")
++ pcmd(" }")
++ pcmd("}")
++ }
+ } else if (syscall == "posix_fallocate") {
+ pcmd("/* Nothing to do */")
+ } else if (syscall == "fdiscard") {
@@ -1898,445 +2992,3 @@ $NetBSD$
+ exit 1
+ }
+}
-+
-+function post_syscall(syscall)
-+{
-+ # Hardcode sanitizing rules here
-+ # These syscalls don't change often so they are hand coded
-+ if (syscall == "syscall") {
-+ pcmd("/* Nothing to do */")
-+ } else if (syscall == "exit") {
-+ pcmd("/* Nothing to do */")
-+ } else if (syscall == "fork") {
-+ pcmd("COMMON_SYSCALL_POST_FORK(res);")
-+ } else if (syscall == "read") {
-+ } else if (syscall == "write") {
-+ } else if (syscall == "open") {
-+ } else if (syscall == "close") {
-+ } else if (syscall == "compat_50_wait4") {
-+ } else if (syscall == "compat_43_ocreat") {
-+ } else if (syscall == "link") {
-+ } else if (syscall == "unlink") {
-+ } else if (syscall == "chdir") {
-+ } else if (syscall == "fchdir") {
-+ } else if (syscall == "compat_50_mknod") {
-+ } else if (syscall == "chmod") {
-+ } else if (syscall == "chown") {
-+ } else if (syscall == "break") {
-+ } else if (syscall == "compat_20_getfsstat") {
-+ } else if (syscall == "compat_43_olseek") {
-+ } else if (syscall == "getpid") {
-+ } else if (syscall == "compat_40_mount") {
-+ } else if (syscall == "unmount") {
-+ } else if (syscall == "setuid") {
-+ } else if (syscall == "getuid") {
-+ } else if (syscall == "geteuid") {
-+ } else if (syscall == "ptrace") {
-+ } else if (syscall == "recvmsg") {
-+ } else if (syscall == "sendmsg") {
-+ } else if (syscall == "recvfrom") {
-+ } else if (syscall == "accept") {
-+ } else if (syscall == "getpeername") {
-+ } else if (syscall == "getsockname") {
-+ } else if (syscall == "access") {
-+ } else if (syscall == "chflags") {
-+ } else if (syscall == "fchflags") {
-+ } else if (syscall == "sync") {
-+ } else if (syscall == "kill") {
-+ } else if (syscall == "compat_43_stat43") {
-+ } else if (syscall == "getppid") {
-+ } else if (syscall == "compat_43_lstat43") {
-+ } else if (syscall == "dup") {
-+ } else if (syscall == "pipe") {
-+ } else if (syscall == "getegid") {
-+ } else if (syscall == "profil") {
-+ } else if (syscall == "ktrace") {
-+ } else if (syscall == "compat_13_sigaction13") {
-+ } else if (syscall == "getgid") {
-+ } else if (syscall == "compat_13_sigprocmask13") {
-+ } else if (syscall == "__getlogin") {
-+ } else if (syscall == "__setlogin") {
-+ } else if (syscall == "acct") {
-+ } else if (syscall == "compat_13_sigpending13") {
-+ } else if (syscall == "compat_13_sigaltstack13") {
-+ } else if (syscall == "ioctl") {
-+ } else if (syscall == "compat_12_oreboot") {
-+ } else if (syscall == "revoke") {
-+ } else if (syscall == "symlink") {
-+ } else if (syscall == "readlink") {
-+ } else if (syscall == "execve") {
-+ } else if (syscall == "umask") {
-+ } else if (syscall == "chroot") {
-+ } else if (syscall == "compat_43_fstat43") {
-+ } else if (syscall == "compat_43_ogetkerninfo") {
-+ } else if (syscall == "compat_43_ogetpagesize") {
-+ } else if (syscall == "compat_12_msync") {
-+ } else if (syscall == "vfork") {
-+ } else if (syscall == "compat_43_ommap") {
-+ } else if (syscall == "munmap") {
-+ } else if (syscall == "mprotect") {
-+ } else if (syscall == "madvise") {
-+ } else if (syscall == "mincore") {
-+ } else if (syscall == "getgroups") {
-+ } else if (syscall == "setgroups") {
-+ } else if (syscall == "getpgrp") {
-+ } else if (syscall == "setpgid") {
-+ } else if (syscall == "compat_50_setitimer") {
-+ } else if (syscall == "compat_43_owait") {
-+ } else if (syscall == "compat_12_oswapon") {
-+ } else if (syscall == "compat_50_getitimer") {
-+ } else if (syscall == "compat_43_ogethostname") {
-+ } else if (syscall == "compat_43_osethostname") {
-+ } else if (syscall == "compat_43_ogetdtablesize") {
-+ } else if (syscall == "dup2") {
-+ } else if (syscall == "fcntl") {
-+ } else if (syscall == "compat_50_select") {
-+ } else if (syscall == "fsync") {
-+ } else if (syscall == "setpriority") {
-+ } else if (syscall == "compat_30_socket") {
-+ } else if (syscall == "connect") {
-+ } else if (syscall == "compat_43_oaccept") {
-+ } else if (syscall == "getpriority") {
-+ } else if (syscall == "compat_43_osend") {
-+ } else if (syscall == "compat_43_orecv") {
-+ } else if (syscall == "compat_13_sigreturn13") {
-+ } else if (syscall == "bind") {
-+ } else if (syscall == "setsockopt") {
-+ } else if (syscall == "listen") {
-+ } else if (syscall == "compat_43_osigvec") {
-+ } else if (syscall == "compat_43_osigblock") {
-+ } else if (syscall == "compat_43_osigsetmask") {
-+ } else if (syscall == "compat_13_sigsuspend13") {
-+ } else if (syscall == "compat_43_osigstack") {
-+ } else if (syscall == "compat_43_orecvmsg") {
-+ } else if (syscall == "compat_43_osendmsg") {
-+ } else if (syscall == "compat_50_gettimeofday") {
-+ } else if (syscall == "compat_50_getrusage") {
-+ } else if (syscall == "getsockopt") {
-+ } else if (syscall == "readv") {
-+ } else if (syscall == "writev") {
-+ } else if (syscall == "compat_50_settimeofday") {
-+ } else if (syscall == "fchown") {
-+ } else if (syscall == "fchmod") {
-+ } else if (syscall == "compat_43_orecvfrom") {
-+ } else if (syscall == "setreuid") {
-+ } else if (syscall == "setregid") {
-+ } else if (syscall == "rename") {
-+ } else if (syscall == "compat_43_otruncate") {
-+ } else if (syscall == "compat_43_oftruncate") {
-+ } else if (syscall == "flock") {
-+ } else if (syscall == "mkfifo") {
-+ } else if (syscall == "sendto") {
-+ } else if (syscall == "shutdown") {
-+ } else if (syscall == "socketpair") {
-+ } else if (syscall == "mkdir") {
-+ } else if (syscall == "rmdir") {
-+ } else if (syscall == "compat_50_utimes") {
-+ } else if (syscall == "compat_50_adjtime") {
-+ } else if (syscall == "compat_43_ogetpeername") {
-+ } else if (syscall == "compat_43_ogethostid") {
-+ } else if (syscall == "compat_43_osethostid") {
-+ } else if (syscall == "compat_43_ogetrlimit") {
-+ } else if (syscall == "compat_43_osetrlimit") {
-+ } else if (syscall == "compat_43_okillpg") {
-+ } else if (syscall == "setsid") {
-+ } else if (syscall == "compat_50_quotactl") {
-+ } else if (syscall == "compat_43_oquota") {
-+ } else if (syscall == "compat_43_ogetsockname") {
-+ } else if (syscall == "nfssvc") {
-+ } else if (syscall == "compat_43_ogetdirentries") {
-+ } else if (syscall == "compat_20_statfs") {
-+ } else if (syscall == "compat_20_fstatfs") {
-+ } else if (syscall == "compat_30_getfh") {
-+ } else if (syscall == "compat_09_ogetdomainname") {
-+ } else if (syscall == "compat_09_osetdomainname") {
-+ } else if (syscall == "compat_09_ouname") {
-+ } else if (syscall == "sysarch") {
-+ } else if (syscall == "compat_10_osemsys") {
-+ } else if (syscall == "compat_10_omsgsys") {
-+ } else if (syscall == "compat_10_oshmsys") {
-+ } else if (syscall == "pread") {
-+ } else if (syscall == "pwrite") {
-+ } else if (syscall == "compat_30_ntp_gettime") {
-+ } else if (syscall == "ntp_adjtime") {
-+ } else if (syscall == "setgid") {
-+ } else if (syscall == "setegid") {
-+ } else if (syscall == "seteuid") {
-+ } else if (syscall == "lfs_bmapv") {
-+ } else if (syscall == "lfs_markv") {
-+ } else if (syscall == "lfs_segclean") {
-+ } else if (syscall == "compat_50_lfs_segwait") {
-+ } else if (syscall == "compat_12_stat12") {
-+ } else if (syscall == "compat_12_fstat12") {
-+ } else if (syscall == "compat_12_lstat12") {
-+ } else if (syscall == "pathconf") {
-+ } else if (syscall == "fpathconf") {
-+ } else if (syscall == "getrlimit") {
-+ } else if (syscall == "setrlimit") {
-+ } else if (syscall == "compat_12_getdirentries") {
-+ } else if (syscall == "mmap") {
-+ } else if (syscall == "__syscall") {
-+ } else if (syscall == "lseek") {
-+ } else if (syscall == "truncate") {
-+ } else if (syscall == "ftruncate") {
-+ } else if (syscall == "__sysctl") {
-+ } else if (syscall == "mlock") {
-+ } else if (syscall == "munlock") {
-+ } else if (syscall == "undelete") {
-+ } else if (syscall == "compat_50_futimes") {
-+ } else if (syscall == "getpgid") {
-+ } else if (syscall == "reboot") {
-+ } else if (syscall == "poll") {
-+ } else if (syscall == "afssys") {
-+ } else if (syscall == "compat_14___semctl") {
-+ } else if (syscall == "semget") {
-+ } else if (syscall == "semop") {
-+ } else if (syscall == "semconfig") {
-+ } else if (syscall == "compat_14_msgctl") {
-+ } else if (syscall == "msgget") {
-+ } else if (syscall == "msgsnd") {
-+ } else if (syscall == "msgrcv") {
-+ } else if (syscall == "shmat") {
-+ } else if (syscall == "compat_14_shmctl") {
-+ } else if (syscall == "shmdt") {
-+ } else if (syscall == "shmget") {
-+ } else if (syscall == "compat_50_clock_gettime") {
-+ } else if (syscall == "compat_50_clock_settime") {
-+ } else if (syscall == "compat_50_clock_getres") {
-+ } else if (syscall == "timer_create") {
-+ } else if (syscall == "timer_delete") {
-+ } else if (syscall == "compat_50_timer_settime") {
-+ } else if (syscall == "compat_50_timer_gettime") {
-+ } else if (syscall == "timer_getoverrun") {
-+ } else if (syscall == "compat_50_nanosleep") {
-+ } else if (syscall == "fdatasync") {
-+ } else if (syscall == "mlockall") {
-+ } else if (syscall == "munlockall") {
-+ } else if (syscall == "compat_50___sigtimedwait") {
-+ } else if (syscall == "sigqueueinfo") {
-+ } else if (syscall == "modctl") {
-+ } else if (syscall == "_ksem_init") {
-+ } else if (syscall == "_ksem_open") {
-+ } else if (syscall == "_ksem_unlink") {
-+ } else if (syscall == "_ksem_close") {
-+ } else if (syscall == "_ksem_post") {
-+ } else if (syscall == "_ksem_wait") {
-+ } else if (syscall == "_ksem_trywait") {
-+ } else if (syscall == "_ksem_getvalue") {
-+ } else if (syscall == "_ksem_destroy") {
-+ } else if (syscall == "_ksem_timedwait") {
-+ } else if (syscall == "mq_open") {
-+ } else if (syscall == "mq_close") {
-+ } else if (syscall == "mq_unlink") {
-+ } else if (syscall == "mq_getattr") {
-+ } else if (syscall == "mq_setattr") {
-+ } else if (syscall == "mq_notify") {
-+ } else if (syscall == "mq_send") {
-+ } else if (syscall == "mq_receive") {
-+ } else if (syscall == "compat_50_mq_timedsend") {
-+ } else if (syscall == "compat_50_mq_timedreceive") {
-+ } else if (syscall == "__posix_rename") {
-+ } else if (syscall == "swapctl") {
-+ } else if (syscall == "compat_30_getdents") {
-+ } else if (syscall == "minherit") {
-+ } else if (syscall == "lchmod") {
-+ } else if (syscall == "lchown") {
-+ } else if (syscall == "compat_50_lutimes") {
-+ } else if (syscall == "__msync13") {
-+ } else if (syscall == "compat_30___stat13") {
-+ } else if (syscall == "compat_30___fstat13") {
-+ } else if (syscall == "compat_30___lstat13") {
-+ } else if (syscall == "__sigaltstack14") {
-+ } else if (syscall == "__vfork14") {
-+ } else if (syscall == "__posix_chown") {
-+ } else if (syscall == "__posix_fchown") {
-+ } else if (syscall == "__posix_lchown") {
-+ } else if (syscall == "getsid") {
-+ } else if (syscall == "__clone") {
-+ } else if (syscall == "fktrace") {
-+ } else if (syscall == "preadv") {
-+ } else if (syscall == "pwritev") {
-+ } else if (syscall == "compat_16___sigaction14") {
-+ } else if (syscall == "__sigpending14") {
-+ } else if (syscall == "__sigprocmask14") {
-+ } else if (syscall == "__sigsuspend14") {
-+ } else if (syscall == "compat_16___sigreturn14") {
-+ } else if (syscall == "__getcwd") {
-+ } else if (syscall == "fchroot") {
-+ } else if (syscall == "compat_30_fhopen") {
-+ } else if (syscall == "compat_30_fhstat") {
-+ } else if (syscall == "compat_20_fhstatfs") {
-+ } else if (syscall == "compat_50_____semctl13") {
-+ } else if (syscall == "compat_50___msgctl13") {
-+ } else if (syscall == "compat_50___shmctl13") {
-+ } else if (syscall == "lchflags") {
-+ } else if (syscall == "issetugid") {
-+ } else if (syscall == "utrace") {
-+ } else if (syscall == "getcontext") {
-+ } else if (syscall == "setcontext") {
-+ } else if (syscall == "_lwp_create") {
-+ } else if (syscall == "_lwp_exit") {
-+ } else if (syscall == "_lwp_self") {
-+ } else if (syscall == "_lwp_wait") {
-+ } else if (syscall == "_lwp_suspend") {
-+ } else if (syscall == "_lwp_continue") {
-+ } else if (syscall == "_lwp_wakeup") {
-+ } else if (syscall == "_lwp_getprivate") {
-+ } else if (syscall == "_lwp_setprivate") {
-+ } else if (syscall == "_lwp_kill") {
-+ } else if (syscall == "_lwp_detach") {
-+ } else if (syscall == "compat_50__lwp_park") {
-+ } else if (syscall == "_lwp_unpark") {
-+ } else if (syscall == "_lwp_unpark_all") {
-+ } else if (syscall == "_lwp_setname") {
-+ } else if (syscall == "_lwp_getname") {
-+ } else if (syscall == "_lwp_ctl") {
-+ } else if (syscall == "compat_60_sa_register") {
-+ } else if (syscall == "compat_60_sa_stacks") {
-+ } else if (syscall == "compat_60_sa_enable") {
-+ } else if (syscall == "compat_60_sa_setconcurrency") {
-+ } else if (syscall == "compat_60_sa_yield") {
-+ } else if (syscall == "compat_60_sa_preempt") {
-+ } else if (syscall == "__sigaction_sigtramp") {
-+ } else if (syscall == "pmc_get_info") {
-+ } else if (syscall == "pmc_control") {
-+ } else if (syscall == "rasctl") {
-+ } else if (syscall == "kqueue") {
-+ } else if (syscall == "compat_50_kevent") {
-+ } else if (syscall == "_sched_setparam") {
-+ } else if (syscall == "_sched_getparam") {
-+ } else if (syscall == "_sched_setaffinity") {
-+ } else if (syscall == "_sched_getaffinity") {
-+ } else if (syscall == "sched_yield") {
-+ } else if (syscall == "_sched_protect") {
-+ } else if (syscall == "fsync_range") {
-+ } else if (syscall == "uuidgen") {
-+ } else if (syscall == "getvfsstat") {
-+ } else if (syscall == "statvfs1") {
-+ } else if (syscall == "fstatvfs1") {
-+ } else if (syscall == "compat_30_fhstatvfs1") {
-+ } else if (syscall == "extattrctl") {
-+ } else if (syscall == "extattr_set_file") {
-+ } else if (syscall == "extattr_get_file") {
-+ } else if (syscall == "extattr_delete_file") {
-+ } else if (syscall == "extattr_set_fd") {
-+ } else if (syscall == "extattr_get_fd") {
-+ } else if (syscall == "extattr_delete_fd") {
-+ } else if (syscall == "extattr_set_link") {
-+ } else if (syscall == "extattr_get_link") {
-+ } else if (syscall == "extattr_delete_link") {
-+ } else if (syscall == "extattr_list_fd") {
-+ } else if (syscall == "extattr_list_file") {
-+ } else if (syscall == "extattr_list_link") {
-+ } else if (syscall == "compat_50_pselect") {
-+ } else if (syscall == "compat_50_pollts") {
-+ } else if (syscall == "setxattr") {
-+ } else if (syscall == "lsetxattr") {
-+ } else if (syscall == "fsetxattr") {
-+ } else if (syscall == "getxattr") {
-+ } else if (syscall == "lgetxattr") {
-+ } else if (syscall == "fgetxattr") {
-+ } else if (syscall == "listxattr") {
-+ } else if (syscall == "llistxattr") {
-+ } else if (syscall == "flistxattr") {
-+ } else if (syscall == "removexattr") {
-+ } else if (syscall == "lremovexattr") {
-+ } else if (syscall == "fremovexattr") {
-+ } else if (syscall == "compat_50___stat30") {
-+ } else if (syscall == "compat_50___fstat30") {
-+ } else if (syscall == "compat_50___lstat30") {
-+ } else if (syscall == "__getdents30") {
-+ } else if (syscall == "posix_fadvise") {
-+ } else if (syscall == "compat_30___fhstat30") {
-+ } else if (syscall == "compat_50___ntp_gettime30") {
-+ } else if (syscall == "__socket30") {
-+ } else if (syscall == "__getfh30") {
-+ } else if (syscall == "__fhopen40") {
-+ } else if (syscall == "__fhstatvfs140") {
-+ } else if (syscall == "compat_50___fhstat40") {
-+ } else if (syscall == "aio_cancel") {
-+ } else if (syscall == "aio_error") {
-+ } else if (syscall == "aio_fsync") {
-+ } else if (syscall == "aio_read") {
-+ } else if (syscall == "aio_return") {
-+ } else if (syscall == "compat_50_aio_suspend") {
-+ } else if (syscall == "aio_write") {
-+ } else if (syscall == "lio_listio") {
-+ } else if (syscall == "__mount50") {
-+ } else if (syscall == "mremap") {
-+ } else if (syscall == "pset_create") {
-+ } else if (syscall == "pset_destroy") {
-+ } else if (syscall == "pset_assign") {
-+ } else if (syscall == "_pset_bind") {
-+ } else if (syscall == "__posix_fadvise50") {
-+ } else if (syscall == "__select50") {
-+ } else if (syscall == "__gettimeofday50") {
-+ } else if (syscall == "__settimeofday50") {
-+ } else if (syscall == "__utimes50") {
-+ } else if (syscall == "__adjtime50") {
-+ } else if (syscall == "__lfs_segwait50") {
-+ } else if (syscall == "__futimes50") {
-+ } else if (syscall == "__lutimes50") {
-+ } else if (syscall == "__setitimer50") {
-+ } else if (syscall == "__getitimer50") {
-+ } else if (syscall == "__clock_gettime50") {
-+ } else if (syscall == "__clock_settime50") {
-+ } else if (syscall == "__clock_getres50") {
-+ } else if (syscall == "__nanosleep50") {
-+ } else if (syscall == "____sigtimedwait50") {
-+ } else if (syscall == "__mq_timedsend50") {
-+ } else if (syscall == "__mq_timedreceive50") {
-+ } else if (syscall == "compat_60__lwp_park") {
-+ } else if (syscall == "__kevent50") {
-+ } else if (syscall == "__pselect50") {
-+ } else if (syscall == "__pollts50") {
-+ } else if (syscall == "__aio_suspend50") {
-+ } else if (syscall == "__stat50") {
-+ } else if (syscall == "__fstat50") {
-+ } else if (syscall == "__lstat50") {
-+ } else if (syscall == "____semctl50") {
-+ } else if (syscall == "__shmctl50") {
-+ } else if (syscall == "__msgctl50") {
-+ } else if (syscall == "__getrusage50") {
-+ } else if (syscall == "__timer_settime50") {
-+ } else if (syscall == "__timer_gettime50") {
-+ } else if (syscall == "__ntp_gettime50") {
-+ } else if (syscall == "__wait450") {
-+ } else if (syscall == "__mknod50") {
-+ } else if (syscall == "__fhstat50") {
-+ } else if (syscall == "pipe2") {
-+ } else if (syscall == "dup3") {
-+ } else if (syscall == "kqueue1") {
-+ } else if (syscall == "paccept") {
-+ } else if (syscall == "linkat") {
-+ } else if (syscall == "renameat") {
-+ } else if (syscall == "mkfifoat") {
-+ } else if (syscall == "mknodat") {
-+ } else if (syscall == "mkdirat") {
-+ } else if (syscall == "faccessat") {
-+ } else if (syscall == "fchmodat") {
-+ } else if (syscall == "fchownat") {
-+ } else if (syscall == "fexecve") {
-+ } else if (syscall == "fstatat") {
-+ } else if (syscall == "utimensat") {
-+ } else if (syscall == "openat") {
-+ } else if (syscall == "readlinkat") {
-+ } else if (syscall == "symlinkat") {
-+ } else if (syscall == "unlinkat") {
-+ } else if (syscall == "futimens") {
-+ } else if (syscall == "__quotactl") {
-+ } else if (syscall == "posix_spawn") {
-+ } else if (syscall == "recvmmsg") {
-+ } else if (syscall == "sendmmsg") {
-+ } else if (syscall == "clock_nanosleep") {
-+ } else if (syscall == "___lwp_park60") {
-+ } else if (syscall == "posix_fallocate") {
-+ } else if (syscall == "fdiscard") {
-+ } else if (syscall == "wait6") {
-+ } else if (syscall == "clock_getcpuclockid2") {
-+ } else {
-+ print "Unrecognized syscall: " syscall
-+ abnormal_exit = 1
-+ exit 1
-+ }
-+}
Home |
Main Index |
Thread Index |
Old Index