[libcxx] r271459 - Remove enable_shared_from_this test since it leaks the control block and fails with ASAN
Arthur O'Dwyer via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 1 18:49:03 PDT 2016
I don't get it. If this code doesn't pass ASAN, or if it leaks anything,
doesn't that indicate a bug in the library implementation of C++1z
shared_ptr? I can't find where this code does anything sneaky that a
sanitizer ought to care about...
On Jun 1, 2016 6:15 PM, "Eric Fiselier via cfe-commits" <
cfe-commits at lists.llvm.org> wrote:
> 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
> {
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160601/fe3e94e0/attachment-0001.html>
More information about the cfe-commits
mailing list