mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-26 09:16:08 +00:00
[HWASAN] Add unlikely to if in HwasanAllocate.
This commit is contained in:
parent
01176191d2
commit
e403fd8705
@ -165,7 +165,7 @@ static void *HwasanAllocate(StackTrace *stack, uptr orig_size, uptr alignment,
|
||||
// Keep this consistent with LSAN and ASAN behavior.
|
||||
if (UNLIKELY(orig_size == 0))
|
||||
orig_size = 1;
|
||||
if (orig_size > kMaxAllowedMallocSize) {
|
||||
if (UNLIKELY(orig_size > kMaxAllowedMallocSize)) {
|
||||
if (AllocatorMayReturnNull()) {
|
||||
Report("WARNING: HWAddressSanitizer failed to allocate 0x%zx bytes\n",
|
||||
orig_size);
|
||||
|
Loading…
x
Reference in New Issue
Block a user