forked from OSchip/llvm-project
[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 llvm-svn: 274665
This commit is contained in:
parent
a463537a36
commit
eaa85136a5
|
@ -673,6 +673,8 @@ int internal_sigaction_norestorer(int signum, const void *act, void *oldact) {
|
|||
// 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
|
||||
|
|
Loading…
Reference in New Issue