From: Daniel Hoffman <dhoff749@gmail.com>
To: qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org, "Daniel Hoffman" <dhoff749@gmail.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Daniel P. Berrangé" <berrange@redhat.com>,
"Eduardo Habkost" <eduardo@habkost.net>
Subject: [PATCH] hw/core: define stack variable to NULL to fix qtest with sanitizers
Date: Thu, 23 Nov 2023 17:53:12 -0800 [thread overview]
Message-ID: <20231124015312.544422-1-dhoff749@gmail.com> (raw)
This was the only failure preventing `make check` from passing with sanitizers
enabled on my configuration.
Signed-off-by: Daniel Hoffman <dhoff749@gmail.com>
---
hw/core/qdev-properties.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c
index 91632f7be9f..4caa78b7bc5 100644
--- a/hw/core/qdev-properties.c
+++ b/hw/core/qdev-properties.c
@@ -690,7 +690,7 @@ static void get_prop_array(Object *obj, Visitor *v, const char *name,
uint32_t *alenptr = object_field_prop_ptr(obj, prop);
void **arrayptr = (void *)obj + prop->arrayoffset;
char *elem = *arrayptr;
- GenericList *list;
+ GenericList *list = NULL;
const size_t list_elem_size = sizeof(*list) + prop->arrayfieldsize;
int i;
bool ok;
--
2.40.1
next reply other threads:[~2023-11-24 1:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-24 1:53 Daniel Hoffman [this message]
2023-11-24 10:07 ` [PATCH] hw/core: define stack variable to NULL to fix qtest with sanitizers Philippe Mathieu-Daudé
2023-11-24 13:39 ` Markus Armbruster
2023-11-24 14:02 ` Markus Armbruster
2023-11-24 16:59 ` Dan Hoffman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231124015312.544422-1-dhoff749@gmail.com \
--to=dhoff749@gmail.com \
--cc=berrange@redhat.com \
--cc=eduardo@habkost.net \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).