Skip to content

Commit

Permalink
Fix crashes on random-value uninitialized pointers in EventSet
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikołaj Zuzek committed Feb 17, 2022
1 parent 4964199 commit 19efcf8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/services/kokkos/KokkosProfilingSymbols.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ __attribute__((weak)) void kokkosp_end_deep_copy() {
namespace cali {
extern Kokkos::Tools::Experimental::EventSet get_event_set() {
Kokkos::Tools::Experimental::EventSet my_event_set;
memset(&my_event_set, 0, sizeof(my_event_set)); // zero any pointers not set here
my_event_set.init = cali::kokkosp_init_library;
my_event_set.finalize = cali::kokkosp_finalize_library;
my_event_set.begin_parallel_for = cali::kokkosp_begin_parallel_for;
Expand Down

0 comments on commit 19efcf8

Please sign in to comment.