Re: [libcxx] r271459 - Remove enable_shared_from_this test since it leaks the control block and fails with ASAN

2016-06-01 Thread Eric Fiselier via cfe-commits
Fixed in r271487. On Wed, Jun 1, 2016 at 10:56 PM, Eric Fiselier wrote: > Nevermind my last comment. It's just a bug in my implementation. Thanks > again for catching it. > > On Wed, Jun 1, 2016 at 10:40 PM, Eric Fiselier wrote: > >> Oh goodness your right. There

Re: [libcxx] r271459 - Remove enable_shared_from_this test since it leaks the control block and fails with ASAN

2016-06-01 Thread Eric Fiselier via cfe-commits
Nevermind my last comment. It's just a bug in my implementation. Thanks again for catching it. On Wed, Jun 1, 2016 at 10:40 PM, Eric Fiselier wrote: > Oh goodness your right. There are a bunch of bugs in the shared_ptr > constructors/destructors use both the specified deleters and

Re: [libcxx] r271459 - Remove enable_shared_from_this test since it leaks the control block and fails with ASAN

2016-06-01 Thread Eric Fiselier via cfe-commits
Oh goodness your right. There are a bunch of bugs in the shared_ptr constructors/destructors use both the specified deleters and allocators. Thanks for pointing out my stupidity! On Wed, Jun 1, 2016 at 10:25 PM, Arthur O'Dwyer wrote: > On Wed, Jun 1, 2016 at 7:00 PM,

Re: [libcxx] r271459 - Remove enable_shared_from_this test since it leaks the control block and fails with ASAN

2016-06-01 Thread Arthur O'Dwyer via cfe-commits
On Wed, Jun 1, 2016 at 7:00 PM, Eric Fiselier wrote: > No the leak was my fault. The sneaky line was "std::shared_ptr s(ptr, > );", which caused the allocation of a shared control block. > But surely the control block is allocated and deallocated by libc++ behind the scenes,

Re: [libcxx] r271459 - Remove enable_shared_from_this test since it leaks the control block and fails with ASAN

2016-06-01 Thread Eric Fiselier via cfe-commits
No the leak was my fault. The sneaky line was "std::shared_ptr s(ptr, );", which caused the allocation of a shared control block. Since the deleter is a NOP it gets leaked and ASAN reports it. I'm going to follow up with a better test that ASAN doesn't complain about. On Wed, Jun 1, 2016 at 7:49

Re: [libcxx] r271459 - Remove enable_shared_from_this test since it leaks the control block and fails with ASAN

2016-06-01 Thread Arthur O'Dwyer via cfe-commits
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"

[libcxx] r271459 - Remove enable_shared_from_this test since it leaks the control block and fails with ASAN

2016-06-01 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Wed Jun 1 20:09:12 2016 New Revision: 271459 URL: http://llvm.org/viewvc/llvm-project?rev=271459=rev Log: Remove enable_shared_from_this test since it leaks the control block and fails with ASAN Modified: