Re: [PATCH] Fix a couple of memory leaks in the C++ frontend

2020-01-22 Thread Jason Merrill
On 1/22/20 11:19 AM, Patrick Palka wrote: On Tue, 21 Jan 2020, Jason Merrill wrote: On 1/20/20 8:06 PM, Patrick Palka wrote: The leak in get_mapped_args is due to auto_vec not properly supporting destructible elements, in that auto_vec's destructor doesn't call the destructors of its elements.

Re: [PATCH] Fix a couple of memory leaks in the C++ frontend

2020-01-22 Thread Patrick Palka
On Tue, 21 Jan 2020, Jason Merrill wrote: On 1/20/20 8:06 PM, Patrick Palka wrote: The leak in get_mapped_args is due to auto_vec not properly supporting destructible elements, in that auto_vec's destructor doesn't call the destructors of its elements. Hmm, perhaps vec should static_assert __

Re: [PATCH] Fix a couple of memory leaks in the C++ frontend

2020-01-21 Thread Jason Merrill
On 1/20/20 8:06 PM, Patrick Palka wrote: The leak in get_mapped_args is due to auto_vec not properly supporting destructible elements, in that auto_vec's destructor doesn't call the destructors of its elements. Hmm, perhaps vec should static_assert __is_trivial(T) when supported. @@ -15344,6

[PATCH] Fix a couple of memory leaks in the C++ frontend

2020-01-20 Thread Patrick Palka
The leak in get_mapped_args is due to auto_vec not properly supporting destructible elements, in that auto_vec's destructor doesn't call the destructors of its elements. Successfully bootstrapped and regtested on x86_64-pc-linux-gnu, OK to commit? gcc/cp/ChangeLog: * constraint.cc (get_m