aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/FileOutputBuffer.cpp
diff options
context:
space:
mode:
authorKostya Kortchinsky <kostyak@google.com>2018-08-24 18:21:32 +0000
committerKostya Kortchinsky <kostyak@google.com>2018-08-24 18:21:32 +0000
commit9920489a2aa2c73b4d757cde0de678a2d68ceab7 (patch)
treef7396bfffa1846d4ab3457734d50625bf8c24948 /llvm/lib/Support/FileOutputBuffer.cpp
parenta4a9c48c784cb01a36dad9b6aa9e828334df31f6 (diff)
downloadllvm-9920489a2aa2c73b4d757cde0de678a2d68ceab7.zip
llvm-9920489a2aa2c73b4d757cde0de678a2d68ceab7.tar.gz
llvm-9920489a2aa2c73b4d757cde0de678a2d68ceab7.tar.bz2
[scudo] Replace eraseHeader with compareExchangeHeader for Quarantined chunks
Summary: The reason for the existence of `eraseHeader` was that it was deemed faster to null-out a chunk header, effectively making it invalid, rather than marking it as available, which incurred a checksum computation and a cmpxchg. A previous use of `eraseHeader` was removed with D50655 due to a race. Now we remove the second use of it in the Quarantine deallocation path and replace is with a `compareExchangeHeader`. The reason for this is that greatly helps debugging some heap bugs as the chunk header is now valid and the chunk marked available, as opposed to the header being invalid. Eg: we get an invalid state error, instead of an invalid header error, which reduces the possibilities. The computational penalty is negligible. Reviewers: alekseyshl, flowerhack, eugenis Reviewed By: eugenis Subscribers: delcypher, jfb, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D51224 llvm-svn: 340633
Diffstat (limited to 'llvm/lib/Support/FileOutputBuffer.cpp')
0 files changed, 0 insertions, 0 deletions