diff --git a/src/client/linux/handler/exception_handler.cc b/src/client/linux/handler/exception_handler.cc index a41e8c58..b895f6d7 100644 --- a/src/client/linux/handler/exception_handler.cc +++ b/src/client/linux/handler/exception_handler.cc @@ -549,7 +549,7 @@ bool ExceptionHandler::GenerateDump(CrashContext *context) { // Allow the child to ptrace us sys_prctl(PR_SET_PTRACER, child, 0, 0, 0); SendContinueSignalToChild(); - int status; + int status = 0; const int r = HANDLE_EINTR(sys_waitpid(child, &status, __WALL)); sys_close(fdes[1]); diff --git a/src/client/linux/handler/exception_handler.h b/src/client/linux/handler/exception_handler.h index d246f601..1695a2b7 100644 --- a/src/client/linux/handler/exception_handler.h +++ b/src/client/linux/handler/exception_handler.h @@ -262,7 +262,7 @@ class ExceptionHandler { // can do this. We create a pipe which we can use to block the // cloned process after creating it, until we have explicitly enabled // ptrace. This is used to store the file descriptors for the pipe - int fdes[2]; + int fdes[2] = {-1, -1}; // Callers can add extra info about mappings for cases where the // dumper code cannot extract enough information from /proc//maps.