-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
compiler-rt-netbsd: Initial libkvm support in sanitizers
MSan with ps(1) breaks now in non-kvm(3) code. $ ./ps Uninitialized bytes in __interceptor_strcmp at offset 0 inside [0x71a000000008, 5) ==7197==WARNING: MemorySanitizer: use-of-uninitialized-value #0 0x7c5d7db0b373 (/lib/libc.so.12+0x10b373) #1 0x7c5d7db0bdf9 in _sysctlgetmibinfo (/lib/libc.so.12+0x10bdf9) #2 0x7c5d7daaa359 in _sysctlbyname (/lib/libc.so.12+0xaa359) #3 0x7c5d7daa65b6 in getdevmajor (/lib/libc.so.12+0xa65b6) #4 0x7c5d7daa0083 (/lib/libc.so.12+0xa0083) #5 0x7c5d7ea06ccd in pthread_once (/usr/lib/libpthread.so.1+0x6ccd) #6 0x7c5d7daa00cb in devname_r (/lib/libc.so.12+0xa00cb) #7 0x7c5d7daa0309 in __devname50 (/lib/libc.so.12+0xa0309) #8 0x49875e in tname /public/src.git/bin/ps/print.c:725:32 #9 0x4a9bdf in main /public/src.git/bin/ps/ps.c:467:5 #10 0x419ffa in ___start (/public/src.git/bin/ps/./ps+0x419ffa) SUMMARY: MemorySanitizer: use-of-uninitialized-value (/lib/libc.so.12+0x10b373) Exiting Sponsored by <The NetBSD Foundation>
- Loading branch information
1 parent
ca35e82
commit 8d0f480
Showing
12 changed files
with
332 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,27 @@ | ||
$NetBSD: distinfo,v 1.35 2015/09/11 01:21:57 tnn Exp $ | ||
|
||
SHA1 (patch-cmake_config-ix.cmake) = b863945f74990e30c6ae902953334f1324efc06d | ||
SHA1 (patch-cmake_config-ix.cmake) = dfc7a195cb774cc13cb495387781d600e16c82d9 | ||
SHA1 (patch-include_CMakeLists.txt) = b6f2713b7e5337aed542442936b6f747efe0a607 | ||
SHA1 (patch-include_sanitizer_netbsd__syscall__hooks.h) = 8104f06ec9e1b7646e2906767ef557a2e7d089da | ||
SHA1 (patch-include_sanitizer_netbsd__syscall__hooks.h) = 9b4900e42388d560e75b35a071b35dd75a70fe62 | ||
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) = 45fd48ae7bb21878432f925dea7af8d9f0ee0b02 | ||
SHA1 (patch-lib_msan_msan__interceptors.cc) = 77f8abc8dfdc5212b7991fd6e9a724990aa4f8cb | ||
SHA1 (patch-lib_msan_msan__interceptors.cc) = 92ed308e84b0845f15110e0167f265ed5cea2580 | ||
SHA1 (patch-lib_msan_msan__linux.cc) = d75d7587071a9e7a3f6a08a3008af55319e62cab | ||
SHA1 (patch-lib_sanitizer__common_CMakeLists.txt) = e6f0ecddd946981e9a4b76fd5325f56c2343edcd | ||
SHA1 (patch-lib_sanitizer__common_sanitizer__common__interceptors.inc) = 0837dfc7937d93b5811eae751d754006daba26dc | ||
SHA1 (patch-lib_sanitizer__common_CMakeLists.txt) = fcbf2987ccab5258fe760aef6ef47bd97e0e0b2c | ||
SHA1 (patch-lib_sanitizer__common_sanitizer__common__interceptors.inc) = e4ec25bef1effa4649f9989ea74a997315ba368d | ||
SHA1 (patch-lib_sanitizer__common_sanitizer__common__interceptors__ioctl.inc) = 231f519a0564aa69d746a7f0bbee1b1aeed927a7 | ||
SHA1 (patch-lib_sanitizer__common_sanitizer__internal__defs.h) = 126424635f89439e89371a57754232082e2290c6 | ||
SHA1 (patch-lib_sanitizer__common_sanitizer__netbsd__interceptors__ioctl.inc) = 0050635f92a9fa772303d3cddebd01f1f386c44a | ||
SHA1 (patch-lib_sanitizer__common_sanitizer__netbsd__syscalls.inc) = 460fc4a35f689d0fba6579e22de6c78aa0d252f7 | ||
SHA1 (patch-lib_sanitizer__common_sanitizer__netbsd__interceptors__ioctl.inc) = c351daa33f782bfe644f7b8517618a12328c7996 | ||
SHA1 (patch-lib_sanitizer__common_sanitizer__netbsd__syscalls.inc) = 35fae2ad655097b5dc019f6e3e82ed415f92db07 | ||
SHA1 (patch-lib_sanitizer__common_sanitizer__platform__interceptors.h) = 063eb96ea0d41c9359df4c347c4da08a995f0702 | ||
SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.cc) = 206f075ce7fa3445abd7207dfc96c615dd841c13 | ||
SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.h) = 390589d3adec17df72fa71f2bf0a3b32d387d167 | ||
SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.h) = 0275ddf3c60d43d793f656a76c5cccc46f28116a | ||
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__ioctls.awk) = 369b26ac9c66803045bf3ca01b7e476819da15f7 | ||
SHA1 (patch-utils_generate__netbsd__syscalls.awk) = bb702f4239fef65813bef4732edd8912eeaef681 | ||
SHA1 (patch-utils_generate__netbsd__ioctls.awk) = da4a60c43df5cd9b022ff108ac5120486f76a1d2 | ||
SHA1 (patch-utils_generate__netbsd__syscalls.awk) = 9a767008efc35b0b509287e6c2ccc14f49446323 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
compiler-rt-netbsd/patches/patch-include_sanitizer_netbsd__syscall__hooks.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
compiler-rt-netbsd/patches/patch-lib_msan_msan__interceptors.cc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
compiler-rt-netbsd/patches/patch-lib_sanitizer__common_CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__netbsd__interceptors__ioctl.inc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__netbsd__syscalls.inc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__interceptors.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
$NetBSD$ | ||
|
||
--- lib/sanitizer_common/sanitizer_platform_interceptors.h.orig 2018-01-08 15:33:13.000000000 +0000 | ||
+++ lib/sanitizer_common/sanitizer_platform_interceptors.h | ||
@@ -432,4 +432,6 @@ | ||
#define SANITIZER_INTERCEPT_SIGNAL_AND_SIGACTION (!SI_WINDOWS && SI_NOT_FUCHSIA) | ||
#define SANITIZER_INTERCEPT_BSD_SIGNAL SI_ANDROID | ||
|
||
+#define SANITIZER_INTERCEPT_KVM SI_NETBSD | ||
+ | ||
#endif // #ifndef SANITIZER_PLATFORM_INTERCEPTORS_H |
Oops, something went wrong.