llvm-project/compiler-rt/lib/scudo/standalone
Peter Collingbourne 1f55fa0b99 scudo: Add support for tracking stack traces of secondary allocations.
There is no centralized store of information related to secondary
allocations. Moreover the allocations themselves become inaccessible
when the allocation is freed in order to implement UAF detection,
so we can't store information there to be used in case of UAF
anyway.

Therefore our storage location for tracking stack traces of secondary
allocations is a ring buffer. The ring buffer is copied to the process
creating the crash dump when a fault occurs.

The ring buffer is also used to store stack traces for primary
deallocations. Stack traces for primary allocations continue to be
stored inline.

In order to support the scenario where an access to the ring buffer
is interrupted by a concurrently occurring crash, the ring buffer is
accessed in a lock-free manner.

Differential Revision: https://reviews.llvm.org/D94212
2021-03-09 11:43:03 -08:00
..
benchmarks scudo: Use more size classes in the malloc_free_loop benchmarks. 2020-02-03 13:18:25 -08:00
fuzz scudo: Add support for tracking stack traces of secondary allocations. 2021-03-09 11:43:03 -08:00
include/scudo scudo: Add support for tracking stack traces of secondary allocations. 2021-03-09 11:43:03 -08:00
tests scudo: Support memory tagging in the secondary allocator. 2021-03-08 14:39:33 -08:00
tools [scudo] [standalone] [NFC] clang-format code. 2020-12-10 12:25:42 -08:00
CMakeLists.txt scudo: Support memory tagging in the secondary allocator. 2021-03-08 14:39:33 -08:00
allocator_config.h scudo: Support memory tagging in the secondary allocator. 2021-03-08 14:39:33 -08:00
atomic_helpers.h scudo: Make it thread-safe to set some runtime configuration flags. 2020-09-30 09:42:45 -07:00
bytemap.h [scudo][standalone] Shift some data from dynamic to static 2020-02-18 09:38:50 -08:00
checksum.cpp Add vendor identity check for Hygon Dhyana processor in Scudo 2020-05-11 09:17:57 -07:00
checksum.h scudo: Replace a couple of macros with their expansions. 2019-11-27 10:12:27 -08:00
chunk.h scudo: Add an API for disabling memory initialization per-thread. 2020-09-18 12:04:27 -07:00
combined.h scudo: Add support for tracking stack traces of secondary allocations. 2021-03-09 11:43:03 -08:00
common.cpp compiler-rt: Rename .cc file in lib/scudo/standalone to .cpp 2019-08-01 14:36:38 +00:00
common.h scudo: Support memory tagging in the secondary allocator. 2021-03-08 14:39:33 -08:00
crc32_hw.cpp [scudo][standalone] Get statistics in a char buffer 2019-10-09 15:09:28 +00:00
flags.cpp [scudo][standalone] Restore GWP-ASan flag parsing 2021-01-27 12:35:34 -08:00
flags.h [Scudo] [GWP-ASan] Add GWP-ASan to Scudo Standalone. 2019-12-13 09:09:41 -08:00
flags.inc [scudo] Zero- and pattern-initialization of memory. 2020-04-30 15:00:55 -07:00
flags_parser.cpp scudo: Replace a couple of macros with their expansions. 2019-11-27 10:12:27 -08:00
flags_parser.h [scudo][standalone] Restore GWP-ASan flag parsing 2021-01-27 12:35:34 -08:00
fuchsia.cpp scudo: Support memory tagging in the secondary allocator. 2021-03-08 14:39:33 -08:00
fuchsia.h
internal_defs.h scudo: Remove the THREADLOCAL macro. 2020-09-10 19:16:21 -07:00
linux.cpp scudo: Support memory tagging in the secondary allocator. 2021-03-08 14:39:33 -08:00
linux.h scudo: Introduce a new mechanism to let Scudo access a platform-specific TLS slot 2020-09-10 19:14:28 -07:00
list.h [scudo][standalone] Lists fix 2019-10-28 15:08:08 -07:00
local_cache.h [scudo][standalone] Compact pointers for Caches/Batches 2021-02-25 12:14:38 -08:00
memtag.h scudo: Add support for tracking stack traces of secondary allocations. 2021-03-09 11:43:03 -08:00
mutex.h [scudo][standalone] Work with -Werror=class-memaccess 2020-04-11 07:29:12 -07:00
options.h scudo: Support memory tagging in the secondary allocator. 2021-03-08 14:39:33 -08:00
platform.h [scudo][standalone] Support __BIONIC__ 2019-12-20 12:59:33 -08:00
primary32.h [scudo][standalone] Compact pointers for Caches/Batches 2021-02-25 12:14:38 -08:00
primary64.h scudo: Support memory tagging in the secondary allocator. 2021-03-08 14:39:33 -08:00
quarantine.h [scudo][standalone] Work with -Werror=class-memaccess 2020-04-11 07:29:12 -07:00
release.cpp [scudo][standalone] Release smaller blocks less often 2020-07-16 09:44:25 -07:00
release.h [scudo][standalone] Compact pointers for Caches/Batches 2021-02-25 12:14:38 -08:00
report.cpp scudo: Replace a couple of macros with their expansions. 2019-11-27 10:12:27 -08:00
report.h
secondary.h scudo: Support memory tagging in the secondary allocator. 2021-03-08 14:39:33 -08:00
size_class_map.h [scudo][standalone] Compact pointers for Caches/Batches 2021-02-25 12:14:38 -08:00
stack_depot.h [scudo][standalone] Code tidying (NFC) 2020-11-02 16:00:31 -08:00
stats.h [scudo][standalone] Work with -Werror=class-memaccess 2020-04-11 07:29:12 -07:00
string_utils.cpp [scudo][standalone] Add missing va_end() in ScopedString::append 2020-12-02 16:10:50 -08:00
string_utils.h [scudo][standalone] Get statistics in a char buffer 2019-10-09 15:09:28 +00:00
tsd.h scudo: Replace ALIGNED macro with standard alignas specifier. 2020-04-09 14:36:03 -07:00
tsd_exclusive.h scudo: Support memory tagging in the secondary allocator. 2021-03-08 14:39:33 -08:00
tsd_shared.h scudo: Support memory tagging in the secondary allocator. 2021-03-08 14:39:33 -08:00
vector.h [scudo][standalone] Enabled SCUDO_DEBUG for tests + fixes 2019-11-15 08:33:57 -08:00
wrappers_c.cpp scudo: Instead of exporting a pointer to the allocator, export the allocator directly. NFCI. 2020-02-10 14:57:54 -08:00
wrappers_c.h scudo: Interleave odd and even tags for adjacent blocks. 2020-07-23 15:09:13 -07:00
wrappers_c.inc scudo: Support memory tagging in the secondary allocator. 2021-03-08 14:39:33 -08:00
wrappers_c_bionic.cpp scudo: Add support for tracking stack traces of secondary allocations. 2021-03-09 11:43:03 -08:00
wrappers_c_checks.h scudo: Replace a couple of macros with their expansions. 2019-11-27 10:12:27 -08:00
wrappers_cpp.cpp scudo: Instead of exporting a pointer to the allocator, export the allocator directly. NFCI. 2020-02-10 14:57:54 -08:00