Skip to content

Commit

Permalink
exec.c: Initialize sa_flags passed to sigaction()
Browse files Browse the repository at this point in the history
Coverity points out that in the user-only version of cpu_abort() we
call sigaction() with a partially initialized struct sigaction
(CID 1005351). Correct the omission.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20180515182700.31736-1-peter.maydell@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
  • Loading branch information
pm215 authored and bonzini committed Jun 1, 2018
1 parent 4f938cb commit 8347c18
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions exec.c
Expand Up @@ -1124,6 +1124,7 @@ void cpu_abort(CPUState *cpu, const char *fmt, ...)
struct sigaction act;
sigfillset(&act.sa_mask);
act.sa_handler = SIG_DFL;
act.sa_flags = 0;
sigaction(SIGABRT, &act, NULL);
}
#endif
Expand Down

0 comments on commit 8347c18

Please sign in to comment.