HomePhabricator

Correct the setitimer interceptor on NetBSD

Description

Correct the setitimer interceptor on NetBSD

Summary:
itimerval can contain padding that may be legitimately uninitialized.

On NetBSD there are four integers of type "long, int, long, int", the
int argument stands for __sanitizer_suseconds_t. Compiler adds extra
padding in this layout.

Check every field of struct itimerval separately.

Define sanitizer_suseconds_t as long on FreeBSD, Linux and SmartOS,
and int on NetBSD. Define
sanitizer_timeval and __sanitizer_itimerval.

Sponsored by <The NetBSD Foundation>

Reviewers: eugenis, joerg, vitalybuka

Reviewed By: vitalybuka

Subscribers: emaste, kubamracek, llvm-commits, #sanitizers

Tags: #sanitizers

Differential Revision: https://reviews.llvm.org/D41502

Details

Committed
kamilJan 12 2018, 12:45 PM
Reviewer
vitalybuka
Differential Revision
D41502: Correct the setitimer interceptor on NetBSD
Parents
rL322398: Silence GCC 7 warning by using an enum class.
Branches
Unknown
Tags
Unknown