test/compiler/6711100/Test.java

Mon, 28 Jul 2014 15:06:38 -0700

author
fzhinkin
date
Mon, 28 Jul 2014 15:06:38 -0700
changeset 6997
dbb05f6d93c4
parent 1907
c18cbe5936b8
child 6876
710a3c8b516e
permissions
-rw-r--r--

8051344: JVM crashed in Compile::start() during method parsing w/ UseRTMDeopt turned on
Summary: call rtm_deopt() only if there were no compilation bailouts before.
Reviewed-by: kvn

rasbold@801 1 /*
trims@1907 2 * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
rasbold@801 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
rasbold@801 4 *
rasbold@801 5 * This code is free software; you can redistribute it and/or modify it
rasbold@801 6 * under the terms of the GNU General Public License version 2 only, as
rasbold@801 7 * published by the Free Software Foundation.
rasbold@801 8 *
rasbold@801 9 * This code is distributed in the hope that it will be useful, but WITHOUT
rasbold@801 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
rasbold@801 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
rasbold@801 12 * version 2 for more details (a copy is included in the LICENSE file that
rasbold@801 13 * accompanied this code).
rasbold@801 14 *
rasbold@801 15 * You should have received a copy of the GNU General Public License version
rasbold@801 16 * 2 along with this work; if not, write to the Free Software Foundation,
rasbold@801 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
rasbold@801 18 *
trims@1907 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
trims@1907 20 * or visit www.oracle.com if you need additional information or have any
trims@1907 21 * questions.
rasbold@801 22 */
rasbold@801 23
rasbold@801 24 /*
rasbold@801 25 * @test
rasbold@801 26 * @bug 6711100
rasbold@801 27 * @summary 64bit fastdebug server vm crashes with assert(_base == Int,"Not an Int")
rasbold@801 28 * @run main/othervm -Xcomp -XX:CompileOnly=Test.<init> Test
rasbold@801 29 */
rasbold@801 30
rasbold@801 31 public class Test {
rasbold@801 32
rasbold@801 33 static byte b;
rasbold@801 34
rasbold@801 35 // The server compiler chokes on compiling
rasbold@801 36 // this method when f() is not inlined
rasbold@801 37 public Test() {
rasbold@801 38 b = (new byte[1])[(new byte[f()])[-1]];
rasbold@801 39 }
rasbold@801 40
rasbold@801 41 protected static int f() {
rasbold@801 42 return 1;
rasbold@801 43 }
rasbold@801 44
rasbold@801 45 public static void main(String[] args) {
rasbold@801 46 try {
rasbold@801 47 Test t = new Test();
rasbold@801 48 } catch (ArrayIndexOutOfBoundsException e) {
rasbold@801 49 }
rasbold@801 50 }
rasbold@801 51 }
rasbold@801 52
rasbold@801 53

mercurial