RFR: 8281213: Unsafe uses of long and size_t in MemReporterBase::diff_in_current_scale [v6]

Thomas Stuefe stuefe at openjdk.org
Tue Jan 17 06:31:14 UTC 2023


On Mon, 16 Jan 2023 19:46:50 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

>> Afshin Zafari has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   8281213: Unsafe uses of long and size_t in MemReporterBase::diff_in_current_scale
>
> src/hotspot/share/services/memReporter.hpp line 80:
> 
>> 78: 
>> 79:     LP64_ONLY(assert(s1 < INT64_MAX, "exceeded possible memory limits");)
>> 80:     LP64_ONLY(assert(s2 < INT64_MAX, "exceeded possible memory limits");)
> 
> Nit: LP64_ONLY isn't needed.

Would a 32-bit compiler not warn about a comparison that is always true?

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

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


More information about the hotspot-runtime-dev mailing list