summaryrefslogtreecommitdiff
path: root/lib/scudo/standalone
diff options
context:
space:
mode:
authorKostya Kortchinsky <kostyak@google.com>2019-07-03 14:38:47 +0000
committerKostya Kortchinsky <kostyak@google.com>2019-07-03 14:38:47 +0000
commit38de5907b43ad21c12f270451b11af0fe15c3c21 (patch)
treefc409d8f768f36d6b19208a98171c01de9a713ad /lib/scudo/standalone
parent3ccbf229e8c9c786074b710a156c277256820f4c (diff)
downloadcompiler-rt-38de5907b43ad21c12f270451b11af0fe15c3c21.tar.gz
[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 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@365045 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/scudo/standalone')
-rw-r--r--lib/scudo/standalone/tests/CMakeLists.txt2
-rw-r--r--lib/scudo/standalone/tests/wrappers_cpp_test.cc3
2 files changed, 4 insertions, 1 deletions
diff --git a/lib/scudo/standalone/tests/CMakeLists.txt b/lib/scudo/standalone/tests/CMakeLists.txt
index f0c259a90..8a3c4cde0 100644
--- a/lib/scudo/standalone/tests/CMakeLists.txt
+++ b/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/lib/scudo/standalone/tests/wrappers_cpp_test.cc b/lib/scudo/standalone/tests/wrappers_cpp_test.cc
index 8d5842a25..766c13fd6 100644
--- a/lib/scudo/standalone/tests/wrappers_cpp_test.cc
+++ b/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.