diff mbox

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

Message ID ee5a67a1-e5fc-6f62-e858-fff41ba4b32f@suse.cz
State New
Headers show

Commit Message

Martin Liška Jan. 31, 2017, 8:34 a.m. UTC
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

Comments

Richard Biener Jan. 31, 2017, 9:31 a.m. UTC | #1
On Tue, Jan 31, 2017 at 9:34 AM, Martin Liška <mliska@suse.cz> wrote:
> 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?

Ok.

Richard.

> Martin
diff mbox

Patch

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