test/compiler/5091921/Test6850611.java

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

author
fzhinkin
date
Mon, 28 Jul 2014 15:06:38 -0700
changeset 6997
dbb05f6d93c4
parent 4618
514efad5e81a
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

kvn@2877 1 /*
drchase@4618 2 * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
kvn@2877 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
kvn@2877 4 *
kvn@2877 5 * This code is free software; you can redistribute it and/or modify it
kvn@2877 6 * under the terms of the GNU General Public License version 2 only, as
kvn@2877 7 * published by the Free Software Foundation.
kvn@2877 8 *
kvn@2877 9 * This code is distributed in the hope that it will be useful, but WITHOUT
kvn@2877 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
kvn@2877 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
kvn@2877 12 * version 2 for more details (a copy is included in the LICENSE file that
kvn@2877 13 * accompanied this code).
kvn@2877 14 *
kvn@2877 15 * You should have received a copy of the GNU General Public License version
kvn@2877 16 * 2 along with this work; if not, write to the Free Software Foundation,
kvn@2877 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
kvn@2877 18 *
kvn@2877 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
kvn@2877 20 * or visit www.oracle.com if you need additional information or have any
kvn@2877 21 * questions.
kvn@2877 22 *
kvn@2877 23 */
kvn@2877 24
kvn@2877 25 /**
kvn@2877 26 * @test
kvn@2877 27 * @bug 6850611
kvn@2877 28 * @summary int / long arithmetic seems to be broken in 1.6.0_14 HotSpot Server VM (Win XP)
kvn@2877 29 *
drchase@4618 30 * @run main/timeout=480 Test6850611
kvn@2877 31 */
kvn@2877 32
kvn@2877 33 public class Test6850611 {
kvn@2877 34
kvn@2877 35 public static void main(String[] args) {
kvn@2877 36 test();
kvn@2877 37 }
kvn@2877 38
kvn@2877 39 private static void test() {
kvn@2877 40 for (int j = 0; j < 5; ++j) {
kvn@2877 41 long x = 0;
kvn@2877 42 for (int i = Integer.MIN_VALUE; i < Integer.MAX_VALUE; ++i) {
kvn@2877 43 x += i;
kvn@2877 44 }
kvn@2877 45 System.out.println("sum: " + x);
kvn@2877 46 if (x != -4294967295l) {
kvn@2877 47 System.out.println("FAILED");
kvn@2877 48 System.exit(97);
kvn@2877 49 }
kvn@2877 50 }
kvn@2877 51 }
kvn@2877 52 }
kvn@2877 53

mercurial