Mon, 28 Jul 2014 15:06:38 -0700
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@4205 | 1 | /* |
kvn@6653 | 2 | * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved. |
kvn@4205 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
kvn@4205 | 4 | * |
kvn@4205 | 5 | * This code is free software; you can redistribute it and/or modify it |
kvn@4205 | 6 | * under the terms of the GNU General Public License version 2 only, as |
kvn@4205 | 7 | * published by the Free Software Foundation. |
kvn@4205 | 8 | * |
kvn@4205 | 9 | * This code is distributed in the hope that it will be useful, but WITHOUT |
kvn@4205 | 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
kvn@4205 | 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
kvn@4205 | 12 | * version 2 for more details (a copy is included in the LICENSE file that |
kvn@4205 | 13 | * accompanied this code). |
kvn@4205 | 14 | * |
kvn@4205 | 15 | * You should have received a copy of the GNU General Public License version |
kvn@4205 | 16 | * 2 along with this work; if not, write to the Free Software Foundation, |
kvn@4205 | 17 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
kvn@4205 | 18 | * |
kvn@4205 | 19 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
kvn@4205 | 20 | * or visit www.oracle.com if you need additional information or have any |
kvn@4205 | 21 | * questions. |
kvn@4205 | 22 | * |
kvn@4205 | 23 | */ |
kvn@4205 | 24 | |
kvn@4205 | 25 | /** |
kvn@4205 | 26 | * @author Tom Deneau |
kvn@4205 | 27 | */ |
kvn@4205 | 28 | |
kvn@4205 | 29 | import javax.crypto.Cipher; |
kvn@4205 | 30 | |
kvn@4205 | 31 | public class TestAESEncode extends TestAESBase { |
kvn@4205 | 32 | @Override |
kvn@4205 | 33 | public void run() { |
kvn@4205 | 34 | try { |
kvn@4205 | 35 | if (!noReinit) cipher.init(Cipher.ENCRYPT_MODE, key, algParams); |
kvn@6653 | 36 | encode = new byte[encodeLength]; |
kvn@6653 | 37 | if (testingMisalignment) { |
kvn@6653 | 38 | int tempSize = cipher.update(input, encInputOffset, (msgSize - lastChunkSize), encode, encOutputOffset); |
kvn@6653 | 39 | cipher.doFinal(input, (encInputOffset + msgSize - lastChunkSize), lastChunkSize, encode, (encOutputOffset + tempSize)); |
kvn@6653 | 40 | } else { |
kvn@6653 | 41 | cipher.doFinal(input, encInputOffset, msgSize, encode, encOutputOffset); |
kvn@6653 | 42 | } |
kvn@4205 | 43 | if (checkOutput) { |
kvn@4205 | 44 | compareArrays(encode, expectedEncode); |
kvn@4205 | 45 | } |
kvn@4205 | 46 | } |
kvn@4205 | 47 | catch (Exception e) { |
kvn@4205 | 48 | e.printStackTrace(); |
kvn@4205 | 49 | System.exit(1); |
kvn@4205 | 50 | } |
kvn@4205 | 51 | } |
kvn@4205 | 52 | |
kvn@4205 | 53 | @Override |
kvn@4205 | 54 | void childShowCipher() { |
kvn@4205 | 55 | showCipher(cipher, "Encryption"); |
kvn@4205 | 56 | } |
kvn@4205 | 57 | |
kvn@4205 | 58 | } |