8 Commits

Author SHA1 Message Date
Florian Mayer
c6049e67ef Reapply "[HWASan] [compiler-rt] support non-4k pages on Android" (#95853)
Updated MapDynamicShadow callsite in asan_win.
2024-06-17 15:20:57 -07:00
Florian Mayer
1adf0fae05
Revert "[HWASan] [compiler-rt] support non-4k pages on Android" (#95853)
Reverts llvm/llvm-project#95069

Broke windows bot
2024-06-17 14:38:26 -07:00
Florian Mayer
5b04b6fe3f
[HWASan] [compiler-rt] support non-4k pages on Android (#95069) 2024-06-17 13:21:34 -07:00
Fangrui Song
8443ce563b
[sanitizer] Lift AsanDoesNotSupportStaticLinkage to sanitizer_common.h. NFC (#80948)
The `_DYNAMIC` reference from `AsanDoesNotSupportStaticLinkage` ensures
that `clang++ -fsanitize=address -static` gets a linker error.
`MemprofDoesNotSupportStaticLinkage` is similar for `-fmemory-profile`.
Move the functions to sanitizer_common.h to be used by more sanitizers
on ELF platforms.

Fuchsia does not use interposition and opts out the check (its
`AsanDoesNotSupportStaticLinkage` is a no-op).
2024-02-16 19:36:39 -08:00
Brad Smith
450be89136
[compiler-rt] Remove a few workarounds for FreeBSD 9.x (#76263)
Support for FreeBSD 11.x was dropped so garbage collect a few FreeBSD
9.x workarounds and make 12.x the oldest supported releases.
2023-12-29 05:10:13 -05:00
Vitaly Buka
e8554402b3 [NFC][memprof] Remove unused code 2022-07-20 18:50:45 -07:00
Fangrui Song
fde3ae88ee [asan][memprof] Declare _DYNAMIC and fix -Wparentheses
Declare `extern ElfW(Dyn) _DYNAMIC[];` so that it will trivially work on musl.
2020-12-27 20:28:59 -08:00
Teresa Johnson
3d4bba302d [MemProf] Memory profiling runtime support
See RFC for background:
http://lists.llvm.org/pipermail/llvm-dev/2020-June/142744.html

Follow on companion to the clang/llvm instrumentation support in D85948
and committed earlier.

This patch adds the compiler-rt runtime support for the memory
profiling.

Note that much of this support was cloned from asan (and then greatly
simplified and renamed). For example the interactions with the
sanitizer_common allocators, error handling, interception, etc.

The bulk of the memory profiling specific code can be found in the
MemInfoBlock, MemInfoBlockCache, and related classes defined and used
in memprof_allocator.cpp.

For now, the memory profile is dumped to text (stderr by default, but
honors the sanitizer_common log_path flag). It is dumped in either a
default verbose format, or an optional terse format.

This patch also adds a set of tests for the core functionality.

Differential Revision: https://reviews.llvm.org/D87120
2020-10-16 09:47:02 -07:00