--- old/test/compiler/codegen/7184394/TestAESEncode.java 2015-02-13 08:28:09.987526708 -0800 +++ new/test/compiler/codegen/7184394/TestAESEncode.java 2015-02-13 08:28:09.919527143 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -32,8 +32,14 @@ @Override public void run() { try { - if (!noReinit) cipher.init(Cipher.ENCRYPT_MODE, key, algParams); - encode = new byte[encodeLength]; + if (mode.equals("GCM")) { + gcm_init(); + cipher.init(Cipher.ENCRYPT_MODE, key, gcm_spec); + cipher.update(aad); + } else if (!noReinit) { + cipher.init(Cipher.ENCRYPT_MODE, key, algParams); + } + encode = new byte[encodeLength + tlen]; if (testingMisalignment) { int tempSize = cipher.update(input, encInputOffset, (msgSize - lastChunkSize), encode, encOutputOffset); cipher.doFinal(input, (encInputOffset + msgSize - lastChunkSize), lastChunkSize, encode, (encOutputOffset + tempSize));