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

SIGFPE in C2 Loop IV elimination

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 8u102, 9
    • Fix Version/s: 9
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b143
    • CPU:
      x86

      Backports

        Description

        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();
          }
        }

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved: