< prev index next >

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

Print this page




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

  50  * @run main/othervm nsk.stress.stack.stack015
  51  */
  52 
  53 package nsk.stress.stack;
  54 
  55 
  56 import java.io.PrintStream;
  57 
  58 public class stack015 extends stack015i {
  59     final static int THREADS = 10;
  60     final static int CYCLES = 10;
  61     final static int STEP = 10;
  62     final static int RESERVE = 10;
  63 
  64     public static void main(String[] args) {
  65         int exitCode = run(args, System.out);
  66         System.exit(exitCode + 95);
  67     }
  68 
  69     public static int run(String args[], PrintStream out) {




  30  * VM testbase readme:
  31  * DESCRIPTION
  32  *     This test provokes multiple stack overflows in the multiple
  33  *     threads -- by invoking synchronized virtual recursive method
  34  *     for the given fixed depth of recursion from within another
  35  *     recursive method already deeply invoked.
  36  *     This test measures a number of recursive invocations until
  37  *     stack overflow, and then tries to provoke similar stack overflows
  38  *     in 10 times in each of 10 threads. Each provocation consists of
  39  *     invoking that recursive method for the given fixed depth
  40  *     of invocations which is 10 times that depth measured before.
  41  *     The test is deemed passed, if VM have not crashed, and
  42  *     if exception other than due to stack overflow was not
  43  *     thrown.
  44  * COMMENTS
  45  *     This test crashes HS versions 2.0, 1.3, and 1.4 on Solaris.
  46  *     However, it passes against all these HS versions on Win32.
  47  *     See the bug:
  48  *     4366625 (P4/S4) multiple stack overflow causes HS crash
  49  *
  50  * @requires vm.opt.DeoptimizeALot == null | vm.opt.DeoptimizeALot == false
  51  * @run main/othervm nsk.stress.stack.stack015
  52  */
  53 
  54 package nsk.stress.stack;
  55 
  56 
  57 import java.io.PrintStream;
  58 
  59 public class stack015 extends stack015i {
  60     final static int THREADS = 10;
  61     final static int CYCLES = 10;
  62     final static int STEP = 10;
  63     final static int RESERVE = 10;
  64 
  65     public static void main(String[] args) {
  66         int exitCode = run(args, System.out);
  67         System.exit(exitCode + 95);
  68     }
  69 
  70     public static int run(String args[], PrintStream out) {


< prev index next >