Details
-
Enhancement
-
Status: Closed
-
P4
-
Resolution: Fixed
-
19
-
b13
-
Fix failed
Description
We have two functions ck, that are supposed to compare the two inputs and make the test fail if they are not equal.
void ck(long x, long y) {
if (x != y) {
throw new RuntimeException(" x = " + Long.toHexString(x) + ", y = " + Long.toHexString(y));
}
}
void ck(double x, double y) {
if (x == x && y == y && x != y) {
ck(x, y);
}
}
The long throws a RuntimeException.
The one for double goes into an infinite recursion, and eventually throws a StackOverflowError. This does not make much sense.
I spoke with the original author [~psandoz], he agrees to replace it with an analogue RuntimeException.
void ck(double x, double y) {
if (x == x && y == y && x != y) {
throw new RuntimeException(...);
}
}
Code introduced inJDK-8151163.
Bug inJDK-8282555 encountered both this endless recursion as the RuntimeException, of the respective ck functions.
void ck(long x, long y) {
if (x != y) {
throw new RuntimeException(" x = " + Long.toHexString(x) + ", y = " + Long.toHexString(y));
}
}
void ck(double x, double y) {
if (x == x && y == y && x != y) {
ck(x, y);
}
}
The long throws a RuntimeException.
The one for double goes into an infinite recursion, and eventually throws a StackOverflowError. This does not make much sense.
I spoke with the original author [~psandoz], he agrees to replace it with an analogue RuntimeException.
void ck(double x, double y) {
if (x == x && y == y && x != y) {
throw new RuntimeException(...);
}
}
Code introduced in
Bug in
Attachments
Issue Links
- is cloned by
-
JDK-8282665 [REDO] ByteBufferTest.java: replace endless recursion with RuntimeException in void ck(double x, double y)
-
- Resolved
-
- relates to
-
JDK-8282661 [BACKOUT] ByteBufferTest.java: replace endless recursion with RuntimeException in void ck(double x, double y)
-
- Resolved
-
-
JDK-8282555 Missing memory edge when spilling MoveF2I, MoveD2L etc
-
- Closed
-
-
JDK-8151163 All Buffer implementations should leverage Unsafe unaligned accessors
-
- Resolved
-
(1 links to)