[Openmp-commits] [PATCH] D69491: [libomptarget] Call malloc via SafeMalloc

Jon Chesterfield via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Sun Oct 27 17:50:46 PDT 2019


JonChesterfield created this revision.
Herald added a reviewer: jdoerfert.
Herald added a project: OpenMP.
Herald added a subscriber: openmp-commits.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D69491

Files:
  openmp/libomptarget/deviceRTLs/nvptx/src/data_sharing.cu


Index: openmp/libomptarget/deviceRTLs/nvptx/src/data_sharing.cu
===================================================================
--- openmp/libomptarget/deviceRTLs/nvptx/src/data_sharing.cu
+++ openmp/libomptarget/deviceRTLs/nvptx/src/data_sharing.cu
@@ -185,8 +185,9 @@
       }
 
       if (!NewSlot) {
-        NewSlot = (__kmpc_data_sharing_slot *)malloc(
-            sizeof(__kmpc_data_sharing_slot) + NewSize);
+        NewSlot = (__kmpc_data_sharing_slot *)SafeMalloc(
+            sizeof(__kmpc_data_sharing_slot) + NewSize,
+            "Warp master slot allocation");
         DSPRINT(DSFLAG, "New slot allocated %016llx (data size=%016llx)\n",
                 (unsigned long long)NewSlot, NewSize);
       }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69491.226601.patch
Type: text/x-patch
Size: 724 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20191028/bfc65d19/attachment.bin>


More information about the Openmp-commits mailing list