30 * VM testbase comments: 8139875
31 * VM testbase readme:
32 * DESCRIPTION
33 * This test provokes multiple stack overflows in the same thread
34 * by invocations via reflection. Recursive method is invoked for
35 * the given fixed depth of recursion (though, for a large depth).
36 * This test makes measures a number of recursive invocations
37 * before 1st StackOverflowError, and then tries to reproduce
38 * such StackOverflowError 100 times -- each time by trying to
39 * invoke the same recursive method for the given fixed depth
40 * of invocations (which is twice that depth just measured).
41 * The test is deemed passed, if VM have not crashed.
42 * COMMENTS
43 * This test crashes all HS versions (2.0, 1.3, 1.4) on Solaris,
44 * and crashes HS 2.0 on win32. However, it passes against HS 1.3
45 * and 1.4 on Win32.
46 * See the bug:
47 * 4366625 (P4/S4) multiple stack overflow causes HS crash
48 *
49 * @ignore 8139875
50 * @run main/othervm nsk.stress.stack.stack008
51 */
52
53 package nsk.stress.stack;
54
55
56 import java.io.PrintStream;
57 import java.lang.reflect.InvocationTargetException;
58 import java.lang.reflect.Method;
59
60 public class stack008 {
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 int depth;
68 //
69 // Measure maximal recursion depth until stack overflow:
|
30 * VM testbase comments: 8139875
31 * VM testbase readme:
32 * DESCRIPTION
33 * This test provokes multiple stack overflows in the same thread
34 * by invocations via reflection. Recursive method is invoked for
35 * the given fixed depth of recursion (though, for a large depth).
36 * This test makes measures a number of recursive invocations
37 * before 1st StackOverflowError, and then tries to reproduce
38 * such StackOverflowError 100 times -- each time by trying to
39 * invoke the same recursive method for the given fixed depth
40 * of invocations (which is twice that depth just measured).
41 * The test is deemed passed, if VM have not crashed.
42 * COMMENTS
43 * This test crashes all HS versions (2.0, 1.3, 1.4) on Solaris,
44 * and crashes HS 2.0 on win32. However, it passes against HS 1.3
45 * and 1.4 on Win32.
46 * See the bug:
47 * 4366625 (P4/S4) multiple stack overflow causes HS crash
48 *
49 * @ignore 8139875
50 * @requires vm.opt.DeoptimizeALot == null | vm.opt.DeoptimizeALot == false
51 * @run main/othervm nsk.stress.stack.stack008
52 */
53
54 package nsk.stress.stack;
55
56
57 import java.io.PrintStream;
58 import java.lang.reflect.InvocationTargetException;
59 import java.lang.reflect.Method;
60
61 public class stack008 {
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 int depth;
69 //
70 // Measure maximal recursion depth until stack overflow:
|