RFR: 8341095: Possible overflow in os::Posix::print_uptime_info

Gerard Ziemski gziemski at openjdk.org
Thu Mar 20 20:15:42 UTC 2025


This is a trivial change that will quiet Xcode only visual warning in os_posix.cpp file.

There are 31,536,000 seconds in a year, so if int is 32bits, then we have MAX int value of 2,147,483,647 so it would overflow in 68 years - unlikely to affect anyone.

-------------

Commit messages:
 - use cast to quiet Xcode warning

Changes: https://git.openjdk.org/jdk/pull/24140/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24140&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8341095
  Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod
  Patch: https://git.openjdk.org/jdk/pull/24140.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/24140/head:pull/24140

PR: https://git.openjdk.org/jdk/pull/24140


More information about the hotspot-runtime-dev mailing list