This is an archive of the discontinued LLVM Phabricator instance.

[Sanitizers] Check pthread_setcancel{state|type} interceptor arguments for != nullptr.
ClosedPublic

Authored by alekseyshl on Nov 3 2017, 4:51 PM.

Details

Summary

According to man, pthread_setcancelstate's oldstate and
pthread_setcanceltype's oldtype parameters can be nullptr.
Check these parameters for != nullptr before attempting to
access their shadow memory.

Diff Detail

Repository
rL LLVM

Event Timeline

alekseyshl created this revision.Nov 3 2017, 4:51 PM
dvyukov accepted this revision.Nov 6 2017, 12:37 AM
This revision is now accepted and ready to land.Nov 6 2017, 12:37 AM
This revision was automatically updated to reflect the committed changes.