Correct the setitimer interceptor on NetBSD

Authored by krytarowski on Thu, Dec 21, 10:14 AM.



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>

Diff Detail

krytarowski created this revision.Thu, Dec 21, 10:14 AM
vitalybuka accepted this revision.Fri, Jan 12, 11:32 AM
This revision is now accepted and ready to land.Fri, Jan 12, 11:32 AM
This revision was automatically updated to reflect the committed changes.