This is an archive of the discontinued LLVM Phabricator instance.

[scudo] Scudo thread specific data refactor, part 1
ClosedPublic

Authored by cryptoad on Sep 21 2017, 9:12 AM.

Details

Summary

We are going through an overhaul of Scudo's TSD, to allow for new platforms
to be integrated more easily, and make the code more sound.

This first part is mostly renaming, preferring some shorter names, correcting
some comments. I removed getPrng and getAllocatorCache to directly access
the members, there was not really any benefit to them (and it was suggested by
Dmitry in D37590).

The only functional change is in scudo_tls_android.cpp: we enforce bounds to
the NumberOfTSDs and most of the logic in getTSDAndLockSlow is skipped if we
only have 1 TSD.