[HWASAN] Modify HwasanAllocate to set the size to 1 if requested size is 0
authorKirill Stoimenov <kstoimenov@google.com>
Mon, 6 Feb 2023 23:53:48 +0000 (23:53 +0000)
committerKirill Stoimenov <kstoimenov@google.com>
Tue, 7 Feb 2023 00:01:20 +0000 (00:01 +0000)
commitc6ea5b0cd1728a044a4c5b3c8f1bf35e1d8d2847
treef4133ceae53c31f2c54e01d93a01e306ee08056d
parent914f86949ae497953249fef8278d6eda8f5fae0d
[HWASAN] Modify HwasanAllocate to set the size to 1 if requested size is 0

This should keep it consistent with LSAN and ASAN,

Reviewed By: vitalybuka, MaskRay

Differential Revision: https://reviews.llvm.org/D143438
compiler-rt/lib/hwasan/hwasan_allocator.cpp