On 12.01.22 14:54, Ralf Ramsauer wrote:
On 12/01/2022 07:56, Peng Fan (OSS) wrote:
From: Peng Fan <[email protected]>
With gcc 5.15, met the following error
hypervisor/arch/arm64/control.c:33:9:
error: ‘memset’ offset [0, 255] is out of the bounds [0, 0]
[-Werror=array-bounds]
33 | memset(&this_cpu_data()->guest_regs, 0, sizeof(union
registers));
|
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I see the same error on gcc-11.1.
My local workaround is to add -ffreestanding to hypervisor/Makefile, as
this avoids builtin gcc-magic such as undesired inlining of memsets with
constant size.
We already use -ffreestanding for inmates, and I guess we should do it
for the hypervisor as well.
The kernel uses -ffreestanding at least for its (generic) string
functions. So for us maybe
CFLAGS_lib.o := -freestanding
?
Jan
--
Siemens AG, Technology
Competence Center Embedded Linux
--
You received this message because you are subscribed to the Google Groups
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jailhouse-dev/c53301ae-6590-1d58-083b-1de362fb12c3%40siemens.com.