JDK-8075257 : Unsigned value implicitly cast to signed in log file rotation
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 9
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2015-03-16
  • Updated: 2015-03-18
  • Resolved: 2015-03-18
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 9
9Resolved
Related Reports
Duplicate :  
Description
In src/share/vm/utilities/ostream.hpp there is a comparison that implicitly casts a size_t (GCLogFileSize) to a jlong (_bytes_written). On 32-bit platforms this will likely not work as expected if GCLogFileSize is set to a large (unsigned) number.

  bool should_rotate(bool force) {
    return force ||
             ((GCLogFileSize != 0) && ((size_t)_bytes_written >= GCLogFileSize));
  }

Comments
This issue was found in the code review of JDK-8074459, and the fix will be pushed together with that change.
18-03-2015