JDK-8298736 : Revisit usages of log10 in compiler code
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 20,21
  • Priority: P5
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2022-12-14
  • Updated: 2022-12-19
  • Resolved: 2022-12-19
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 21
21 masterFixed
Related Reports
Relates :  
Relates :  
Description
The log10 usage added by JDK-8286800 causes build failures on SPARC (Oracle JDK 11u):
src/hotspot/share/opto/loopnode.cpp", line 4771: Error: Overloading ambiguity between "std::log10(double)" and "std::log10(float)".

For the backport to Oracle JDK 11u, I added a static_cast<double> of the argument. We should also fix this in mainline.

While browsing the code, I noticed that JDK-8283775 added a new implementation of "log10 rounded down" in node.cpp. I think we could simply use std::log10 there.
Comments
Changeset: ec959914 Author: Damon Fenacci <damon.fenacci@oracle.com> Committer: Tobias Hartmann <thartmann@openjdk.org> Date: 2022-12-19 08:47:04 +0000 URL: https://git.openjdk.org/jdk/commit/ec95991470a99c917f757614fc6d2cd883bdb39b
19-12-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/11686 Date: 2022-12-15 07:54:18 +0000
16-12-2022

ILW = Overloading ambiguity, not an issue with current build configuration but may lead to warnings/errors with different flags, no workaround = LLH = P5
14-12-2022