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 | 9cb198789f2eb9672fdc0e22e1abb89d1ed8132a (patch) | |
tree | 8de59baf0dca7841c7197bf8389893fe11b9724b /test/cfi | |
parent | f94bfbbbbb7189d9e50ddf589a7567770859d0c0 (diff) |
[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
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301015 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/cfi')
0 files changed, 0 insertions, 0 deletions