From: Julien Grall <julien.grall@arm.com>
To: Andrii Anisov <andrii_anisov@epam.com>,
Xen Devel <xen-devel@lists.xen.org>
Cc: Wei Liu <wei.liu2@citrix.com>,
nd@arm.com, Ian Jackson <ian.jackson@eu.citrix.com>
Subject: Re: 4.9.0-rcX can not be built for ARM64
Date: Mon, 15 May 2017 09:12:55 +0100 [thread overview]
Message-ID: <3549b528-1b1e-b2aa-bad2-ffad6cb43629@arm.com> (raw)
In-Reply-To: <6f7fd7ed-867b-8a9b-60ba-5087001df9cf@epam.com>
On 13/05/2017 13:38, Andrii Anisov wrote:
> Dear All,
Hi Andrii,
>
> During the XEN 4.9.0-rc4 testing on Renesas R-Car Gen3 platform I faced
> a bug at compilation step.
Thank you for testing Xen on your board.
>
> Again, the libxl_arm_acpi.c can not be built:
>
>
> | In file included from libxl_arm.h:17:0,
> | from libxl_arm_acpi.c:19:
> | libxl_arm_acpi.c: In function 'libxl__get_acpi_size':
> | libxl_internal.h:129:44: error: 'size' may be used uninitialized in
> this function [-Werror=maybe-uninitialized]
> | (((unsigned long)(_val)+(1UL<<(_order))-1) & ~((1UL<<(_order))-1))
> | ^
> | libxl_arm_acpi.c:101:14: note: 'size' was declared here
> | uint64_t size;
> | ^
> | libxl_arm_acpi.c: In function 'libxl__prepare_acpi':
> | libxl_arm_acpi.c:152:33: error: 'size' may be used uninitialized in
> this function [-Werror=maybe-uninitialized]
> | dom->acpi_modules[0].length += ROUNDUP(acpitables[MADT].size, 3);
> | ^
> | libxl_arm_acpi.c:126:12: note: 'size' was declared here
> | size_t size;
> | ^
It looks like you compiler does not (validly?) detect that size will
always be initialized when (rc > 0). Can you try this small patch below:
diff --git a/tools/libxl/libxl_arm_acpi.c b/tools/libxl/libxl_arm_acpi.c
index db113dbf85..f61aec672b 100644
--- a/tools/libxl/libxl_arm_acpi.c
+++ b/tools/libxl/libxl_arm_acpi.c
@@ -73,6 +73,8 @@ static int libxl__estimate_madt_size(libxl__gc *gc,
{
int rc = 0;
+ *size = 0;
+
switch (info->arch_arm.gic_version) {
case LIBXL_GIC_VERSION_V2:
*size = sizeof(struct acpi_table_madt) +
Cheers,
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2017-05-15 8:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-13 12:38 4.9.0-rcX can not be built for ARM64 Andrii Anisov
2017-05-15 8:12 ` Julien Grall [this message]
2017-05-15 8:30 ` Andrii Anisov
2017-05-15 10:34 ` Julien Grall
2017-05-15 13:20 ` Andrii Anisov
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=3549b528-1b1e-b2aa-bad2-ffad6cb43629@arm.com \
--to=julien.grall@arm.com \
--cc=andrii_anisov@epam.com \
--cc=ian.jackson@eu.citrix.com \
--cc=nd@arm.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xen.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.