Skip to content

Commit

Permalink
scudo: Add support for tracking stack traces of secondary allocations.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
pcc committed Mar 9, 2021
1 parent 45a9dca commit 1f55fa0
Show file tree
Hide file tree
Showing 5 changed files with 312 additions and 156 deletions.
Loading

0 comments on commit 1f55fa0

Please sign in to comment.