[PATCH] D86694: [scudo] Allow -fsanitize=scudo on Linux and Windows (WIP, don't land as is)
Kostya Kortchinsky via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 16 11:51:51 PDT 2020
cryptoad added a comment.
In D86694#2277371 <https://reviews.llvm.org/D86694#2277371>, @aganea wrote:
> @cryptoad What happens if the primary was much smaller? Or if pages were //reserved// in much smaller ranges?
The Primary can be made smaller, but this works better with the Standalone version as some code was added to fallback to larger class sizes if a region is full (Android uses 256mb per region).
> @cryptoad Does SCUDO standalone differs in any of these aspects from this version?
So this requires a bit of background.
There are two models for the Thread Specific Data that holds the cached pointers: Shared (a pool of N caches is shared between all threads) and Exclusive (1 exclusive cache per thread).
For my initial port to Windows, I used the Shared model, with a pool of 32 caches max (it's a define in the platform header). If there is more than 32 cores, this can be increased.
I didn't try to make the Exclusive version work, mostly because I was using the Windows TLS API and the Shared fit right in with those, but it would get rid of a lot of the contention.
Overall with regard to the Standalone, it should be better on all accounts: faster (as we got rid of some of the quirks of sanitizer_common), lesser memory footprint, better reclaiming, more configurable.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86694/new/
https://reviews.llvm.org/D86694
More information about the cfe-commits
mailing list