The global variable g_tid_attr_current_map is being read by other threads. To
guarantee that its modification in main thread is visible in other threads the
release fence should be set *after* the modification.
Change-Id: Iff7bdd4053baa86f13a0465e52c599396e2dcb8f
return SECURITY_MANAGER_ERROR_UNKNOWN;
}
- std::atomic_thread_fence(std::memory_order_release);
-
struct sigaction act;
struct sigaction old;
memset(&act, '\0', sizeof(act));
continue;
g_tid_attr_current_map[tid] = "/proc/self/task/" + std::to_string(tid) + "/attr/current";
+ }
+
+ std::atomic_thread_fence(std::memory_order_release);
+
+ for (auto const& t_pair : g_tid_attr_current_map) {
sent_signals_count++;
- tgkill(cur_pid, tid);
+ tgkill(cur_pid, t_pair.first);
}
LogDebug("sent_signals_count: " << sent_signals_count);