RFR: 8343700: ceil_log2 should not loop endlessly [v5]
Sonia Zaldana Calles
szaldana at openjdk.org
Tue Nov 19 19:19:53 UTC 2024
On Fri, 15 Nov 2024 23:08:59 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:
>>
>> fixing assert
>
> src/hotspot/share/utilities/powerOfTwo.hpp line 125:
>
>> 123: // Find log2 value greater than this input
>> 124: template <typename T, typename U = typename std::make_unsigned<T>::type, ENABLE_IF(std::is_integral<T>::value)>
>> 125: inline int ceil_log2(T value) {
>
> Pre-existing: I think this should have been called `log2i_ceil`, with a description something like:
>
> // Ceiling of log2 of a positive, integral value, i.e., smallest i such that value <= 2^i.
>
> And move it near the other log2i variants.
>
> This could be done as a followup, to keep this PR focused on the issue at hand.
FYI, I filed [8344568](https://bugs.openjdk.org/browse/JDK-8344568) to track this.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22074#discussion_r1848932955
More information about the hotspot-dev
mailing list