[PATCH] D53413: [Sanitize] openbsd does not have sysctlbyname call
David CARLIER via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 21 14:19:20 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL344876: [Sanitizer] openbsd does not have sysctlbyname call (authored by devnexen, committed by ).
Herald added a subscriber: delcypher.
Changed prior to commit:
https://reviews.llvm.org/D53413?vs=170326&id=170354#toc
Repository:
rL LLVM
https://reviews.llvm.org/D53413
Files:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc
compiler-rt/trunk/lib/sanitizer_common/sanitizer_openbsd.cc
Index: compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc
===================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc
@@ -796,16 +796,13 @@
#endif
}
+#if SANITIZER_FREEBSD
int internal_sysctlbyname(const char *sname, void *oldp, uptr *oldlenp,
const void *newp, uptr newlen) {
-#if SANITIZER_OPENBSD
- return sysctlbyname(sname, oldp, (size_t *)oldlenp, (void *)newp,
- (size_t)newlen);
-#else
return sysctlbyname(sname, oldp, (size_t *)oldlenp, newp, (size_t)newlen);
-#endif
}
#endif
+#endif
#if SANITIZER_LINUX
#define SA_RESTORER 0x04000000
Index: compiler-rt/trunk/lib/sanitizer_common/sanitizer_openbsd.cc
===================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_openbsd.cc
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_openbsd.cc
@@ -51,6 +51,13 @@
return mprotect(addr, length, prot);
}
+int internal_sysctlbyname(const char *sname, void *oldp, uptr *oldlenp,
+ const void *newp, uptr newlen) {
+ Printf("internal_sysctlbyname not implemented for OpenBSD");
+ Die();
+ return 0;
+}
+
uptr ReadBinaryName(/*out*/char *buf, uptr buf_len) {
// On OpenBSD we cannot get the full path
struct kinfo_proc kp;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53413.170354.patch
Type: text/x-patch
Size: 1424 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181021/9fb213b4/attachment-0001.bin>
More information about the llvm-commits
mailing list