diff options
author | Kostya Kortchinsky <kostyak@google.com> | 2017-04-21 18:10:53 +0000 |
---|---|---|
committer | Kostya Kortchinsky <kostyak@google.com> | 2017-04-21 18:10:53 +0000 |
commit | f1a54fdfd616ca59066125cb87986a3e232d8e52 (patch) | |
tree | afb8f4c6dc6ac7260e89558d7fcbfca1c7685ccc /llvm/lib/Support/DynamicLibrary.cpp | |
parent | 492674ec2ad994e49abbc556b6585bb381a027f1 (diff) | |
download | llvm-f1a54fdfd616ca59066125cb87986a3e232d8e52.zip llvm-f1a54fdfd616ca59066125cb87986a3e232d8e52.tar.gz llvm-f1a54fdfd616ca59066125cb87986a3e232d8e52.tar.bz2 |
[scudo] Bypass Quarantine if its size is set to 0
Summary:
In the current state of things, the deallocation path puts a chunk in the
Quarantine whether it's enabled or not (size of 0). When the Quarantine is
disabled, this results in the header being loaded (and checked) twice, and
stored (and checksummed) once, in `deallocate` and `Recycle`.
This change introduces a `quarantineOrDeallocateChunk` function that has a
fast path to deallocation if the Quarantine is disabled. Even though this is
not the preferred configuration security-wise, this change saves a sizeable
amount of processing for that particular situation (which could be adopted by
low memory devices). Additionally this simplifies a bit `deallocate` and
`reallocate`.
Reviewers: dvyukov, kcc, alekseyshl
Reviewed By: dvyukov
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D32310
llvm-svn: 301015
Diffstat (limited to 'llvm/lib/Support/DynamicLibrary.cpp')
0 files changed, 0 insertions, 0 deletions