< prev index next >

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

Print this page




  29  * VM testbase keywords: [stress, quick, stack, nonconcurrent]
  30  * VM testbase readme:
  31  * DESCRIPTION
  32  *     This test provokes multiple stack overflows in the same thread
  33  *     by invoking final recursive method for the given fixed depth of
  34  *     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 100 times -- each time by trying to
  38  *     invoke the same recursive method for the given fixed depth
  39  *     of invocations (which is twice that depth just measured).
  40  *     The test is deemed passed, if VM have not crashed.
  41  * COMMENTS
  42  *     This test crashes all HS versions (2.0, 1.3, 1.4) on all
  43  *     platforms (Win32, Solaris, Linux) in all execution modes
  44  *     (-Xint, -Xmixed, -Xcomp) in 100% of executions in which
  45  *     I had tryied it.
  46  *     See the bug:
  47  *     4366625 (P4/S4) multiple stack overflow causes HS crash
  48  *

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




  29  * VM testbase keywords: [stress, quick, stack, nonconcurrent]
  30  * VM testbase readme:
  31  * DESCRIPTION
  32  *     This test provokes multiple stack overflows in the same thread
  33  *     by invoking final recursive method for the given fixed depth of
  34  *     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 100 times -- each time by trying to
  38  *     invoke the same recursive method for the given fixed depth
  39  *     of invocations (which is twice that depth just measured).
  40  *     The test is deemed passed, if VM have not crashed.
  41  * COMMENTS
  42  *     This test crashes all HS versions (2.0, 1.3, 1.4) on all
  43  *     platforms (Win32, Solaris, Linux) in all execution modes
  44  *     (-Xint, -Xmixed, -Xcomp) in 100% of executions in which
  45  *     I had tryied it.
  46  *     See the bug:
  47  *     4366625 (P4/S4) multiple stack overflow causes HS crash
  48  *
  49  * @requires vm.opt.DeoptimizeALot == null | vm.opt.DeoptimizeALot == false
  50  * @run main/othervm nsk.stress.stack.stack005
  51  */
  52 
  53 package nsk.stress.stack;
  54 
  55 
  56 import java.io.PrintStream;
  57 
  58 public class stack005 {
  59     public static void main(String[] args) {
  60         int exitCode = run(args, System.out);
  61         System.exit(exitCode + 95);
  62     }
  63 
  64     public static int run(String args[], PrintStream out) {
  65         stack005 test = new stack005();
  66         int depth;
  67         for (depth = 100; ; depth += 100)
  68             try {
  69                 test.recurse(depth);


< prev index next >