Re: Fix hashtable memory leak

2018-11-28 Thread Jonathan Wakely
On 28/11/18 07:36 +0100, François Dumont wrote: On 11/27/18 11:00 PM, Jonathan Wakely wrote: On 27/11/18 22:31 +0100, François Dumont wrote: I eventually called the new method _M_assign_elements. Perfect. And yes, tracker_allocator was enough. Great. Committed on trunk for the moment.

Re: Fix hashtable memory leak

2018-11-27 Thread François Dumont
On 11/27/18 11:00 PM, Jonathan Wakely wrote: On 27/11/18 22:31 +0100, François Dumont wrote: I eventually called the new method _M_assign_elements. Perfect. And yes, tracker_allocator was enough. Great. Committed on trunk for the moment. Great, thanks. Please note that GCC 7.4 RC1 is

Re: Fix hashtable memory leak

2018-11-27 Thread Jonathan Wakely
On 27/11/18 22:31 +0100, François Dumont wrote: I eventually called the new method _M_assign_elements. Perfect. And yes, tracker_allocator was enough. Great. Committed on trunk for the moment. Great, thanks. Please note that GCC 7.4 RC1 is scheduled for this week: https://gcc.gnu.org/m

Re: Fix hashtable memory leak

2018-11-27 Thread François Dumont
I eventually called the new method _M_assign_elements. And yes, tracker_allocator was enough. Committed on trunk for the moment. François On 11/26/18 1:12 PM, Jonathan Wakely wrote: On 24/11/18 22:58 +0100, François Dumont wrote: --- a/libstdc++-v3/testsuite/23_containers/unordered_set/allo

Re: Fix hashtable memory leak

2018-11-26 Thread Jonathan Wakely
On 26/11/18 12:03 +, Jonathan Wakely wrote: On 24/11/18 22:58 +0100, François Dumont wrote: Tests have shown a regression. I was building the _ReuseOrAllocNode instance too early, node ownership was transfered but was still owned by _Hashtable instance. This new version pass all tests.

Re: Fix hashtable memory leak

2018-11-26 Thread Jonathan Wakely
On 24/11/18 22:58 +0100, François Dumont wrote: --- a/libstdc++-v3/testsuite/23_containers/unordered_set/allocator/move_assign.cc +++ b/libstdc++-v3/testsuite/23_containers/unordered_set/allocator/move_assign.cc @@ -18,6 +18,8 @@ // { dg-do run { target c++11 } } #include +#include + #includ

Re: Fix hashtable memory leak

2018-11-26 Thread Jonathan Wakely
On 24/11/18 22:58 +0100, François Dumont wrote: Tests have shown a regression. I was building the _ReuseOrAllocNode instance too early, node ownership was transfered but was still owned by _Hashtable instance. This new version pass all tests. This is why it's worth waiting until tests have r

Re: Fix hashtable memory leak

2018-11-24 Thread François Dumont
Tests have shown a regression. I was building the _ReuseOrAllocNode instance too early, node ownership was transfered but was still owned by _Hashtable instance. This new version pass all tests. Ok to commit ? François On 11/19/18 10:23 PM, François Dumont wrote: There a memory leak when m