summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/scudo/standalone/flags.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [scudo][standalone] Implement TSD registry disablingKostya Kortchinsky2019-12-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: In order to implement `malloc_{enable|disable}` we were just disabling (or really locking) the Primary and the Secondary. That meant that allocations could still be serviced from the TSD as long as the cache wouldn't have to be filled from the Primary. This wasn't working out for Android tests, so this change implements registry disabling (eg: locking) so that `getTSDAndLock` doesn't return a TSD if the allocator is disabled. This also means that the Primary doesn't have to be disabled in this situation. For the Shared Registry, we loop through all the TSDs and lock them. For the Exclusive Registry, we add a `Disabled` boolean to the Registry that forces `getTSDAndLock` to use the Fallback TSD instead of the thread local one. Disabling the Registry is then done by locking the Fallback TSD and setting the boolean in question (I don't think this needed an atomic variable but I might be wrong). I clang-formatted the whole thing as usual hence the couple of extra whiteline changes in this CL. Reviewers: cferris, pcc, hctim, morehouse, eugenis Subscribers: jfb, #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D71719
* [Scudo] [GWP-ASan] Add GWP-ASan to Scudo Standalone.Mitch Phillips2019-12-131-0/+15
| | | | | | | | | | | | | | | | Summary: Adds GWP-ASan to Scudo standalone. Default parameters are pulled across from the GWP-ASan build. No backtrace support as of yet. Reviewers: cryptoad, eugenis, pcc Reviewed By: cryptoad Subscribers: merge_guards_bot, mgorny, #sanitizers, llvm-commits, cferris, vlad.tsyrklevich, pcc Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D71229
* compiler-rt: Rename .cc file in lib/scudo/standalone to .cppNico Weber2019-08-011-0/+57
Like r367463, but for scudo/standalone. llvm-svn: 367568
OpenPOWER on IntegriCloud