8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * @test
26 * @bug 8029383
27 * @summary stack overflow if callee is marked for deoptimization causes crash
28 * @run main/othervm -XX:TieredStopAtLevel=1 -XX:-BackgroundCompilation -XX:CompileCommand=dontinline,StackOverflowGuardPagesOff::m1 -XX:CompileCommand=exclude,StackOverflowGuardPagesOff::m2 -Xss256K -XX:-UseOnStackReplacement StackOverflowGuardPagesOff
29 *
30 */
31
32 // This test calls m2 recursively until a stack overflow. Then calls
33 // m3 that calls m1. m1 triggers B's class loading, as a result m1 and
34 // m3 needs to be deoptimized. Deoptimization of m1 causes a stack
35 // overflow exception to be thrown which is propagated to m3 in the
36 // deopt blob. If the guard pages are no enabled, the stack bang in
37 // the deopt blob triggers a crash.
38 public class StackOverflowGuardPagesOff {
39
40 static class A {
41 void m() {}
42 }
43
44 static class B extends A {
45 void m() {}
46 }
47
48 static void m1(boolean deopt, A a) {
|
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * @test
26 * @bug 8029383
27 * @summary stack overflow if callee is marked for deoptimization causes crash
28 * @run main/othervm -XX:TieredStopAtLevel=1 -XX:-BackgroundCompilation -XX:CompileCommand=dontinline,StackOverflowGuardPagesOff::m1 -XX:CompileCommand=exclude,StackOverflowGuardPagesOff::m2 -Xss392K -XX:-UseOnStackReplacement StackOverflowGuardPagesOff
29 *
30 */
31
32 // This test calls m2 recursively until a stack overflow. Then calls
33 // m3 that calls m1. m1 triggers B's class loading, as a result m1 and
34 // m3 needs to be deoptimized. Deoptimization of m1 causes a stack
35 // overflow exception to be thrown which is propagated to m3 in the
36 // deopt blob. If the guard pages are no enabled, the stack bang in
37 // the deopt blob triggers a crash.
38 public class StackOverflowGuardPagesOff {
39
40 static class A {
41 void m() {}
42 }
43
44 static class B extends A {
45 void m() {}
46 }
47
48 static void m1(boolean deopt, A a) {
|