[all-commits] [llvm/llvm-project] 90418d: [lsan] Invoke hooks on realloc
Northbadge via All-commits
all-commits at lists.llvm.org
Tue May 23 09:44:20 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 90418dc95ec1cd5aeb844d93f055b94759e2c408
https://github.com/llvm/llvm-project/commit/90418dc95ec1cd5aeb844d93f055b94759e2c408
Author: Jin Xin Ng <njx at google.com>
Date: 2023-05-23 (Tue, 23 May 2023)
Changed paths:
M compiler-rt/lib/lsan/lsan_allocator.cpp
M compiler-rt/test/sanitizer_common/TestCases/malloc_hook.cpp
Log Message:
-----------
[lsan] Invoke hooks on realloc
Previously lsan would not invoke hooks on reallocations.
An accompanying regression test is included in sanitizer_common.
This change also moves hook calls to a location where subsequent
calls (via an external caller) to __sanitizer_get_allocated_size
via hooks will return a valid size.
This allows a faster version of __sanitizer_get_allocated_size
to be implemented, which can skip checks.
Test to ensure RunFreeHooks' call order will come with
__sanitizer_get_allocated_size_fast
Differential Revision: https://reviews.llvm.org/D151175
More information about the All-commits
mailing list