In some very specially-crafted cases, we could attempt to visit a node
that has already been visited, and then run out of bb's to visit, while
there were still cross blocks on the list. Make sure that those get
moved over in that case.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96274
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Cc: mesa-stable@lists.freedesktop.org
bb.push(node);
- while (bb.getSize()) {
+ while (bb.getSize() || cross.getSize()) {
+ if (bb.getSize() == 0)
+ cross.moveTo(bb);
+
node = reinterpret_cast<Graph::Node *>(bb.pop().u.p);
assert(node);
if (!node->visit(sequence))
}
}
nodes[count++] = node;
-
- if (bb.getSize() == 0)
- cross.moveTo(bb);
}
}