JDK-8144201 : openjdk aarch64: jdk/test/com/sun/net/httpserver/Test6a.java fails with --enable-unlimited-crypto
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 9
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux
  • CPU: aarch64
  • Submitted: 2015-11-28
  • Updated: 2019-11-12
  • Resolved: 2015-12-08
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 JDK 9
8u192Fixed 9 b99Fixed
Description
    The test failed on aarch64 platform using openjdk8/9 configured with --enable-unlimited-crypto.
    Reported error message: Execution failed: `main' threw exception: java.io.IOException: Error writing request body to server.
    And the test passes with -XX:TieredStopAtLevel=3 or -XX:-UseAESIntrinsics option.
    After narrowing down, I find the bug is caused by the _cipherBlockChaining_decryptAESCrypt StubRoutine.

    Proposed patch to fix a typo in this StubRoutine:
diff -r 150c50761d56 src/cpu/aarch64/vm/stubGenerator_aarch64.cpp
--- a/src/cpu/aarch64/vm/stubGenerator_aarch64.cpp	Fri Nov 27 12:37:38 2015 +0100
+++ b/src/cpu/aarch64/vm/stubGenerator_aarch64.cpp	Sat Nov 28 22:02:25 2015 +0800
@@ -1973,7 +1973,7 @@
   //   c_rarg4   - input length
   //
   // Output:
-  //   rax       - input length
+  //   x0        - input length
   //
   address generate_cipherBlockChaining_decryptAESCrypt() {
     assert(UseAES, "need AES instructions and misaligned SSE support");
@@ -2035,7 +2035,7 @@
       __ br(Assembler::EQ, L_rounds_52);
 
       __ aesd(v0, v17); __ aesimc(v0, v0);
-      __ aesd(v0, v17); __ aesimc(v0, v0);
+      __ aesd(v0, v18); __ aesimc(v0, v0);
     __ BIND(L_rounds_52);
       __ aesd(v0, v19); __ aesimc(v0, v0);
       __ aesd(v0, v20); __ aesimc(v0, v0);