Current check in Node::uncast_helper checks for "infinite loop", but really checks for the depth of 1024 nodes when searching through the graph:
assert(depth_count++ < K, "infinite loop in Node::uncast_helper");
I suppose it is plausible to have a legit chain of 1K nodes with very deep inlining and/or optimization, which is _not_ an infinite loop. (This might be the cause for some CTW failures in deeper stress modes, checking it now.)
Given how we basically walk through in(1), I think we can check against the number of nodes we have. If we walk more nodes than we have, that would mean we visited some node twice, which necessarily means there is a infinite loop in this walk. This makes the check more robust.
assert(depth_count++ < K, "infinite loop in Node::uncast_helper");
I suppose it is plausible to have a legit chain of 1K nodes with very deep inlining and/or optimization, which is _not_ an infinite loop. (This might be the cause for some CTW failures in deeper stress modes, checking it now.)
Given how we basically walk through in(1), I think we can check against the number of nodes we have. If we walk more nodes than we have, that would mean we visited some node twice, which necessarily means there is a infinite loop in this walk. This makes the check more robust.
- blocks
-
JDK-8371959 [REDO] Add CTW to hotspot_compiler testing
-
- Open
-
- links to
-
Commit(master)
openjdk/jdk/4f283f18
-
Review(master)
openjdk/jdk/28861