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



Richard Biener <rguenth at gcc dot gnu.org> changed:



           What    |Removed                     |Added

----------------------------------------------------------------------------

                 CC|                            |dnovillo at gcc dot gnu.org



--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> 2013-01-07 
16:01:52 UTC ---

Eh.  Diego, how does GTY((user)) work here?  It smells like a bug in vec.h

to me.



/* Garbage collection support for vec<T, A, vl_embed>.  */



template<typename T>

void

gt_ggc_mx (vec<T, va_gc> *v)

{

  extern void gt_ggc_mx (T &);

  for (unsigned i = 0; i < v->length (); i++)

    gt_ggc_mx ((*v)[i]);

}



doesn't it need to mark the vec itself?  Maybe automatic registration of

roots (this is a GC root) does not work with GTY((user))?



As far as I understand HJ the vec struct itself is GCed but the global

var pointing to it (the root) is not zeroed (I say it shouldn't be collected

at all).

Reply via email to