On 14/1/22 12:32, Philippe Mathieu-Daudé wrote:
On 13/1/22 20:44, Dr. David Alan Gilbert (git) wrote:
From: "Dr. David Alan Gilbert" <dgilb...@redhat.com>

We fairly regularly forget VMSTATE_END_OF_LIST markers off descriptions;
given that the current check is only for ->name being NULL, sometimes
we get unlucky and the code apparently works and no one spots the error.

Explicitly add a flag, VMS_END that should be set, and assert it is
set during the traversal.

Note: This can't go in until we update the copy of vmstate.h in slirp.

Do we need a libslirp buildsys version check to get this patch merged?

In that case we should use an intermediate function which would
eventually call assert() after checking SLIRP_MAJOR_VERSION/...
values.

Reviewed-by: Philippe Mathieu-Daudé <f4...@amsat.org>

Suggested-by: Peter Maydell <peter.mayd...@linaro.org>
Signed-off-by: Dr. David Alan Gilbert <dgilb...@redhat.com>
---
  include/migration/vmstate.h | 7 ++++++-
  migration/savevm.c          | 1 +
  migration/vmstate.c         | 2 ++
  3 files changed, 9 insertions(+), 1 deletion(-)


Reply via email to