This is an archive of the discontinued LLVM Phabricator instance.

Correct the setitimer interceptor on NetBSD
ClosedPublic

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

Details

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>

Diff Detail

Event Timeline

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