On Apr 5, 2013, at 10:13 , Eric Botcazou <ebotcazou@adacore.com> wrote:
We do have regressions on the 4.7 branch in the scheduler (CCed Olivier who
has more information).
Right: we do see a SEGV while compiling the attached monitor.i (preprocessed
output from a qemu tree) with -O2 -g.
./cc1 -m32 -O2 -g -quiet monitor.i
.../monitor.c: In function âmemory_dumpâ:
.../monitor.c:1109:1: internal compiler error: Segmentation fault
As already mentioned upthread, this is triggered by a call to
flush_pending_lists with a DEBUG_INSN. We get into:
if (for_write)
{
add_dependence_list_and_free (deps, insn, &deps->pending_read_insns,
1, REG_DEP_ANTI);
if (!deps->readonly)
{
free_EXPR_LIST_list (&deps->pending_read_mems);
deps->pending_read_list_length = 0;
}
}
add_dependence_list_and_free doesn't free *LISTP when
operating on DEBUG_INSNs, so we end up with pending_read_mems freed together
with pending_read_insns not freed.
This was cured on mainline by:
Author: mkuvyrkov
Date: Mon Aug 27 22:11:48 2012 +0000
* sched-deps.c (add_dependence_list_and_free): Simplify.
(flush_pending_list_and_free): Fix a hack that was fixing a hack. Free
lists when add_dependence_list_and_free doesn't free them.
(svn+ssh://gcc.gnu.org/svn/gcc/trunk@190733)
http://gcc.gnu.org/ml/gcc-patches/2012-08/msg01625.html
I don't know whether backporting this would be better than reverting
the offending change as just done on 4.7.