hanchenye-llvm-project/compiler-rt
Kostya Kortchinsky 9920489a2a [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
2018-08-24 18:21:32 +00:00
..
cmake [CMake] Don't parse target triple except for arch 2018-08-14 18:01:19 +00:00
docs
include [hwasan] Add a (almost) no-interceptor mode. 2018-08-20 21:49:15 +00:00
lib [scudo] Replace eraseHeader with compareExchangeHeader for Quarantined chunks 2018-08-24 18:21:32 +00:00
test [hwasan] implement detection of realloc-after-free 2018-08-24 01:44:17 +00:00
unittests
utils [sanitizer] Cleanup sorting functions 2018-05-09 20:42:11 +00:00
www
.arcconfig
.gitignore
CMakeLists.txt [hwasan] Add a (almost) no-interceptor mode. 2018-08-20 21:49:15 +00:00
CODE_OWNERS.TXT
CREDITS.TXT
LICENSE.TXT Update copyright year to 2018. 2018-06-18 12:22:17 +00:00
README.txt

README.txt

Compiler-RT
================================

This directory and its subdirectories contain source code for the compiler
support routines.

Compiler-RT is open source software. You may freely distribute it under the
terms of the license agreement found in LICENSE.txt.

================================