RFR: 8343700: ceil_log2 should not loop endlessly [v3]

Thomas Stuefe stuefe at openjdk.org
Thu Nov 14 09:21:22 UTC 2024


On Thu, 14 Nov 2024 08:30:49 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

>> Sonia Zaldana Calles has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Starting ret at 0
>
> src/hotspot/share/utilities/powerOfTwo.hpp line 125:
> 
>> 123: // Find log2 value greater than this input
>> 124: template <typename T, ENABLE_IF(std::is_integral<T>::value)>
>> 125: inline T ceil_log2(T value) {
> 
> Pre-existing: It's a mistake that this function's return type is T.  It should be int, like all the other log2
> variants in this file. Maybe it should be near those.

I agree, see JBS text

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22074#discussion_r1841837930


More information about the hotspot-dev mailing list