review request (S): 7090976 Eclipse/CDT causes a JVM crash while indexing C++ code
roland.westrelin at oracle.com
Mon Jan 30 09:08:58 PST 2012
The crash occurs at a getfield in a callee that is inlined at an invokeinterface. The LoadField node in the callee is replaced by a previous LoadField in the caller by local value numbering but the previous LoadField doesn't load a value of the same type. The inlining at the invokeinterface is done with an extra checkcast because the inlining code optimistically assumes the receiver is of some particular class. The LoadField in the callee uses the receiver which can be erroneous because we are not sure the receiver is of the class that was used to perform the inlining. See the test case for the interface hierarchy needed for this to happen. The extra check on decl_interface prevents unecessary and potentially dangerous inlining. Passing the result of the checkcast as receiver is another way of preventing the problem. It's not required (the check on decl_interface is sufficient) but may help performance by improving type information in the inlinee.
More information about the hotspot-compiler-dev