All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Xu <peterx@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel@nongnu.org, Fabiano Rosas <farosas@suse.de>,
	Juraj Marcin <jmarcin@redhat.com>
Subject: Re: [PATCH] migration: Fix possible division by zero on calc expected downtime
Date: Mon, 11 May 2026 11:29:58 -0400	[thread overview]
Message-ID: <agH19jdl3UYZeStj@x1.local> (raw)
In-Reply-To: <CAFEAcA8L_BgfHEUnJhWCJ9-aMPUadbvQWGrF2UAW8vE53JP=6A@mail.gmail.com>

On Mon, May 11, 2026 at 04:24:24PM +0100, Peter Maydell wrote:
> > This actually fails to fix the ubsan issue and I can still reproduce,
> > because the ubsan issue was a Nan reported, where it seems when Nan found
> > in normal such evaluations it'll return FALSE.  I'll need to use:
> >
> >         if (expected < (double)INT64_MAX) {
> >             return (int64_t)expected;
> >         }
> >
> 
> Hmm, how do we get a NaN ?

When mbps is zero (when it reproduces here).  I have the comment in v2
explaining it.

Thanks,

-- 
Peter Xu



  reply	other threads:[~2026-05-11 15:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-11 14:10 [PATCH] migration: Fix possible division by zero on calc expected downtime Peter Xu
2026-05-11 14:26 ` Peter Maydell
2026-05-11 14:51   ` Peter Xu
2026-05-11 15:18     ` Peter Xu
2026-05-11 15:24       ` Peter Maydell
2026-05-11 15:29         ` Peter Xu [this message]
2026-05-11 15:36           ` Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=agH19jdl3UYZeStj@x1.local \
    --to=peterx@redhat.com \
    --cc=farosas@suse.de \
    --cc=jmarcin@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.