Details
-
Bug
-
Resolution: Fixed
-
P5
-
24
-
b09
Description
The manual test Cipher/DES/PerformanceTest.java fails because in the following lines end - start could be zero, and then that value is used in division:
''
start = System.currentTimeMillis();
//operations
end = System.currentTimeMillis();
int speed = (int)((data.length * count)/(end - start));
''
Error thrown:
(1).Failed Automatically and thrown java.lang.ArithmeticException.
(2)Exception:
java.lang.ArithmeticException:
at PerformanceTest.runTest(PerformanceTest.java:187)
at PerformanceTest.run(PerformanceTest.java:126)
at PerformanceTest.main(PerformanceTest.java:77)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
atsun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:484)
at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:94)
at java.lang.Thread.run(Thread.java:744)
JavaTest Message: Test threw exception: java.lang.ArithmeticException: / by zero
JavaTest Message: shutting down test
STATUS:Failed.`main' threw exception: java.lang.ArithmeticException: / by zero
result: Failed. Execution failed: `main' threw exception: java.lang.ArithmeticException: / by zero
''
start = System.currentTimeMillis();
//operations
end = System.currentTimeMillis();
int speed = (int)((data.length * count)/(end - start));
''
Error thrown:
(1).Failed Automatically and thrown java.lang.ArithmeticException.
(2)Exception:
java.lang.ArithmeticException:
at PerformanceTest.runTest(PerformanceTest.java:187)
at PerformanceTest.run(PerformanceTest.java:126)
at PerformanceTest.main(PerformanceTest.java:77)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
atsun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:484)
at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:94)
at java.lang.Thread.run(Thread.java:744)
JavaTest Message: Test threw exception: java.lang.ArithmeticException: / by zero
JavaTest Message: shutting down test
STATUS:Failed.`main' threw exception: java.lang.ArithmeticException: / by zero
result: Failed. Execution failed: `main' threw exception: java.lang.ArithmeticException: / by zero
Attachments
Issue Links
- relates to
-
JDK-8039280 20 manual regression security tests fail in JDK 9
- Open
- links to
-
Commit(master) openjdk/jdk/034297a6
-
Review(master) openjdk/jdk/20135