[Openmp-commits] [PATCH] D95167: [OpenMP] properly initialize buckets in __kmp_dephash_extend

Andrey Churbanov via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Fri Jan 22 09:31:05 PST 2021


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGedbcc17b7a0b: [OpenMP] libomp: properly initialize buckets in __kmp_dephash_extend (authored by jschuchart, committed by AndreyChurbanov).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95167/new/

https://reviews.llvm.org/D95167

Files:
  openmp/runtime/src/kmp_taskdeps.cpp


Index: openmp/runtime/src/kmp_taskdeps.cpp
===================================================================
--- openmp/runtime/src/kmp_taskdeps.cpp
+++ openmp/runtime/src/kmp_taskdeps.cpp
@@ -86,6 +86,12 @@
   h->buckets = (kmp_dephash_entry **)(h + 1);
   h->generation = gen;
   h->nconflicts = 0;
+
+  // make sure buckets are properly initialized
+  for (size_t i = 0; i < new_size; i++) {
+    h->buckets[i] = NULL;
+  }
+
   // insert existing elements in the new table
   for (size_t i = 0; i < current_dephash->size; i++) {
     kmp_dephash_entry_t *next, *entry;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D95167.318556.patch
Type: text/x-patch
Size: 575 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20210122/e9324c07/attachment.bin>


More information about the Openmp-commits mailing list