Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D143438
static void *HwasanAllocate(StackTrace *stack, uptr orig_size, uptr alignment,
bool zeroise) {
+ // Keep this consistent with LSAN and ASAN behavior.
+ if (orig_size == 0)
+ orig_size = 1;
if (orig_size > kMaxAllowedMallocSize) {
if (AllocatorMayReturnNull()) {
Report("WARNING: HWAddressSanitizer failed to allocate 0x%zx bytes\n",
// RUN: %clang_lsan %s -o %t
// RUN: %env_lsan_opts=use_stacks=0 not %run %t 2>&1 | FileCheck %s
-// Fixme: remove once test passes with hwasan
-// UNSUPPORTED: hwasan
-
/// Fails when only leak sanitizer is enabled
// UNSUPPORTED: arm-linux, armhf-linux