[Lldb-commits] [lldb] 8a5af9e - [debugserver] Fix unintialized member variable

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Tue Apr 13 09:47:05 PDT 2021


Author: Jonas Devlieghere
Date: 2021-04-13T09:46:59-07:00
New Revision: 8a5af9e28443ce8290388439f9e36cf2727d7761

URL: https://github.com/llvm/llvm-project/commit/8a5af9e28443ce8290388439f9e36cf2727d7761
DIFF: https://github.com/llvm/llvm-project/commit/8a5af9e28443ce8290388439f9e36cf2727d7761.diff

LOG: [debugserver] Fix unintialized member variable

Caught by ubsan (__ubsan_handle_load_invalid_value_abort) when running
the unit tests.

Added: 
    

Modified: 
    lldb/tools/debugserver/source/RNBContext.h

Removed: 
    


################################################################################
diff  --git a/lldb/tools/debugserver/source/RNBContext.h b/lldb/tools/debugserver/source/RNBContext.h
index 0b46151e47857..03cd7f350e63b 100644
--- a/lldb/tools/debugserver/source/RNBContext.h
+++ b/lldb/tools/debugserver/source/RNBContext.h
@@ -46,7 +46,8 @@ class RNBContext {
   RNBContext()
       : m_pid(INVALID_NUB_PROCESS), m_pid_stop_count(0),
         m_events(0, all_event_bits), m_pid_pthread(), m_launch_status(),
-        m_arg_vec(), m_env_vec(), m_detach_on_error(false) {}
+        m_arg_vec(), m_env_vec(), m_detach_on_error(false),
+        m_unmask_signals(false) {}
 
   virtual ~RNBContext();
 
@@ -148,11 +149,11 @@ class RNBContext {
   std::string m_working_directory;
   std::string m_process_event;
   bool m_detach_on_error;
+  bool m_unmask_signals;
 
   void StartProcessStatusThread();
   void StopProcessStatusThread();
   static void *ThreadFunctionProcessStatus(void *arg);
-  bool m_unmask_signals;
 
 private:
   RNBContext(const RNBContext &rhs) = delete;


        


More information about the lldb-commits mailing list