RFR(S): 8190375: Java Crash in JavaBug.formatPos(I)Ljava/lang/String
Roland Westrelin
rwestrel at redhat.com
Wed Nov 8 15:05:50 UTC 2017
http://cr.openjdk.java.net/~roland/8190375/webrev.00/
Bounds of a counted loop iv can't be reliably determined from the
init/limit bounds if the exit condition is "not
equal". TestCountedLoopBadIVRange.test1() is an example of that. On
first execution of the inner loop the loop runs from j = 0 to j = 4 but
on second execution, j = 10 on entry so exit condition j != 5 never
triggers and the test in the loop is the one that exits the
loop. Current logic sets j to be in [0, 10[ which is incorrect.
The fix simply skips the logic that set the value of the Phi iv if the
exit condition is "not equal". If init < limit for instance, the existing logic
is correct but in that case, when the counted loop is created, the exit
test is changed to a greater or less than test.
Roland.
More information about the hotspot-compiler-dev
mailing list