Skip to content

Commit

Permalink
Add a new ASAN exclusion range
Browse files Browse the repository at this point in the history
Since llvm/llvm-project@fb77ca0
they actually moved the region that ASAN uses for its allocator.
  • Loading branch information
KJTsanaktsidis authored and rocallahan committed Oct 20, 2024
1 parent 6e374de commit f623b7e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/RecordSession.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2259,6 +2259,10 @@ static const MemoryRange asan_shadow(remote_ptr<void>((uintptr_t)0x00007fff7000L
remote_ptr<void>((uintptr_t)0x10007fff8000LL));
static const MemoryRange asan_allocator_reserved(remote_ptr<void>((uintptr_t)0x600000000000LL),
remote_ptr<void>((uintptr_t)0x640000002000LL));
// See https://github.com/llvm/llvm-project/commit/fb77ca05ffb4f8e666878f2f6718a9fb4d686839
// and https://github.com/llvm/llvm-project/blob/main/compiler-rt/lib/asan/asan_allocator.h
static const MemoryRange asan_allocator_reserved2(remote_ptr<void>((uintptr_t)0x500000000000LL),
remote_ptr<void>((uintptr_t)0x540000000000LL));

// See https://github.com/llvm/llvm-project/blob/main/compiler-rt/lib/tsan/rtl/tsan_platform_posix.cpp
static const MemoryRange tsan_shadow(remote_ptr<void>((uintptr_t)0x008000000000LL),
Expand Down Expand Up @@ -2287,6 +2291,7 @@ struct ExeInfo {
}
sanitizer_exclude_memory_ranges.push_back(asan_shadow);
sanitizer_exclude_memory_ranges.push_back(asan_allocator_reserved);
sanitizer_exclude_memory_ranges.push_back(asan_allocator_reserved2);
}
void setup_tsan_memory_ranges() {
if (!check_sanitizer_arch()) {
Expand Down

0 comments on commit f623b7e

Please sign in to comment.