Re: [PATCH 3/5] migration/multifd: Replace assert() with error_setg() in recv paths

Fabiano Rosas <[email protected]>
Newsgroups gmane.comp.emulators.qemu,gmane.comp.emulators.qemu.stable
Message-ID <[email protected]>
Peter Xu <[email protected]> writes:

> QPL and UADK multifd backends use assert() to validate wire-controlled
> fields like per-page compressed lengths and packet size consistency.  These
> asserts will stop working with released version of binaries, so may stop
> working.

This is not true, asserts are always on. Same for the similar comment in
the previous patch commit message.

>
> Replace all assert() calls in the receive path with proper error_setg() so
> validation failures are reported gracefully rather than crashing or
> silently ignored.
>
> While at it, touch up an assert() in qatzip recv path too.
>
> Cc: qemu-stable <[email protected]>
> Cc: Fabiano Rosas <[email protected]>
> Cc: Yuan Liu <[email protected]>
> Cc: Yichen Wang <[email protected]>
> Signed-off-by: Peter Xu <[email protected]>

Reviewed-by: Fabiano Rosas <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.