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));
}
bool should_rotate(bool force) {
return force ||
((GCLogFileSize != 0) && ((size_t)_bytes_written >= GCLogFileSize));
}
- duplicates
-
JDK-8074459 Flags handling memory sizes should be of type size_t
-
- Resolved
-