Skip to contentSkip to conversation

2 bytes of memory leaking due to MigrationParameters unshadowing

Qemu-devel Christian Borntraeger 1 participant 1 message Nov 16, 2017

lore
Share & tools
lore
#0 lore raw

Markus,

valgrind complains about the following two 1 byte memory leaks during migration:

==40773== 1 bytes in 1 blocks are definitely lost in loss record 3 of 2,127

==40773==    at 0x4834E60: malloc (vg_replace_malloc.c:299)
==40773==    by 0x18B1A177: g_malloc (in /usr/lib64/libglib-2.0.so.0.5000.3)
==40773==    by 0x18B376E1: g_strdup (in /usr/lib64/libglib-2.0.so.0.5000.3)
==40773==    by 0x11B0B9B: migrate_params_test_apply (migration.c:864)
==40773==    by 0x11B0B9B: qmp_migrate_set_parameters (migration.c:989)
==40773==    by 0x11312D7: qmp_marshal_migrate_set_parameters (qmp-marshal.c:2032)
==40773==    by 0x12EA891: do_qmp_dispatch (qmp-dispatch.c:104)
==40773==    by 0x12EA891: qmp_dispatch (qmp-dispatch.c:131)
==40773==    by 0x106256F: handle_qmp_command (monitor.c:3840)
==40773==    by 0x12F0863: json_message_process_token (json-streamer.c:105)
==40773== 
==40773== 1 bytes in 1 blocks are definitely lost in loss record 4 of 2,127
==40773==    at 0x4834E60: malloc (vg_replace_malloc.c:299)
==40773==    by 0x18B1A177: g_malloc (in /usr/lib64/libglib-2.0.so.0.5000.3)
==40773==    by 0x18B376E1: g_strdup (in /usr/lib64/libglib-2.0.so.0.5000.3)
==40773==    by 0x11B0BC5: migrate_params_test_apply (migration.c:869)
==40773==    by 0x11B0BC5: qmp_migrate_set_parameters (migration.c:989)
==40773==    by 0x11312D7: qmp_marshal_migrate_set_parameters (qmp-marshal.c:2032)
==40773==    by 0x12EA891: do_qmp_dispatch (qmp-dispatch.c:104)
==40773==    by 0x12EA891: qmp_dispatch (qmp-dispatch.c:131)
==40773==    by 0x106256F: handle_qmp_command (monitor.c:3840)
==40773==    by 0x12F0863: json_message_process_token (json-streamer.c:105)

Looks like that commit 1bda8b3c6950f74482ba19e8529db72b511ba977 ("migration: Unshare MigrationParameters struct for now") created the _g_strdup leak.

It certainly is not important at all, but I wanted to report it nevertheless.

Christian