[hwasan] do not check if freed pointer belonged to allocator.
authorFlorian Mayer <fmayer@google.com>
Mon, 23 Aug 2021 13:03:16 +0000 (14:03 +0100)
committerFlorian Mayer <fmayer@google.com>
Wed, 25 Aug 2021 08:31:01 +0000 (09:31 +0100)
commit023f18bbaf67ee7255309fac102ec6e2dc876961
treef98486307a9fc066988992bed1b0afda974ebb29
parent4b4bc1ea16dec58e828ec3a0154046b10ec69242
[hwasan] do not check if freed pointer belonged to allocator.

In that case it is very likely that there will be a tag mismatch anyway.

We handle the case that the pointer belongs to neither of the allocators
by getting a nullptr from allocator.GetBlockBegin.

Reviewed By: hctim, eugenis

Differential Revision: https://reviews.llvm.org/D108383
compiler-rt/lib/hwasan/hwasan_allocator.cpp
compiler-rt/lib/hwasan/hwasan_linux.cpp
compiler-rt/test/hwasan/TestCases/wild-free-realloc.c
compiler-rt/test/hwasan/TestCases/wild-free.c