From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49026) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZnAQv-0003XS-6T for qemu-devel@nongnu.org; Fri, 16 Oct 2015 15:12:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZnAQs-0003dv-CM for qemu-devel@nongnu.org; Fri, 16 Oct 2015 15:12:53 -0400 Received: from resqmta-po-05v.sys.comcast.net ([2001:558:fe16:19:96:114:154:164]:51487) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZnAQs-0003dr-6G for qemu-devel@nongnu.org; Fri, 16 Oct 2015 15:12:50 -0400 From: Eric Blake Date: Fri, 16 Oct 2015 13:12:43 -0600 Message-Id: <1445022763-26469-1-git-send-email-eblake@redhat.com> In-Reply-To: <1444968943-11254-6-git-send-email-eblake@redhat.com> References: <1444968943-11254-6-git-send-email-eblake@redhat.com> Subject: [Qemu-devel] [PATCH v9 05.5/17] fixup to qapi: Unbox base members List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: lcapitulino@redhat.com, kraxel@redhat.com, armbru@redhat.com, mdroth@linux.vnet.ibm.com valgrind reports that our testsuite is making a branch based on uninitialized memory; and depending on compile options, the state of the stack could result in the test segfaulting. I missed the fact that we were previously relying on 'u' being fully initialized. Signed-off-by: Eric Blake --- Introduced by my patch still under review, so easiest is to squash this in rather than supply it as a separate patch. --- tests/test-qmp-output-visitor.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test-qmp-output-visitor.c b/tests/test-qmp-output-visitor.c index 88e01ea..cfb06bb 100644 --- a/tests/test-qmp-output-visitor.c +++ b/tests/test-qmp-output-visitor.c @@ -299,7 +299,8 @@ static void test_visitor_out_struct_errors(TestOutputVisitorData *data, const void *unused) { EnumOne bad_values[] = { ENUM_ONE_MAX, -1 }; - UserDefOne u, *pu = &u; + UserDefOne u = {0}; + UserDefOne *pu = &u; Error *err; int i; -- 2.4.3