Skip to content
Snippets Groups Projects
Commit 819121b9 authored by Peter Maydell's avatar Peter Maydell Committed by Laurent Vivier
Browse files

linux-user: Zero out target_siginfo_t in force_sig()


The target_siginfo_t we populate in force_sig() will eventually
get copied onto the target's stack. Zero it out so that any extra
padding in the sifields union is consistently zero when the guest
sees it.

Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
Message-Id: <20210813131809.28655-5-peter.maydell@linaro.org>
Signed-off-by: default avatarLaurent Vivier <laurent@vivier.eu>
parent babe6d5c
No related branches found
No related tags found
No related merge requests found
......@@ -641,7 +641,7 @@ void force_sig(int sig)
{
CPUState *cpu = thread_cpu;
CPUArchState *env = cpu->env_ptr;
target_siginfo_t info;
target_siginfo_t info = {};
info.si_signo = sig;
info.si_errno = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment