JDK-8360281 : VMError::error_string has incorrect format usage
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2025-06-23
  • Updated: 2025-06-23
  • Resolved: 2025-06-23
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 26
26 masterFixed
Related Reports
Blocks :  
Description
In VMError::error_string there is a use of jio_snprintf that prints a pointer.  It uses PTR_FORMAT, which is correct. But it uses the pointer directly as the argument, rather than using the `p2i` helper function. It happens to accidentally work, but is warning about if gcc's printf checking is enabled for that call.

Comments
Changeset: 6df0f5e3 Branch: master Author: Kim Barrett <kbarrett@openjdk.org> Date: 2025-06-23 18:19:01 +0000 URL: https://git.openjdk.org/jdk/commit/6df0f5e390ecf874c1eca7284c51efa65ce23737
23-06-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/25935 Date: 2025-06-23 12:55:24 +0000
23-06-2025