This is the mail archive of the gcc-bugs@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: edge vector corruption


Jan Hubicka wrote:

If edge vectors can be reallocated in such loops, then the iterators need
redesigning.

It always has been possible to do so easilly, so I would guess we do it from time to time.
Though not an edge expert, I am inclined to agree.  This case was buried
several levels in.

In edge forwarding it is quite important for time complexity (ie we need
to walk all edges together with possibly elliminating them in linear
time).  This is why it used
  for (e = b->succ; e; e = next)
...
        next = e->succ_next;
other places that are mine will use same paradigm, so it is easy to grep
for "next = e".

or a for (ix = 0; EDGE_ITERATE (b->succ, ix, e); ix++) {...} I proposed -- but y'all are fed up with me going on about that :)

nathan

--
Nathan Sidwell    ::   http://www.codesourcery.com   ::     CodeSourcery LLC
nathan@codesourcery.com    ::     http://www.planetfall.pwp.blueyonder.co.uk



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