PPeter Collingbournescudo: Add support for tracking stack traces of secondary allocations.
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
scudo: Add support for diagnosing memory errors when memory tagging is enabled. Introduce a function __scudo_get_error_info() that may be called to interpret a crash resulting from a memory error, potentially in another process, given information extracted from the crashing process. The crash may be interpreted as a use-after-free, buffer overflow or buffer underflow. Also introduce a feature to optionally record a stack trace for each allocation and deallocation. If this feature is enabled, a stack trace for the allocation and (if applicable) the deallocation will also be available via __scudo_get_error_info(). Differential Revision: https://reviews.llvm.org/D77283 | 6 年前 | |
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 | 5 年前 |