On Tue, Jul 15, 2025 at 09:45:51AM -0300, Fabiano Rosas wrote:
> Coverity has caught a bug in the formatting of time intervals for
> postcopy latency distribution display in 'info migrate'.
>
> While bounds checking the labels array, sizeof is incorrectly being
> used. ARRAY_SIZE is the correct fo
Prasad Pandit writes:
> On Wed, 16 Jul 2025 at 19:06, Fabiano Rosas wrote:
>> The condition should be >=.
>
> * I'm thinking of doing away with the loop and the string array. The
> array has 3 values of which only one gets used due to conversion to
> seconds.
The point is not to convert to seco
On Wed, 16 Jul 2025 at 19:06, Fabiano Rosas wrote:
> The condition should be >=.
* I'm thinking of doing away with the loop and the string array. The
array has 3 values of which only one gets used due to conversion to
seconds.
> But then that's "0 sec" for 100 us.
#define US (MS * 1000) =>
Prasad Pandit writes:
> On Tue, 15 Jul 2025 at 18:49, Fabiano Rosas wrote:
>> @@ -57,11 +57,9 @@ static const gchar *format_time_str(uint64_t us)
>> const char *units[] = {"us", "ms", "sec"};
>> int index = 0;
>>
>> -while (us > 1000) {
>> +while (us > 1000 && index + 1 < ARRAY
On Tue, 15 Jul 2025 at 18:49, Fabiano Rosas wrote:
> @@ -57,11 +57,9 @@ static const gchar *format_time_str(uint64_t us)
> const char *units[] = {"us", "ms", "sec"};
> int index = 0;
>
> -while (us > 1000) {
> +while (us > 1000 && index + 1 < ARRAY_SIZE(units)) {
> us /=
On 15/7/25 14:45, Fabiano Rosas wrote:
Coverity has caught a bug in the formatting of time intervals for
postcopy latency distribution display in 'info migrate'.
While bounds checking the labels array, sizeof is incorrectly being
used. ARRAY_SIZE is the correct form of obtaining the size of an
a
Coverity has caught a bug in the formatting of time intervals for
postcopy latency distribution display in 'info migrate'.
While bounds checking the labels array, sizeof is incorrectly being
used. ARRAY_SIZE is the correct form of obtaining the size of an
array.
Fixes: 3345fb3b6d ("migration/post