RFR(M) 8068881: SIGBUS in C2 compiled method weblogic.wsee.jaxws.framework.jaxrpc.EnvironmentFactory$SimulatedWsdlDefinitions.<init>

Igor Veresov igor.veresov at oracle.com
Sun Jan 18 20:25:25 UTC 2015

After register allocation we may end up with nodes in the same block using different inputs that are in fact a part of a multidef lrg. Since that would confuse the scheduler, the post-allocation copy removal attempts to select a one of the inputs and replace all the uses that refer to the same value within the block. That works most of the time except when we try to replace an input coming from a phi that has the only user. In that case the phi goes dead along with the spill copy that merges the values, which produces incorrect code. Unfortunately there is no way to make a proper selection of a reaching def - the easiest counter example is having to select from two phis.

The solution to the problem is to introduce a node that acts like a phi but is without control (or rather something like MergeMem) that would merge the defs (that are really the same value and are a part of a multidef lrg). The following change adds a new node (MachMerge) and a pass after the post-allocation copy removal to insert them when needed. Even though it’s a separate pass it’s a very fast linear traversal.

Webrev: http://cr.openjdk.java.net/~iveresov/8068881/webrev.01/  

Tested with the failing method in weblogic, jprt, CTW 


More information about the hotspot-compiler-dev mailing list