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

remove limited recursion from stack overflow stress tests

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 23
    • hotspot

      Some of the runtime/stack/Stack0*.java tests make assumptions about how/when the code is executed and the relative frames sizes of interpreter and JIT compiled frames.

      Furthermore, consider this example:

          static void recurse(int depth) {
              if (depth > 0) {
                  recurse(depth - 1);
              }
          }

          static void test() {
              try {
                  recurse(100_000_000);
                  throw new AssertionError();
              } catch (StackOverflowError e) {
                  // OK
              }
          }

      It's possible for a JIT compiler with an advanced inliner to completely unroll the call to `recurse` from `test` since there is no side-effect for each recursive call. In this case, the test would fail.

            Unassigned Unassigned
            dnsimon Douglas Simon
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: