summary refs log tree commit diff stats
path: root/migration/qemu-file.c
diff options
context:
space:
mode:
authorFabiano Rosas <farosas@suse.de>2023-10-09 15:43:24 -0300
committerJuan Quintela <quintela@redhat.com>2023-10-17 09:14:32 +0200
commitff40c7f0b787f47cf767b39a3226a113c06930f2 (patch)
treeb2f0f921b6b531ff4cec48c16088e6e5d940baa1 /migration/qemu-file.c
parent31499a9dc1910d695d7df4145a30e3b9ddedf8fe (diff)
downloadfocaccia-qemu-ff40c7f0b787f47cf767b39a3226a113c06930f2.tar.gz
focaccia-qemu-ff40c7f0b787f47cf767b39a3226a113c06930f2.zip
migration: Fix analyze-migration.py when ignore-shared is used
The script is currently broken when the x-ignore-shared capability is
used:

Traceback (most recent call last):
  File "./scripts/analyze-migration.py", line 656, in <module>
    dump.read(dump_memory = args.memory)
  File "./scripts/analyze-migration.py", line 593, in read
    section.read()
  File "./scripts/analyze-migration.py", line 163, in read
    self.name = self.file.readstr(len = namelen)
  File "./scripts/analyze-migration.py", line 53, in readstr
    return self.readvar(len).decode('utf-8')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x82 in position 55: invalid start byte

We're currently adding data to the middle of the ram section depending
on the presence of the capability. As a consequence, any code loading
the ram section needs to know about capabilities so it can interpret
the stream.

Skip the byte that's added when x-ignore-shared is used to fix the
script.

Signed-off-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-ID: <20231009184326.15777-5-farosas@suse.de>
Diffstat (limited to 'migration/qemu-file.c')
0 files changed, 0 insertions, 0 deletions