[compiler-rt] r274665 - [sanitizer] Handle null in internal_sigaction_syscall
Derek Bruening via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 6 13:13:40 PDT 2016
Author: bruening
Date: Wed Jul 6 15:13:40 2016
New Revision: 274665
URL: http://llvm.org/viewvc/llvm-project?rev=274665&view=rev
Log:
[sanitizer] Handle null in internal_sigaction_syscall
Summary:
Adds support for nullptr as the action parameter to
internal_sigaction_syscall().
Reviewers: aizatsky
Subscribers: kubabrecka, vitalybuka, zhaoqin, kcc, eugenis, llvm-commits
Differential Revision: http://reviews.llvm.org/D22061
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc?rev=274665&r1=274664&r2=274665&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc Wed Jul 6 15:13:40 2016
@@ -673,6 +673,8 @@ int internal_sigaction_norestorer(int si
// 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));
#if !SANITIZER_ANDROID || !SANITIZER_MIPS32
More information about the llvm-commits
mailing list