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: Fix PR 56077


On 05.04.2013 14:10, Olivier Hainque wrote:
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.

I'd say for 4.6 the best way is to revert. PR 56077 is not that important, and this 4.6 release will be the last one. For 4.7, we can additionally backport Maxim's patch or revert this one. I'm fine with both options, but I'll test 4.7 backport too just to be ready for that.

Andrey


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