diff options
| author | Kostya Kortchinsky <kostyak@google.com> | 2019-07-03 14:38:47 +0000 |
|---|---|---|
| committer | Kostya Kortchinsky <kostyak@google.com> | 2019-07-03 14:38:47 +0000 |
| commit | d63d14f76b9aabd6af33e8f5a6ed2386c5f88ec7 (patch) | |
| tree | 315c4527aad54c798580998b9ccea5b15887c1ed /compiler-rt/lib/scudo | |
| parent | 868d0b7fd99c3db010a9977571d91574e6295500 (diff) | |
| download | bcm5719-llvm-d63d14f76b9aabd6af33e8f5a6ed2386c5f88ec7.tar.gz bcm5719-llvm-d63d14f76b9aabd6af33e8f5a6ed2386c5f88ec7.zip | |
[scudo][standalone] Potential fix for missing sized delete
Summary:
In some setups, using `-fsized-deallocation` would end up not finding
a sized delete operator at link time. For now, avoid using the flag
and declare the sized delete operator in the cpp test only.
This is a tentative fix as I do not have the failing setup.
Reviewers: rnk, morehouse, hctim, eugenis, vitalybuka
Reviewed By: rnk, hctim
Subscribers: mgorny, delcypher, #sanitizers, llvm-commits
Tags: #llvm, #sanitizers
Differential Revision: https://reviews.llvm.org/D64086
llvm-svn: 365045
Diffstat (limited to 'compiler-rt/lib/scudo')
| -rw-r--r-- | compiler-rt/lib/scudo/standalone/tests/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | compiler-rt/lib/scudo/standalone/tests/wrappers_cpp_test.cc | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/compiler-rt/lib/scudo/standalone/tests/CMakeLists.txt b/compiler-rt/lib/scudo/standalone/tests/CMakeLists.txt index f0c259a907d..8a3c4cde047 100644 --- a/compiler-rt/lib/scudo/standalone/tests/CMakeLists.txt +++ b/compiler-rt/lib/scudo/standalone/tests/CMakeLists.txt @@ -12,7 +12,7 @@ set(SCUDO_UNITTEST_CFLAGS -I${COMPILER_RT_SOURCE_DIR}/lib/scudo/standalone -DGTEST_HAS_RTTI=0 # Extra flags for the C++ tests - -fsized-deallocation + # TODO(kostyak): find a way to make -fsized-deallocation work -Wno-mismatched-new-delete) set(SCUDO_TEST_ARCH ${SCUDO_STANDALONE_SUPPORTED_ARCH}) diff --git a/compiler-rt/lib/scudo/standalone/tests/wrappers_cpp_test.cc b/compiler-rt/lib/scudo/standalone/tests/wrappers_cpp_test.cc index 8d5842a25ef..766c13fd6ac 100644 --- a/compiler-rt/lib/scudo/standalone/tests/wrappers_cpp_test.cc +++ b/compiler-rt/lib/scudo/standalone/tests/wrappers_cpp_test.cc @@ -12,6 +12,9 @@ #include <mutex> #include <thread> +void operator delete(void *, size_t) noexcept; +void operator delete[](void *, size_t) noexcept; + // Note that every Cxx allocation function in the test binary will be fulfilled // by Scudo. See the comment in the C counterpart of this file. |

