This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [jit] Fix state issue in gcse.c
- From: Steven Bosscher <stevenb dot gcc at gmail dot com>
- To: David Malcolm <dmalcolm at redhat dot com>
- Cc: jit at gcc dot gnu dot org, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 19 Apr 2014 15:24:36 +0200
- Subject: Re: [jit] Fix state issue in gcse.c
- Authentication-results: sourceware.org; auth=none
- References: <1394564403-6617-1-git-send-email-dmalcolm at redhat dot com>
On Tue, Mar 11, 2014 at 8:00 PM, David Malcolm wrote:
> Investigation revealed the issue to be a CFG from the previous compile
> being kept alive by this GC root in gcse.c:
> static GTY(()) rtx test_insn;
>
> This wouldn't it itself be an issue, but one (or more) of the edges had:
But this is an issue! This is not supposed to be possible.
test_insn is not in the insns chain and also not in a basic block, so
it should never keep a CFG alive.
Your patch papers over a bigger issue: How does test_insn end up
preventing the CFG from being garbage-collected.
Ciao!
Steven