Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8166742

SIGFPE in C2 Loop IV elimination

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 9
    • 8u102, 9
    • hotspot
    • None
    • b143
    • x86

        The replace_parallel_iv() function crashes in a specific edge case. Not sure if the crash happens on platforms other than x86, but the result of a division operation can not be represented.

        Small test case below, run with -XX:-TieredCompilation -XX:-BackgroundCompilation for reproduction.

        Contribution forthcoming shortly with proposed fix.

        public class TestImpossibleIV {

          static private void testMethod() {
            int sum = 0;
            // A unit count-down loop which has an induction variable with
            // MIN_VALUE stride.
            for (int i = 100000; i >= 0; i--) {
              sum += Integer.MIN_VALUE;
            }
          }

          public static void main(String[] args) {
            testMethod();
          }
        }

              rasbold Chuck Rasbold
              rasbold Chuck Rasbold
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: