diff options
author | Kostya Serebryany <kcc@google.com> | 2016-06-16 20:17:41 +0000 |
---|---|---|
committer | Kostya Serebryany <kcc@google.com> | 2016-06-16 20:17:41 +0000 |
commit | fd6ad5bba91f04796a2a5263d70d55dfe579413b (patch) | |
tree | 97501502947fbac1c992f5842bd3843bed2fe672 /llvm/lib/Fuzzer/FuzzerExtFunctions.def | |
parent | ce4ce7368f10e76d5375d83e8a359397920ffdef (diff) | |
download | bcm5719-llvm-fd6ad5bba91f04796a2a5263d70d55dfe579413b.tar.gz bcm5719-llvm-fd6ad5bba91f04796a2a5263d70d55dfe579413b.zip |
[libFuzzer] use the new chainable malloc hooks instead of the old un-chainable ones, use atomic for malloc/free counters instead of a thread local counter in the main thread. This should make on-the-spot leak detection in libFuzzer more reliable
llvm-svn: 272948
Diffstat (limited to 'llvm/lib/Fuzzer/FuzzerExtFunctions.def')
-rw-r--r-- | llvm/lib/Fuzzer/FuzzerExtFunctions.def | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Fuzzer/FuzzerExtFunctions.def b/llvm/lib/Fuzzer/FuzzerExtFunctions.def index 2810a0046e3..f7dcf9b54fb 100644 --- a/llvm/lib/Fuzzer/FuzzerExtFunctions.def +++ b/llvm/lib/Fuzzer/FuzzerExtFunctions.def @@ -31,6 +31,10 @@ EXT_FUNC(__lsan_disable, void, (), false); EXT_FUNC(__lsan_do_recoverable_leak_check, int, (), false); EXT_FUNC(__sanitizer_get_coverage_pc_buffer, uintptr_t, (uintptr_t**), true); EXT_FUNC(__sanitizer_get_number_of_counters, size_t, (), false); +EXT_FUNC(__sanitizer_install_malloc_and_free_hooks, int, + (void (*malloc_hook)(const volatile void *, size_t), + void (*free_hook)(const volatile void *)), + false); EXT_FUNC(__sanitizer_get_total_unique_caller_callee_pairs, size_t, (), false); EXT_FUNC(__sanitizer_get_total_unique_coverage, size_t, (), true); EXT_FUNC(__sanitizer_print_memory_profile, int, (size_t), false); |