Skip to content
Snippets Groups Projects
Commit 6f84aca3 authored by Ben Gamari's avatar Ben Gamari Committed by Marge Bot
Browse files

rts: Ensure that sigaction structs are initialized

I noticed these may have uninitialized fields when looking into #18037.
The reporter says that zeroing them doesn't fix the MSAN failures they
observe but zeroing them is the right thing to do regardless.
parent ffde2348
No related branches found
No related tags found
No related merge requests found
...@@ -624,7 +624,7 @@ set_sigtstp_action (bool handle) ...@@ -624,7 +624,7 @@ set_sigtstp_action (bool handle)
void void
install_vtalrm_handler(int sig, TickProc handle_tick) install_vtalrm_handler(int sig, TickProc handle_tick)
{ {
struct sigaction action; struct sigaction action = {};
action.sa_handler = handle_tick; action.sa_handler = handle_tick;
...@@ -666,7 +666,8 @@ install_vtalrm_handler(int sig, TickProc handle_tick) ...@@ -666,7 +666,8 @@ install_vtalrm_handler(int sig, TickProc handle_tick)
void void
initDefaultHandlers(void) initDefaultHandlers(void)
{ {
struct sigaction action,oact; struct sigaction action = {};
struct sigaction oact = {};
// install the SIGINT handler // install the SIGINT handler
action.sa_handler = shutdown_handler; action.sa_handler = shutdown_handler;
......
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