[compiler-rt] e0b5e5a - [compiler-rt] Use empty SuspendedThreadsList for Fuchsia
Petr Hosek via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 3 11:34:23 PST 2020
Author: Petr Hosek
Date: 2020-11-03T11:34:13-08:00
New Revision: e0b5e5a9d89c9f04f12ab91922507b4561ebbc7a
URL: https://github.com/llvm/llvm-project/commit/e0b5e5a9d89c9f04f12ab91922507b4561ebbc7a
DIFF: https://github.com/llvm/llvm-project/commit/e0b5e5a9d89c9f04f12ab91922507b4561ebbc7a.diff
LOG: [compiler-rt] Use empty SuspendedThreadsList for Fuchsia
d48f2d7 made destructor of SuspendedThreadsList protected, so we need
an empty subclass to pass to the callback now.
Differential Revision: https://reviews.llvm.org/D90695
Added:
compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_fuchsia.h
Modified:
compiler-rt/lib/lsan/lsan_common_fuchsia.cpp
compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_fuchsia.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/lsan/lsan_common_fuchsia.cpp b/compiler-rt/lib/lsan/lsan_common_fuchsia.cpp
index caedbf155969..3c62c9433d3d 100644
--- a/compiler-rt/lib/lsan/lsan_common_fuchsia.cpp
+++ b/compiler-rt/lib/lsan/lsan_common_fuchsia.cpp
@@ -19,6 +19,7 @@
#include "lsan_allocator.h"
#include "sanitizer_common/sanitizer_flags.h"
+#include "sanitizer_common/sanitizer_stoptheworld_fuchsia.h"
#include "sanitizer_common/sanitizer_thread_registry.h"
// Ensure that the Zircon system ABI is linked in.
@@ -147,7 +148,7 @@ void LockStuffAndStopTheWorld(StopTheWorldCallback callback,
¶ms->argument->frontier);
}
- params->callback({}, params->argument);
+ params->callback(SuspendedThreadsListFuchsia(), params->argument);
},
¶ms);
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_fuchsia.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_fuchsia.cpp
index 3a246443ed99..91bf19e40dad 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_fuchsia.cpp
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_fuchsia.cpp
@@ -17,6 +17,7 @@
#include <zircon/sanitizer.h>
#include "sanitizer_stoptheworld.h"
+#include "sanitizer_stoptheworld_fuchsia.h"
namespace __sanitizer {
@@ -32,7 +33,7 @@ void StopTheWorld(StopTheWorldCallback callback, void *argument) {
nullptr, nullptr, nullptr, nullptr,
[](zx_status_t, void *data) {
auto params = reinterpret_cast<Params *>(data);
- params->callback({}, params->argument);
+ params->callback(SuspendedThreadsListFuchsia(), params->argument);
},
¶ms);
}
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_fuchsia.h b/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_fuchsia.h
new file mode 100644
index 000000000000..6d9ead605086
--- /dev/null
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_fuchsia.h
@@ -0,0 +1,20 @@
+//===-- sanitizer_stoptheworld_fuchsia.h ------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef SANITIZER_STOPTHEWORLD_FUCHSIA_H
+#define SANITIZER_STOPTHEWORLD_FUCHSIA_H
+
+#include "sanitizer_stoptheworld.h"
+
+namespace __sanitizer {
+
+class SuspendedThreadsListFuchsia final : public SuspendedThreadsList {};
+
+} // namespace __sanitizer
+
+#endif // SANITIZER_STOPTHEWORLD_FUCHSIA_H
More information about the llvm-commits
mailing list