[all-commits] [llvm/llvm-project] 868120: [ASan] [HWASan] Add __sanitizer_ignore_free_hook()...
Mitch Phillips via All-commits
all-commits at lists.llvm.org
Fri Jul 12 04:41:24 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 8681202dd638c552eecb818d41312cbbfd48e606
https://github.com/llvm/llvm-project/commit/8681202dd638c552eecb818d41312cbbfd48e606
Author: Mitch Phillips <31459023+hctim at users.noreply.github.com>
Date: 2024-07-12 (Fri, 12 Jul 2024)
Changed paths:
M compiler-rt/include/sanitizer/allocator_interface.h
M compiler-rt/lib/asan/asan_allocator.cpp
M compiler-rt/lib/hwasan/hwasan_allocator.cpp
M compiler-rt/lib/sanitizer_common/sanitizer_allocator_interface.h
M compiler-rt/lib/sanitizer_common/sanitizer_common.cpp
M compiler-rt/lib/sanitizer_common/sanitizer_common.h
M compiler-rt/lib/sanitizer_common/sanitizer_common_interface.inc
A compiler-rt/test/asan/TestCases/Posix/ignore_free_hook.cpp
A compiler-rt/test/hwasan/TestCases/Posix/ignore_free_hook.cpp
Log Message:
-----------
[ASan] [HWASan] Add __sanitizer_ignore_free_hook() (#96749)
This change adds a new weak API function which makes the sanitizer
ignore the call to free(), and implements the
functionality in ASan and HWAsan. The runtime that implements this hook
can then call free() at a later point again on the same pointer (and
making sure the hook returns zero so that the memory will actually be
freed) when it's actually ready for the memory to be cleaned up.
This is needed in order to implement an sanitizer-compatible version
of Chrome's BackupRefPtr algorithm, since process-wide double-shimming
of malloc/free does not work on some platforms.
Requested and designed by @c01db33f (Mark) from Project Zero.
---------
Co-authored-by: Mark Brand <markbrand at google.com>
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list