http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56921



--- Comment #8 from Steven Bosscher <steven at gcc dot gnu.org> 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.

Reply via email to