-
Bug
-
Resolution: Unresolved
-
P3
-
18
-
x86_64
-
linux
ADDITIONAL SYSTEM INFORMATION :
Linux OS, armv7 softfp platform
Java 18+ compiled with --with-abi-profile=arm-vfp-sflt
All versions of Java from 18 forward affected (tested 18, 19, 21, and 23).
A DESCRIPTION OF THE PROBLEM :
JDK-8271128 added support for InlineIntrinsics on arm32. This change appears to have a bug in it for softfp ABI targets, as all floating point intrinsics in interpreter mode (non-JIT) return incorrect values. Reverting just this change restores correct behavior of these functions.
REGRESSION : Last worked in version 17
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run any double floating point intrinsic (e.g. Math.sin(100)) in interpreter mode (non-JIT). Just calling it directly from main can exhibit the failure, although the result appears to be influenced by surrounding code. This is likely due to different register values being picked up within the interpreter?
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Correct result from math function.
ACTUAL -
Math function returns garbage data (e.g. 5e-324).
---------- BEGIN SOURCE ----------
public class Main {
public static void main(String args[]) {
System.out.println(java.lang.Math.sin(100));
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Revert commit that added arm inline intrinsics (https://github.com/openjdk/jdk/commit/b6a19f173bc6c07622633c9d6757d96a95b43398) (https://bugs.openjdk.org/browse/JDK-8271128)
FREQUENCY : always
Linux OS, armv7 softfp platform
Java 18+ compiled with --with-abi-profile=arm-vfp-sflt
All versions of Java from 18 forward affected (tested 18, 19, 21, and 23).
A DESCRIPTION OF THE PROBLEM :
REGRESSION : Last worked in version 17
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run any double floating point intrinsic (e.g. Math.sin(100)) in interpreter mode (non-JIT). Just calling it directly from main can exhibit the failure, although the result appears to be influenced by surrounding code. This is likely due to different register values being picked up within the interpreter?
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Correct result from math function.
ACTUAL -
Math function returns garbage data (e.g. 5e-324).
---------- BEGIN SOURCE ----------
public class Main {
public static void main(String args[]) {
System.out.println(java.lang.Math.sin(100));
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Revert commit that added arm inline intrinsics (https://github.com/openjdk/jdk/commit/b6a19f173bc6c07622633c9d6757d96a95b43398) (https://bugs.openjdk.org/browse/JDK-8271128)
FREQUENCY : always