This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/23408] [4.1 Regression] ICE in cgraph_decide_inlining_incrementally (using freed GC memory)
- From: "e9925248 at stud4 dot tuwien dot ac dot at" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Aug 2005 21:20:22 -0000
- Subject: [Bug middle-end/23408] [4.1 Regression] ICE in cgraph_decide_inlining_incrementally (using freed GC memory)
- References: <20050815213014.23408.e9925248@stud4.tuwien.ac.at>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From e9925248 at stud4 dot tuwien dot ac dot at 2005-08-16 21:20 -------
I think, I found the cause of this:
cgraph_early_inlining holds a list of cgraph nodes in the array order.
In this example, cgraph_decide_inlining_incrementally removes all references
known by the garbage collector to a node contained in this array, which has not
been processed. Then it calls the ggc_collect. With checking enabled, the freed
memory is overwritten so that the following access cause a segementation fault.
If the call to the garbage collector in cgraph_decide_inlining_incrementally is
removed, the file compiles:
Index: ipa-inline.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ipa-inline.c,v
retrieving revision 2.15
diff -u -p -r2.15 ipa-inline.c
--- ipa-inline.c 28 Jul 2005 21:45:25 -0000 2.15
+++ ipa-inline.c 16 Aug 2005 21:18:18 -0000
@@ -1073,7 +1073,6 @@ cgraph_decide_inlining_incrementally (st
node->local.self_insns = node->global.insns;
current_function_decl = NULL;
pop_cfun ();
- ggc_collect ();
}
return inlined;
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23408