< prev index next >

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

Print this page




  29  * VM testbase keywords: [stress, stack, nonconcurrent]
  30  * VM testbase readme:
  31  * DESCRIPTION
  32  *     This test provokes multiple stack overflows in the multiple
  33  *     threads -- by invoking static recursive method for the given
  34  *     fixed depth of recursion (though, for a large depth).
  35  *     This test measures a number of recursive invocations until
  36  *     stack overflow, and then tries to provoke similar stack overflows
  37  *     10 times in each of 10 threads. Each provocation consists of
  38  *     invoking that recursive method for the given fixed depth
  39  *     of invocations which is 10 times that depth measured before.
  40  *     The test is deemed passed, if VM have not crashed, and
  41  *     if exception other than due to stack overflow was not
  42  *     thrown.
  43  * COMMENTS
  44  *     This test crashes HS versions 2.0, 1.3, 1.4 on Win32 and Solaris
  45  *     platforms.
  46  *     See the bug:
  47  *     4366625 (P4/S4) multiple stack overflow causes HS crash
  48  *

  49  * @run main/othervm nsk.stress.stack.stack010
  50  */
  51 
  52 package nsk.stress.stack;
  53 
  54 
  55 import java.io.PrintStream;
  56 
  57 public class stack010 extends Thread {
  58     final static int THREADS = 10;
  59     final static int CYCLES = 10;
  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         //
  68         // Measure maximal recursion depth until stack overflow:




  29  * VM testbase keywords: [stress, stack, nonconcurrent]
  30  * VM testbase readme:
  31  * DESCRIPTION
  32  *     This test provokes multiple stack overflows in the multiple
  33  *     threads -- by invoking static recursive method for the given
  34  *     fixed depth of recursion (though, for a large depth).
  35  *     This test measures a number of recursive invocations until
  36  *     stack overflow, and then tries to provoke similar stack overflows
  37  *     10 times in each of 10 threads. Each provocation consists of
  38  *     invoking that recursive method for the given fixed depth
  39  *     of invocations which is 10 times that depth measured before.
  40  *     The test is deemed passed, if VM have not crashed, and
  41  *     if exception other than due to stack overflow was not
  42  *     thrown.
  43  * COMMENTS
  44  *     This test crashes HS versions 2.0, 1.3, 1.4 on Win32 and Solaris
  45  *     platforms.
  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.stack010
  51  */
  52 
  53 package nsk.stress.stack;
  54 
  55 
  56 import java.io.PrintStream;
  57 
  58 public class stack010 extends Thread {
  59     final static int THREADS = 10;
  60     final static int CYCLES = 10;
  61 
  62     public static void main(String[] args) {
  63         int exitCode = run(args, System.out);
  64         System.exit(exitCode + 95);
  65     }
  66 
  67     public static int run(String args[], PrintStream out) {
  68         //
  69         // Measure maximal recursion depth until stack overflow:


< prev index next >