Request for reviews (S): 7041100: The load in String.equals intrinsic executed before null check
Vladimir Kozlov
vladimir.kozlov at oracle.com
Mon May 2 10:24:28 PDT 2011
http://cr.openjdk.java.net/~kvn/7041100/webrev
Fixed 7041100: The load in String.equals intrinsic executed before null check
String.equals intrinsic has (rec == arg) check followed by NULL check generated
by gen_instanceof() when there was no NULL check before. If compiled method also
has (rec == arg) check followed by explicit NULL check of argument then a load
from argument could be scheduled before NULL check because of 6831314 bug.
Generate explicit check (uncast(argument) == null) in String.equals intrinsic
until 6831314 is fixed. We have to uncast not-nullness otherwise the check will
fold immediately and it is needed until after CCP phase.
More information about the hotspot-compiler-dev
mailing list