10 Commits

Author SHA1 Message Date
Leonard Chan
22b7685401 Reland "[hwasan] Add definitions for missing operator delete functions"
Looks like builders were failing for the sized variants of operator
delete. These are hidden behind the __cpp_sized_deallocation macro
which can be defined with -fsized-deallocation.
2023-02-15 23:47:01 +00:00
Leonard Chan
6313ece5ce Revert "[hwasan] Add definitions for missing operator delete functions"
This reverts commit d6ff0808618cd421d7ee82daec951956ec27a837.

This broke a bunch of builders:
http://45.33.8.238/linux/99657/step_10.txt
https://lab.llvm.org/buildbot/#/builders/247/builds/1627
2023-02-15 21:51:49 +00:00
Leonard Chan
d6ff080861 [hwasan] Add definitions for missing operator delete functions
Differential Revision: https://reviews.llvm.org/D144030
2023-02-15 19:41:04 +00:00
Kirill Stoimenov
01176191d2 [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
2023-02-07 00:35:56 +00:00
Hans Wennborg
3e6cfc631b [NFC][hwasan] Check __GLIBCXX__ before checking _GLIBCXX_RELEASE in test
_GLIBCXX_RELEASE wasn't defined before GCC 7.1.

This is another follow-up to https://reviews.llvm.org/D119161
2022-03-01 09:39:26 +01:00
Vitaly Buka
924032c592 [NFC][hwasan] Check _GLIBCXX_RELEASE in test
Differential Revision: https://reviews.llvm.org/D119161
2022-02-23 14:31:47 -08:00
Vitaly Buka
c990d56d42 [HWASan] Use hwasan_memalign for aligned new.
Aligned new does not require size to be a multiple of alignment, so
memalign is the correct choice instead of aligned_alloc.

Fixes false reports for unaligned sizes.

Reviewed By: eugenis

Differential Revision: https://reviews.llvm.org/D119161
2022-02-23 14:22:03 -08:00
Nico Weber
a908c535f9 Revert "[HWASan] Use hwasan_memalign for aligned new."
This reverts commit 4fb7c120fed504519d167c93ed9d920aeae46fb0.
Breaks tests on Linux were system gcc doesn't support C++17
(but gcc used to build LLVM does), see https://reviews.llvm.org/D119161
2022-02-12 13:57:28 -05:00
Matt Morehouse
4fb7c120fe [HWASan] Use hwasan_memalign for aligned new.
Aligned new does not require size to be a multiple of alignment, so
memalign is the correct choice instead of aligned_alloc.

Fixes false reports for unaligned sizes.

Reviewed By: eugenis

Differential Revision: https://reviews.llvm.org/D119161
2022-02-07 13:10:16 -08:00
Nico Weber
f9e0df071e compiler-rt: Rename .cc file in test/hwasan to .cpp
Like r367463, but for test/hwasan.

llvm-svn: 367849
2019-08-05 13:10:50 +00:00