Commit 65205a11 by Jakub Jelinek Committed by Jakub Jelinek

re PR tree-optimization/82977 (AddressSanitizer: heap-use-after-free in…

re PR tree-optimization/82977 (AddressSanitizer: heap-use-after-free in strlen_optimize_stmt .././../gcc/tree-ssa-strlen.c:2971)

	PR tree-optimization/82977
	* tree-ssa-strlen.c (strlen_optimize_stmt): Pass a reference to a copy
	constructed temporary to strlen_to_stridx.put.

From-SVN: r254757
parent 9879232c
2017-11-15 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/82977
* tree-ssa-strlen.c (strlen_optimize_stmt): Pass a reference to a copy
constructed temporary to strlen_to_stridx.put.
2017-11-15 Martin Liska <mliska@suse.cz>
* configure.ac: Remove -fkeep-inline-functions from coverage_flags.
......@@ -2968,7 +2968,7 @@ strlen_optimize_stmt (gimple_stmt_iterator *gsi)
tree rhs1 = gimple_assign_rhs1 (stmt);
if (stridx_strlenloc *ps = strlen_to_stridx.get (rhs1))
strlen_to_stridx.put (lhs, *ps);
strlen_to_stridx.put (lhs, stridx_strlenloc (*ps));
}
else if (TREE_CODE (lhs) != SSA_NAME && !TREE_SIDE_EFFECTS (lhs))
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment