[PATCH] D22061: [sanitizer] Handle null in internal_sigaction_syscall

Derek Bruening via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 6 11:39:48 PDT 2016

bruening created this revision.
bruening added a reviewer: aizatsky.
bruening added subscribers: llvm-commits, eugenis, kcc, zhaoqin, vitalybuka.
Herald added a subscriber: kubabrecka.

Adds support for nullptr as the action parameter to



Index: lib/sanitizer_common/sanitizer_linux.cc
--- lib/sanitizer_common/sanitizer_linux.cc
+++ lib/sanitizer_common/sanitizer_linux.cc
@@ -673,6 +673,8 @@
 // We disable for Go simply because we have not yet added to buildgo.sh.
 #if defined(__x86_64__) && !SANITIZER_GO
 int internal_sigaction_syscall(int signum, const void *act, void *oldact) {
+  if (act == nullptr)
+    return internal_sigaction_norestorer(signum, act, oldact);
   __sanitizer_sigaction u_adjust;
   internal_memcpy(&u_adjust, act, sizeof(u_adjust));

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22061.62922.patch
Type: text/x-patch
Size: 637 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160706/a73d04d2/attachment.bin>

More information about the llvm-commits mailing list