[PATCH] D40766: Handle NetBSD symbol renaming in msan_interceptors.cc
Kamil Rytarowski via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Dec 2 05:34:51 PST 2017
krytarowski updated this revision to Diff 125263.
Repository:
rL LLVM
https://reviews.llvm.org/D40766
Files:
lib/msan/msan_interceptors.cc
Index: lib/msan/msan_interceptors.cc
===================================================================
--- lib/msan/msan_interceptors.cc
+++ lib/msan/msan_interceptors.cc
@@ -37,6 +37,18 @@
// ACHTUNG! No other system header includes in this file.
// Ideally, we should get rid of stdarg.h as well.
+#if SANITIZER_NETBSD
+#define gettimeofday __gettimeofday50
+#define getrusage __getrusage50
+#define shmctl __shmctl50
+#endif
+
+#if SANITIZER_NETBSD
+#define sigaction_symname __sigaction14
+#else
+#define sigaction_symname sigaction
+#endif
+
using namespace __msan;
using __sanitizer::memory_order;
@@ -1298,15 +1310,15 @@
pnew_act->sigaction = (decltype(pnew_act->sigaction))new_cb;
}
}
- res = REAL(sigaction)(signo, pnew_act, oldact);
+ res = REAL(sigaction_symname)(signo, pnew_act, oldact);
if (res == 0 && oldact) {
uptr cb = (uptr)oldact->sigaction;
if (cb == (uptr)SignalAction || cb == (uptr)SignalHandler) {
oldact->sigaction = (decltype(oldact->sigaction))old_cb;
}
}
} else {
- res = REAL(sigaction)(signo, act, oldact);
+ res = REAL(sigaction_symname)(signo, act, oldact);
}
if (res == 0 && oldact) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40766.125263.patch
Type: text/x-patch
Size: 1213 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171202/02a25b00/attachment.bin>
More information about the llvm-commits
mailing list