[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v4 0/7] Tighten qemu-img rules on missing backing format

From: Eric Blake
Subject: Re: [PATCH v4 0/7] Tighten qemu-img rules on missing backing format
Date: Thu, 12 Mar 2020 17:01:10 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0

On 3/12/20 4:39 PM, address@hidden wrote:
Patchew URL: https://patchew.org/QEMU/address@hidden/


This series failed the asan build test. Please find the testing commands and
their output below. If you have Docker installed, you can probably reproduce it

export ARCH=x86_64
make docker-image-fedora V=1 NETWORK=1
time make docker-test-debug@fedora TARGET_LIST=x86_64-softmmu J=14 NETWORK=1

   CC      block/replication.o
   CC      block/throttle.o
   CC      block/copy-on-read.o
/tmp/qemu-test/src/block/sheepdog.c:2174:9: error: variable 'qdict' is used 
uninitialized whenever 'if' condition is true 
     if (backing_fmt && strcmp(backing_fmt, "sheepdog") != 0) {
/tmp/qemu-test/src/block/sheepdog.c:2241:19: note: uninitialized use occurs here
                  = NULL

Bah, real problem (and I missed it because I compiled for debug, while this error depends on -O2 for gcc to flag it). Squash this in:

diff --git i/block/sheepdog.c w/block/sheepdog.c
index 376f4ef74638..e0ea335131d9 100644
--- i/block/sheepdog.c
+++ w/block/sheepdog.c
@@ -2161,9 +2161,9 @@ static int coroutine_fn sd_co_create_opts(const char *filename, QemuOpts *opts,
                                           Error **errp)
     BlockdevCreateOptions *create_options = NULL;
-    QDict *qdict, *location_qdict;
+    QDict *qdict = NULL, *location_qdict;
     Visitor *v;
-    char *redundancy;
+    char *redundancy = NULL;
     Error *local_err = NULL;
     int ret;
     char *backing_fmt = NULL;

Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org

reply via email to

[Prev in Thread] Current Thread [Next in Thread]