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]

Re: [PATCH] Properly register dead cgraph_nodes in passes.c.


On 8/9/19 6:41 AM, Martin Liška wrote:
> Hi.
> 
> The patch prevents crashes caused by fact that do_per_function_toporder
> uses get_uid () to register all dead cgraph_nodes. That does not work
> now as cgraph_nodes are directly released via ggc_free and so that one
> will see a garbage here. Second steps is to register all cgraph hooks
> and correctly hold add removed nodes. Doing that we'll not need the GGC nodes
> array.
> 
> Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
> I can also build xalancbmk with -O2 -ffast-math where I previously saw
> the ICE.
> 
> Ready to be installed?
> Thanks,
> Martin
> 
> gcc/ChangeLog:
> 
> 2019-08-09  Martin Liska  <mliska@suse.cz>
> 
> 	PR ipa/91404
> 	* passes.c (order): Remove.
> 	(uid_hash_t): Likewise).
> 	(remove_cgraph_node_from_order): Remove from set
> 	of pointers (cgraph_node *).
> 	(insert_cgraph_node_to_order): New.
> 	(duplicate_cgraph_node_to_order): New.
> 	(do_per_function_toporder): Register all 3 cgraph hooks.
> 	Skip removed_nodes now as we know about all of them.
So this turns out to fix the kernel build failure my tester was tripping
over as well.

OK for the trunk.

jeff


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