[Openmp-commits] [openmp] 1776dc8 - [Libomptarget][Obvious] Fix uninitialized pointer

Joseph Huber via Openmp-commits openmp-commits at lists.llvm.org
Tue Jul 11 13:42:30 PDT 2023


Author: Joseph Huber
Date: 2023-07-11T15:41:46-05:00
New Revision: 1776dc81240cab4e365d55bc720b552823697081

URL: https://github.com/llvm/llvm-project/commit/1776dc81240cab4e365d55bc720b552823697081
DIFF: https://github.com/llvm/llvm-project/commit/1776dc81240cab4e365d55bc720b552823697081.diff

LOG: [Libomptarget][Obvious] Fix uninitialized pointer

Summary:
This pointer was not initliazed to null which meant that it would be
erronenously deleted by plugins that were not in use.

Added: 
    

Modified: 
    openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.h

Removed: 
    


################################################################################
diff  --git a/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.h b/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.h
index 923bf962732ef5..f21c2659a140b6 100644
--- a/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.h
+++ b/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.h
@@ -877,7 +877,8 @@ struct GenericPluginTy {
 
   /// Construct a plugin instance.
   GenericPluginTy(Triple::ArchType TA)
-      : RequiresFlags(OMP_REQ_UNDEFINED), GlobalHandler(nullptr), JIT(TA) {}
+      : RequiresFlags(OMP_REQ_UNDEFINED), GlobalHandler(nullptr), JIT(TA),
+        RPCServer(nullptr) {}
 
   virtual ~GenericPluginTy() {}
 


        


More information about the Openmp-commits mailing list