summaryrefslogtreecommitdiff
path: root/absl/base/BUILD.bazel
diff options
context:
space:
mode:
authorGravatar Evan Brown <ezb@google.com>2024-07-10 12:44:39 -0700
committerGravatar Copybara-Service <copybara-worker@google.com>2024-07-10 12:45:28 -0700
commit5b6285e7c5548adf74396650c473efb163363705 (patch)
tree969d74ba9f19d4a4b563de511aea870d629c926a /absl/base/BUILD.bazel
parentbb50cad0adb77f6afdab1d50c093aae2b36d0522 (diff)
Roll forward poisoned pointer API and fix portability issues.
Also, return the middle of the poisoned block. PiperOrigin-RevId: 651119057 Change-Id: Iae0fc3dcb40e32cd449f469d9b8d62c37f3773f4
Diffstat (limited to 'absl/base/BUILD.bazel')
-rw-r--r--absl/base/BUILD.bazel35
1 files changed, 35 insertions, 0 deletions
diff --git a/absl/base/BUILD.bazel b/absl/base/BUILD.bazel
index bc949452..96503c90 100644
--- a/absl/base/BUILD.bazel
+++ b/absl/base/BUILD.bazel
@@ -866,6 +866,41 @@ cc_test(
],
)
+cc_library(
+ name = "poison",
+ srcs = [
+ "internal/poison.cc",
+ ],
+ hdrs = ["internal/poison.h"],
+ copts = ABSL_DEFAULT_COPTS,
+ linkopts = ABSL_DEFAULT_LINKOPTS,
+ visibility = [
+ "//absl:__subpackages__",
+ ],
+ deps = [
+ ":config",
+ ":core_headers",
+ ":malloc_internal",
+ ],
+)
+
+cc_test(
+ name = "poison_test",
+ size = "small",
+ timeout = "short",
+ srcs = [
+ "internal/poison_test.cc",
+ ],
+ copts = ABSL_TEST_COPTS,
+ linkopts = ABSL_DEFAULT_LINKOPTS,
+ deps = [
+ ":config",
+ ":poison",
+ "@com_google_googletest//:gtest",
+ "@com_google_googletest//:gtest_main",
+ ],
+)
+
cc_test(
name = "unique_small_name_test",
size = "small",