mirror of
https://github.com/google/sandboxed-api.git
synced 2024-03-22 13:11:30 +08:00
asan uses mmap() internally, so allow mmap() calls in asan builds
PiperOrigin-RevId: 358802336 Change-Id: I26fa891cc9fffcfd32f6b18a63b39d6f2282ff7d
This commit is contained in:
parent
298271f0a7
commit
508c7066a6
|
@ -205,6 +205,10 @@ PolicyBuilder& PolicyBuilder::AllowLlvmSanitizers() {
|
||||||
}
|
}
|
||||||
if constexpr (sapi::sanitizers::IsASan()) {
|
if constexpr (sapi::sanitizers::IsASan()) {
|
||||||
AllowSyscall(__NR_sigaltstack);
|
AllowSyscall(__NR_sigaltstack);
|
||||||
|
// asan uses a custom allocator that runs mmap under the hood. For example:
|
||||||
|
// https://github.com/llvm/llvm-project/blob/596d534ac3524052df210be8d3c01a33b2260a42/compiler-rt/lib/asan/asan_allocator.cpp#L980
|
||||||
|
// https://github.com/llvm/llvm-project/blob/62ec4ac90738a5f2d209ed28c822223e58aaaeb7/compiler-rt/lib/sanitizer_common/sanitizer_allocator_secondary.h#L98
|
||||||
|
AllowMmap();
|
||||||
}
|
}
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user