[Openmp-commits] [openmp] ae2a5fa - [OpenMP][libomptarget] Minor fix in x86_64 plugin

Hansang Bae via Openmp-commits openmp-commits at lists.llvm.org
Wed Sep 15 13:57:36 PDT 2021


Author: Hansang Bae
Date: 2021-09-15T15:57:06-05:00
New Revision: ae2a5facce96dfe1efcb7111ee1ef0d91c956276

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

LOG: [OpenMP][libomptarget] Minor fix in x86_64 plugin

Call to remove() was passing invalid address for the file name.

Differential Revision: https://reviews.llvm.org/D109846

Added: 
    

Modified: 
    openmp/libomptarget/plugins/generic-elf-64bit/src/rtl.cpp

Removed: 
    


################################################################################
diff  --git a/openmp/libomptarget/plugins/generic-elf-64bit/src/rtl.cpp b/openmp/libomptarget/plugins/generic-elf-64bit/src/rtl.cpp
index 27cb39c5dcf6a..c512e6124de3b 100644
--- a/openmp/libomptarget/plugins/generic-elf-64bit/src/rtl.cpp
+++ b/openmp/libomptarget/plugins/generic-elf-64bit/src/rtl.cpp
@@ -41,7 +41,7 @@
 
 /// Array of Dynamic libraries loaded for this target.
 struct DynLibTy {
-  char *FileName;
+  std::string FileName;
   void *Handle;
 };
 
@@ -100,7 +100,7 @@ class RTLDeviceInfoTy {
     for (auto &lib : DynLibs) {
       if (lib.Handle) {
         dlclose(lib.Handle);
-        remove(lib.FileName);
+        remove(lib.FileName.c_str());
       }
     }
   }


        


More information about the Openmp-commits mailing list