[PATCH] D38826: [scudo] Allow for non-Android Shared TSD platforms, part 1

Kostya Kortchinsky via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 11 15:26:00 PDT 2017


cryptoad created this revision.
Herald added a subscriber: srhines.

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;


https://reviews.llvm.org/D38826

Files:
  lib/scudo/scudo_allocator.cpp
  lib/scudo/scudo_tsd.h
  lib/scudo/scudo_tsd_exclusive.cpp
  lib/scudo/scudo_tsd_shared.cpp
  lib/scudo/scudo_tsd_shared.inc

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38826.118709.patch
Type: text/x-patch
Size: 4784 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171011/e44617a5/attachment.bin>


More information about the llvm-commits mailing list