This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Call symbol_summary<>::release instead of ~symbol_summary (PR, ipa/79285).


Hello.

Calling twice ~symbol_summary (once from ipa_free_all_node_params, second time from ggc free page) causes
double calling ~hash_map, which triggers the valgrind issue. Proper fix is to call ::release from
ipa_free_all_node_params.

Patch can bootstrap on ppc64le-redhat-linux and survives regression tests.

Ready to be installed?
Martin
>From ac5b1e90271a83139cbb71486ddf67e0a05df9cc Mon Sep 17 00:00:00 2001
From: marxin <mliska@suse.cz>
Date: Tue, 31 Jan 2017 06:31:29 +0100
Subject: [PATCH] Call symbol_summary<>::release instead of ~symbol_summary (PR
 ipa/79285).

gcc/ChangeLog:

2017-01-31  Martin Liska  <mliska@suse.cz>

	PR ipa/79285
	* ipa-prop.c (ipa_free_all_node_params): Call release method
	instead of ~sumbol_summary to not to trigger double times
	dtor of hash_map.
---
 gcc/ipa-prop.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c
index 834c27d100e..3ef3d4fae9e 100644
--- a/gcc/ipa-prop.c
+++ b/gcc/ipa-prop.c
@@ -3574,7 +3574,7 @@ ipa_free_all_edge_args (void)
 void
 ipa_free_all_node_params (void)
 {
-  ipa_node_params_sum->~ipa_node_params_t ();
+  ipa_node_params_sum->release ();
   ipa_node_params_sum = NULL;
 }
 
-- 
2.11.0


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]