[Bug ipa/118400] [14/15 Regression] memory leak of irange at evaluate_properties_for_edge (ipa-fnsummary.cc:690) since r14-2121
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Jan 14 18:50:35 GMT 2025
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118400
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
So I think we want
2025-01-14 Jakub Jelinek <jakub@redhat.com>
PR ipa/118400
* vec.h (vec<T, va_heap, vl_ptr>::release): Call vec_destruct
in the using_auto_storage () case.
--- gcc/vec.h.jj 2025-01-02 11:23:13.144563938 +0100
+++ gcc/vec.h 2025-01-14 19:44:59.105506682 +0100
@@ -2020,6 +2020,8 @@ vec<T, va_heap, vl_ptr>::release (void)
if (using_auto_storage ())
{
+ if (!std::is_trivially_destructible <T>::value)
+ vec_destruct (m_vec->address (), m_vec->length ());
m_vec->m_vecpfx.m_num = 0;
return;
}
Fixes the leak for me, will test tonight.
More information about the Gcc-bugs
mailing list