From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26396 invoked by alias); 12 Apr 2013 08:45:49 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 26360 invoked by uid 55); 12 Apr 2013 08:45:46 -0000 From: "rguenther at suse dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/56921] [4.9 Regression] ICE in rtx_cost called by doloop_optimize_loops for PPC Date: Fri, 12 Apr 2013 08:45:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenther at suse dot de X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.9.0 X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 X-SW-Source: 2013-04/txt/msg01052.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56921 --- Comment #9 from rguenther at suse dot de 2013-04-12 08:45:46 UTC --- On Fri, 12 Apr 2013, steven at gcc dot gnu.org wrote: > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56921 > > --- Comment #8 from Steven Bosscher 2013-04-12 08:36:04 UTC --- > (In reply to comment #7) > > niter_desc is not marked GTY(()) but is cached from struct loop aux field. > > niter_desc uses heap memory but points to GC memory. Thus, caching of this > > across passes is not safe. > > I suppose passes are missing free_simple_loop_desc, loop-doloop.c calls > > get_simple_loop_desc but never free_simple_loop_desc for example (which > > then at least leaks the niter_desc memory). > > Another, IMHO better, solution would be to not use loop->aux but make > a GC-safe vec indexed by loop->num. Maybe add checking in the loop > verifier that no struct niter_desc is left pending if its parent loop > is removed. > > That should make the loop passes GC safe. > > Then mark all "aux" fields as GC unsafe and document that every pass is > responsible for cleaning up after itself. Yes, definitely. I was bit once by this ->aux usage which is not really obvious. Richard.