-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[compiler-rt] Add weak defs for .*contiguous_container.* functions #120376
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
1ff1273
to
aa9fc4d
Compare
@llvm/pr-subscribers-compiler-rt-sanitizer Author: Dmitry Chestnykh (chestnykh) ChangesFix #120278 Full diff: https://github.com/llvm/llvm-project/pull/120376.diff 3 Files Affected:
diff --git a/compiler-rt/lib/sanitizer_common/CMakeLists.txt b/compiler-rt/lib/sanitizer_common/CMakeLists.txt
index 09391e4f5f3704..9eb47e21863cb9 100644
--- a/compiler-rt/lib/sanitizer_common/CMakeLists.txt
+++ b/compiler-rt/lib/sanitizer_common/CMakeLists.txt
@@ -4,6 +4,7 @@
set(SANITIZER_SOURCES_NOTERMINATION
sanitizer_allocator.cpp
sanitizer_common.cpp
+ sanitizer_contiguous_container.cpp
sanitizer_deadlock_detector1.cpp
sanitizer_deadlock_detector2.cpp
sanitizer_errno.cpp
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_common_interface.inc b/compiler-rt/lib/sanitizer_common/sanitizer_common_interface.inc
index 4ea75cdd67cb93..900a99329d56c7 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_common_interface.inc
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_common_interface.inc
@@ -8,18 +8,18 @@
// Sanitizer Common interface list.
//===----------------------------------------------------------------------===//
INTERFACE_FUNCTION(__sanitizer_acquire_crash_state)
-INTERFACE_FUNCTION(__sanitizer_annotate_contiguous_container)
-INTERFACE_FUNCTION(__sanitizer_annotate_double_ended_contiguous_container)
-INTERFACE_FUNCTION(__sanitizer_copy_contiguous_container_annotations)
-INTERFACE_FUNCTION(__sanitizer_contiguous_container_find_bad_address)
-INTERFACE_FUNCTION(
+INTERFACE_WEAK_FUNCTION(__sanitizer_annotate_contiguous_container)
+INTERFACE_WEAK_FUNCTION(__sanitizer_annotate_double_ended_contiguous_container)
+INTERFACE_WEAK_FUNCTION(__sanitizer_copy_contiguous_container_annotations)
+INTERFACE_WEAK_FUNCTION(__sanitizer_contiguous_container_find_bad_address)
+INTERFACE_WEAK_FUNCTION(
__sanitizer_double_ended_contiguous_container_find_bad_address)
INTERFACE_FUNCTION(__sanitizer_set_death_callback)
INTERFACE_FUNCTION(__sanitizer_set_report_path)
INTERFACE_FUNCTION(__sanitizer_set_report_fd)
INTERFACE_FUNCTION(__sanitizer_get_report_path)
-INTERFACE_FUNCTION(__sanitizer_verify_contiguous_container)
-INTERFACE_FUNCTION(__sanitizer_verify_double_ended_contiguous_container)
+INTERFACE_WEAK_FUNCTION(__sanitizer_verify_contiguous_container)
+INTERFACE_WEAK_FUNCTION(__sanitizer_verify_double_ended_contiguous_container)
INTERFACE_WEAK_FUNCTION(__sanitizer_on_print)
INTERFACE_WEAK_FUNCTION(__sanitizer_report_error_summary)
INTERFACE_WEAK_FUNCTION(__sanitizer_sandbox_on_notify)
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_contiguous_container.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_contiguous_container.cpp
new file mode 100644
index 00000000000000..4c093c1d4e9189
--- /dev/null
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_contiguous_container.cpp
@@ -0,0 +1,53 @@
+//===-- sanitizer_contiguous_container.cpp
+//-----------------------------------------------===//
+//
+// 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
+//
+//===---------------------------------------------------------------------===//
+//
+// This file provides weak defs of __sanitizer*contiguous_container* functions
+// whose strong implementations can be defined in particular runtime libs
+// of sanitizers
+//
+//===---------------------------------------------------------------------===//
+
+#include "sanitizer_internal_defs.h"
+
+SANITIZER_INTERFACE_WEAK_DEF(void, __sanitizer_annotate_contiguous_container,
+ const void *, const void *, const void *,
+ const void *) {}
+
+SANITIZER_INTERFACE_WEAK_DEF(
+ void, __sanitizer_annotate_double_ended_contiguous_container, const void *,
+ const void *, const void *, const void *, const void *, const void *) {}
+
+SANITIZER_INTERFACE_WEAK_DEF(void,
+ __sanitizer_copy_contiguous_container_annotations,
+ const void *, const void *, const void *,
+ const void *) {}
+
+SANITIZER_INTERFACE_WEAK_DEF(int, __sanitizer_verify_contiguous_container,
+ const void *, const void *, const void *) {
+ return 0;
+}
+
+SANITIZER_INTERFACE_WEAK_DEF(
+ int, __sanitizer_verify_double_ended_contiguous_container, const void *,
+ const void *, const void *, const void *) {
+ return 0;
+}
+
+SANITIZER_INTERFACE_WEAK_DEF(const void *,
+ __sanitizer_contiguous_container_find_bad_address,
+ const void *, const void *, const void *) {
+ return nullptr;
+}
+
+SANITIZER_INTERFACE_WEAK_DEF(
+ const void *,
+ __sanitizer_double_ended_contiguous_container_find_bad_address,
+ const void *, const void *, const void *, const void *) {
+ return nullptr;
+}
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/51/builds/8027 Here is the relevant piece of the build log for the reference
|
Failures are unrelated |
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/107/builds/6270 Here is the relevant piece of the build log for the reference
|
This looks related, though. Container annotation-related tests hang on Windows. I'll prepare a revert. |
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/64/builds/1769 Here is the relevant piece of the build log for the reference
|
Fix #120278