diff --git a/compiler-rt/test/hwasan/TestCases/malloc-test.c b/compiler-rt/test/hwasan/TestCases/malloc-test.c --- a/compiler-rt/test/hwasan/TestCases/malloc-test.c +++ b/compiler-rt/test/hwasan/TestCases/malloc-test.c @@ -11,6 +11,6 @@ __hwasan_enable_allocator_tagging(); char *a1 = (char*)malloc(0); assert(a1 != 0); - assert(__sanitizer_get_allocated_size(a1) == 0); + assert(__sanitizer_get_allocated_size(a1) == 1); free(a1); } diff --git a/compiler-rt/test/hwasan/TestCases/new-test.cpp b/compiler-rt/test/hwasan/TestCases/new-test.cpp --- a/compiler-rt/test/hwasan/TestCases/new-test.cpp +++ b/compiler-rt/test/hwasan/TestCases/new-test.cpp @@ -15,7 +15,7 @@ size_t volatile n = 0; char *a1 = new char[n]; assert(a1 != nullptr); - assert(__sanitizer_get_allocated_size(a1) == 0); + assert(__sanitizer_get_allocated_size(a1) == 1); delete[] a1; #if defined(__cpp_aligned_new) && \