Message ID | 20231206210524.20974-3-laurent.pinchart@ideasonboard.com |
---|---|
State | Accepted |
Commit | db3147743368b14b3ed218cb3f6026cb7963d77c |
Headers | show |
Series |
|
Related | show |
Quoting Laurent Pinchart via libcamera-devel (2023-12-06 21:05:20) > If the process fails to exit before the timeout, the > LogProcessTest::exitStatus_ variable gets used uninitialized. Fix it by > initializating to Process::NotExited. Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> > > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > --- > test/log/log_process.cpp | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/test/log/log_process.cpp b/test/log/log_process.cpp > index 17af7d74a1d5..f7635b70255c 100644 > --- a/test/log/log_process.cpp > +++ b/test/log/log_process.cpp > @@ -139,7 +139,7 @@ private: > ProcessManager processManager_; > > Process proc_; > - Process::ExitStatus exitStatus_; > + Process::ExitStatus exitStatus_ = Process::NotExited; > string logPath_; > int exitCode_; > int num_; > -- > Regards, > > Laurent Pinchart >
Hi Laurent, On 12/7/23 2:35 AM, Laurent Pinchart via libcamera-devel wrote: > If the process fails to exit before the timeout, the > LogProcessTest::exitStatus_ variable gets used uninitialized. Fix it by > initializating to Process::NotExited. > > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> > --- > test/log/log_process.cpp | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/test/log/log_process.cpp b/test/log/log_process.cpp > index 17af7d74a1d5..f7635b70255c 100644 > --- a/test/log/log_process.cpp > +++ b/test/log/log_process.cpp > @@ -139,7 +139,7 @@ private: > ProcessManager processManager_; > > Process proc_; > - Process::ExitStatus exitStatus_; > + Process::ExitStatus exitStatus_ = Process::NotExited; > string logPath_; > int exitCode_; > int num_;
diff --git a/test/log/log_process.cpp b/test/log/log_process.cpp index 17af7d74a1d5..f7635b70255c 100644 --- a/test/log/log_process.cpp +++ b/test/log/log_process.cpp @@ -139,7 +139,7 @@ private: ProcessManager processManager_; Process proc_; - Process::ExitStatus exitStatus_; + Process::ExitStatus exitStatus_ = Process::NotExited; string logPath_; int exitCode_; int num_;
If the process fails to exit before the timeout, the LogProcessTest::exitStatus_ variable gets used uninitialized. Fix it by initializating to Process::NotExited. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> --- test/log/log_process.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)