[PATCH] D34331: func.wrap.func.con: Unset function before destroying anything

Alex Lorenz via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 9 03:46:02 PDT 2017


arphaman added a comment.

The tests actually do compile in C++03, but they still fail because of infinite recursion:

  frame #196562: 0x000000010000155c nullptr_t_assign_reentrant.pass.cpp.exe`A::~A() + 92
  frame #196563: 0x0000000100001405 nullptr_t_assign_reentrant.pass.cpp.exe`std::__1::__compressed_pair_elem<A, 0, true>::~__compressed_pair_elem() + 21
  frame #196564: 0x0000000100002685 nullptr_t_assign_reentrant.pass.cpp.exe`std::__1::__compressed_pair<A, std::__1::allocator<A> >::~__compressed_pair() + 21
  frame #196565: 0x0000000100002665 nullptr_t_assign_reentrant.pass.cpp.exe`std::__1::__compressed_pair<A, std::__1::allocator<A> >::~__compressed_pair() + 21
  frame #196566: 0x0000000100002389 nullptr_t_assign_reentrant.pass.cpp.exe`std::__1::__function::__func<A, std::__1::allocator<A>, void ()>::destroy() + 25
  frame #196567: 0x00000001000014b9 nullptr_t_assign_reentrant.pass.cpp.exe`std::__1::function<void ()>::operator=(std::__1::nullptr_t) + 57
  frame #196568: 0x000000010000155c nullptr_t_assign_reentrant.pass.cpp.exe`A::~A() + 92

Looks like prior to C++11 some different destruction behaviour is triggered which isn't fixed by this patch. So the tests should be either guarded by `UNSUPPORTED/XFAIL` or the patch should support C++03.


https://reviews.llvm.org/D34331





More information about the cfe-commits mailing list