This is an archive of the discontinued LLVM Phabricator instance.

[scudo] Allow for non-Android Shared TSD platforms, part 1
ClosedPublic

Authored by cryptoad on Oct 11 2017, 3:25 PM.

Details

Summary

This first part just prepares the grounds for part 2 and doesn't add any new
functionality. It mostly consists of small refactors:

  • move the pthread.h include higher as it will be used in the headers;
  • use errno.h in scudo_allocator.cpp instead of the sanitizer one, update the errno assignments accordingly (otherwise it creates conflicts on some platforms due to pthread.h including errno.h);
  • introduce and use getCurrentTSD and setCurrentTSD for the shared TSD model code;