[Openmp-commits] [PATCH] D109846: [OpenMP][libomptarget] Minor fix in x86_64 plugin

Hansang Bae via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Wed Sep 15 12:32:08 PDT 2021

hbae created this revision.
hbae added a reviewer: RaviNarayanaswamy.
hbae added a project: OpenMP.
Herald added subscribers: guansong, yaxunl.
hbae requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added a subscriber: sstefan1.

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

  rG LLVM Github Monorepo



Index: openmp/libomptarget/plugins/generic-elf-64bit/src/rtl.cpp
--- openmp/libomptarget/plugins/generic-elf-64bit/src/rtl.cpp
+++ 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 @@
     for (auto &lib : DynLibs) {
       if (lib.Handle) {
-        remove(lib.FileName);
+        remove(lib.FileName.c_str());

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D109846.372773.patch
Type: text/x-patch
Size: 618 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20210915/2285e408/attachment.bin>

More information about the Openmp-commits mailing list