[Bug ipa/118400] [14 Regression] memory leak of irange at evaluate_properties_for_edge (ipa-fnsummary.cc:690) since r14-2121
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118400 Jakub Jelinek changed: What|Removed |Added Resolution|--- |FIXED Status|NEW |RESOLVED Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org --- Comment #12 from Jakub Jelinek --- Fixed for 14.3 too.
[Bug ipa/118400] [14 Regression] memory leak of irange at evaluate_properties_for_edge (ipa-fnsummary.cc:690) since r14-2121
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118400 --- Comment #11 from GCC Commits --- The releases/gcc-14 branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:0faffd526d5dbed4960ef0aadc4ba96f9bf377de commit r14-11284-g0faffd526d5dbed4960ef0aadc4ba96f9bf377de Author: Jakub Jelinek Date: Thu Jan 16 09:17:50 2025 +0100 vec.h: Properly destruct elements in auto_vec auto storage [PR118400] For T with non-trivial destructors, we were destructing objects in the vector on release only when not using auto storage of auto_vec. The following patch calls truncate (0) instead of m_vecpfx.m_num clearing, and truncate takes care of that destruction: unsigned l = length (); gcc_checking_assert (l >= size); if (!std::is_trivially_destructible ::value) vec_destruct (address () + size, l - size); m_vecpfx.m_num = size; 2025-01-16 Jakub Jelinek PR ipa/118400 * vec.h (vec::release): Call m_vec->truncate (0) instead of clearing m_vec->m_vecpfx.m_num. (cherry picked from commit 43f4d44bebd63b354f8798fcef512d4d2b42c655)
[Bug ipa/118400] [14 Regression] memory leak of irange at evaluate_properties_for_edge (ipa-fnsummary.cc:690) since r14-2121
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118400 --- Comment #10 from Jakub Jelinek --- Please ignore the above comment, that was meant for a different PR. This surely should be backported to 14.
[Bug ipa/118400] [14 Regression] memory leak of irange at evaluate_properties_for_edge (ipa-fnsummary.cc:690) since r14-2121
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118400 Jakub Jelinek changed: What|Removed |Added Summary|[14/15 Regression] memory |[14 Regression] memory leak |leak of irange at |of irange at |evaluate_properties_for_edg |evaluate_properties_for_edg |e (ipa-fnsummary.cc:690)|e (ipa-fnsummary.cc:690) |since r14-2121 |since r14-2121 --- Comment #9 from Jakub Jelinek --- Fixed on the trunk. Not sure about the backport, it is less important in 14 because there is no musttail and the patch is a new optimization which can e.g. introduce tail calls where they weren't before.