JDK-8361085 : MemoryReserver log_on_large_pages_failure has incorrect format usage
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Priority: P4
  • Status: New
  • Resolution: Unresolved
  • Submitted: 2025-06-30
  • Updated: 2025-06-30
Related Reports
Blocks :  
Description
In log_on_large_pages_failure (a file-scoped function in memoryReserver.cpp) 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 warned about if gcc's printf checking is enabled for that call.

Comments
A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/26050 Date: 2025-06-30 16:11:47 +0000
30-06-2025