diff --git a/compiler-rt/lib/hwasan/hwasan_allocator.cpp b/compiler-rt/lib/hwasan/hwasan_allocator.cpp --- a/compiler-rt/lib/hwasan/hwasan_allocator.cpp +++ b/compiler-rt/lib/hwasan/hwasan_allocator.cpp @@ -265,7 +265,7 @@ : __lsan::kDirectlyLeaked); #endif meta->SetAllocated(StackDepotPut(*stack), orig_size); - RunMallocHooks(user_ptr, size); + RunMallocHooks(user_ptr, orig_size); return user_ptr; } diff --git a/compiler-rt/test/sanitizer_common/TestCases/malloc_hook.cpp b/compiler-rt/test/sanitizer_common/TestCases/malloc_hook.cpp --- a/compiler-rt/test/sanitizer_common/TestCases/malloc_hook.cpp +++ b/compiler-rt/test/sanitizer_common/TestCases/malloc_hook.cpp @@ -6,9 +6,6 @@ // Must not be implemented, no other reason to install interceptors. // XFAIL: ubsan -// FIXME: Implement. -// XFAIL: hwasan - #include #include #include diff --git a/compiler-rt/test/sanitizer_common/TestCases/malloc_hook_get_allocated_size_fast.cpp b/compiler-rt/test/sanitizer_common/TestCases/malloc_hook_get_allocated_size_fast.cpp --- a/compiler-rt/test/sanitizer_common/TestCases/malloc_hook_get_allocated_size_fast.cpp +++ b/compiler-rt/test/sanitizer_common/TestCases/malloc_hook_get_allocated_size_fast.cpp @@ -6,9 +6,6 @@ // Must not be implemented, no other reason to install interceptors. // XFAIL: ubsan -// FIXME: Implement. -// XFAIL: hwasan - #include #include #include