[libcxx] r271459 - Remove enable_shared_from_this test since it leaks the control block and fails with ASAN
Eric Fiselier via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 1 18:09:12 PDT 2016
Author: ericwf
Date: Wed Jun 1 20:09:12 2016
New Revision: 271459
URL: http://llvm.org/viewvc/llvm-project?rev=271459&view=rev
Log:
Remove enable_shared_from_this test since it leaks the control block and fails with ASAN
Modified:
libcxx/trunk/test/std/utilities/memory/util.smartptr/util.smartptr.enab/enable_shared_from_this.pass.cpp
Modified: libcxx/trunk/test/std/utilities/memory/util.smartptr/util.smartptr.enab/enable_shared_from_this.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/memory/util.smartptr/util.smartptr.enab/enable_shared_from_this.pass.cpp?rev=271459&r1=271458&r2=271459&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/memory/util.smartptr/util.smartptr.enab/enable_shared_from_this.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/memory/util.smartptr/util.smartptr.enab/enable_shared_from_this.pass.cpp Wed Jun 1 20:09:12 2016
@@ -88,32 +88,6 @@ int main()
}
#endif
}
- // Test LWG issue 2529 again. This time check that an expired pointer
- // is replaced.
- {
- T* ptr = new T;
- std::weak_ptr<T> weak;
- {
- std::shared_ptr<T> s(ptr, &nullDeleter);
- assert(ptr->shared_from_this() == s);
- weak = s;
- assert(!weak.expired());
- }
- assert(weak.expired());
- weak.reset();
-#ifndef TEST_HAS_NO_EXCEPTIONS
- try {
- ptr->shared_from_this();
- assert(false);
- } catch (std::bad_weak_ptr const&) {
- } catch (...) { assert(false); }
-#endif
- {
- std::shared_ptr<T> s2(ptr, &nullDeleter);
- assert(ptr->shared_from_this() == s2);
- }
- delete ptr;
- }
// Test weak_from_this_methods
#if TEST_STD_VER > 14
{
More information about the cfe-commits
mailing list