< prev index next >

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

Print this page




  33  *     The test provokes second stack overflow from within the
  34  *     stack overflow handler -- repeatedly multiple times, and
  35  *     in multiple threads.
  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  *     and then trying to invoke that recursive method once again
  42  *     from within the catch clause just caught StackOverflowError.
  43  *     The test is deemed passed, if VM have not crashed, and
  44  *     if exception other than due to stack overflow was not
  45  *     thrown.
  46  * COMMENTS
  47  *     This test crashes HS versions 2.0, 1.3, and 1.4 on both
  48  *     Solaris and Win32 platforms.
  49  *     See the bug:
  50  *     4366625 (P4/S4) multiple stack overflow causes HS crash
  51  *
  52  * @ignore 8139875

  53  * @run main/othervm nsk.stress.stack.stack016 -eager
  54  */
  55 
  56 package nsk.stress.stack;
  57 
  58 
  59 import nsk.share.Harakiri;
  60 
  61 import java.io.PrintStream;
  62 
  63 public class stack016 extends Thread {
  64     private final static int THREADS = 10;
  65     private final static int CYCLES = 10;
  66     private final static int STEP = 10;
  67     private final static int RESERVE = 10;
  68     private final static int PROBES = STEP * RESERVE;
  69 
  70     public static void main(String[] args) {
  71         int exitCode = run(args, System.out);
  72         System.exit(exitCode + 95);




  33  *     The test provokes second stack overflow from within the
  34  *     stack overflow handler -- repeatedly multiple times, and
  35  *     in multiple threads.
  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  *     and then trying to invoke that recursive method once again
  42  *     from within the catch clause just caught StackOverflowError.
  43  *     The test is deemed passed, if VM have not crashed, and
  44  *     if exception other than due to stack overflow was not
  45  *     thrown.
  46  * COMMENTS
  47  *     This test crashes HS versions 2.0, 1.3, and 1.4 on both
  48  *     Solaris and Win32 platforms.
  49  *     See the bug:
  50  *     4366625 (P4/S4) multiple stack overflow causes HS crash
  51  *
  52  * @ignore 8139875
  53  * @requires vm.opt.DeoptimizeALot == null | vm.opt.DeoptimizeALot == false
  54  * @run main/othervm nsk.stress.stack.stack016 -eager
  55  */
  56 
  57 package nsk.stress.stack;
  58 
  59 
  60 import nsk.share.Harakiri;
  61 
  62 import java.io.PrintStream;
  63 
  64 public class stack016 extends Thread {
  65     private final static int THREADS = 10;
  66     private final static int CYCLES = 10;
  67     private final static int STEP = 10;
  68     private final static int RESERVE = 10;
  69     private final static int PROBES = STEP * RESERVE;
  70 
  71     public static void main(String[] args) {
  72         int exitCode = run(args, System.out);
  73         System.exit(exitCode + 95);


< prev index next >