Mercurial > hg > truffle
diff src/share/vm/opto/node.cpp @ 4778:35acf8f0a2e4
7128352: assert(obj_node == obj) failed
Summary: Compare uncasted object nodes.
Reviewed-by: never
author | kvn |
---|---|
date | Tue, 10 Jan 2012 18:05:38 -0800 |
parents | e3cbc9ddd434 |
children | 8c92982cbbc4 |
line wrap: on
line diff
--- a/src/share/vm/opto/node.cpp Sat Jan 07 13:26:43 2012 -0800 +++ b/src/share/vm/opto/node.cpp Tue Jan 10 18:05:38 2012 -0800 @@ -833,8 +833,20 @@ //---------------------------uncast_helper------------------------------------- Node* Node::uncast_helper(const Node* p) { - uint max_depth = 3; - for (uint i = 0; i < max_depth; i++) { +#ifdef ASSERT + uint depth_count = 0; + const Node* orig_p = p; +#endif + + while (true) { +#ifdef ASSERT + if (depth_count >= K) { + orig_p->dump(4); + if (p != orig_p) + p->dump(1); + } + assert(depth_count++ < K, "infinite loop in Node::uncast_helper"); +#endif if (p == NULL || p->req() != 2) { break; } else if (p->is_ConstraintCast()) {