< prev index next >

test/hotspot/jtreg/vmTestbase/nsk/stress/stack/stack007.java

Print this page




  28  * @summary converted from VM testbase nsk/stress/stack/stack007.
  29  * VM testbase keywords: [stress, stack, nonconcurrent]
  30  * VM testbase readme:
  31  * DESCRIPTION
  32  *     This test provokes multiple stack overflows in the same thread
  33  *     by invoking synchronized virtual recursive method for the given
  34  *     fixed depth of recursion (though, for a large depth).
  35  *     This test makes measures a number of recursive invocations
  36  *     before 1st StackOverflowError, and then tries to reproduce
  37  *     such StackOverflowError 10000 times -- each time by trying to
  38  *     invoke the same recursive method for the given fixed depth
  39  *     of invocations (which is 10 times that depth just measured).
  40  *     The test is deemed passed, if VM have not crashed.
  41  * COMMENTS
  42  *     This test crashes HS versions 1.3 and 1.4 on Win32, Solaris,
  43  *     and Linux platforms in all execution modes. However, it passes
  44  *     against HS 2.0 on Win32 platform.
  45  *     See also the bug:
  46  *     4366625 (P4/S4) multiple stack overflow causes HS crash
  47  *

  48  * @run main/othervm nsk.stress.stack.stack007
  49  */
  50 
  51 package nsk.stress.stack;
  52 
  53 
  54 import java.io.PrintStream;
  55 
  56 public class stack007 implements stack007i {
  57     final static int ITERATIONS = 1000;
  58     final static int INCREMENT = 100;
  59 
  60     public static void main(String[] args) {
  61         int exitCode = run(args, System.out);
  62         System.exit(exitCode + 95);
  63     }
  64 
  65     public static int run(String args[], PrintStream out) {
  66         stack007i test = new stack007();
  67         int depth;




  28  * @summary converted from VM testbase nsk/stress/stack/stack007.
  29  * VM testbase keywords: [stress, stack, nonconcurrent]
  30  * VM testbase readme:
  31  * DESCRIPTION
  32  *     This test provokes multiple stack overflows in the same thread
  33  *     by invoking synchronized virtual recursive method for the given
  34  *     fixed depth of recursion (though, for a large depth).
  35  *     This test makes measures a number of recursive invocations
  36  *     before 1st StackOverflowError, and then tries to reproduce
  37  *     such StackOverflowError 10000 times -- each time by trying to
  38  *     invoke the same recursive method for the given fixed depth
  39  *     of invocations (which is 10 times that depth just measured).
  40  *     The test is deemed passed, if VM have not crashed.
  41  * COMMENTS
  42  *     This test crashes HS versions 1.3 and 1.4 on Win32, Solaris,
  43  *     and Linux platforms in all execution modes. However, it passes
  44  *     against HS 2.0 on Win32 platform.
  45  *     See also the bug:
  46  *     4366625 (P4/S4) multiple stack overflow causes HS crash
  47  *
  48  * @requires vm.opt.DeoptimizeALot == null | vm.opt.DeoptimizeALot == false
  49  * @run main/othervm nsk.stress.stack.stack007
  50  */
  51 
  52 package nsk.stress.stack;
  53 
  54 
  55 import java.io.PrintStream;
  56 
  57 public class stack007 implements stack007i {
  58     final static int ITERATIONS = 1000;
  59     final static int INCREMENT = 100;
  60 
  61     public static void main(String[] args) {
  62         int exitCode = run(args, System.out);
  63         System.exit(exitCode + 95);
  64     }
  65 
  66     public static int run(String args[], PrintStream out) {
  67         stack007i test = new stack007();
  68         int depth;


< prev index next >