summaryrefslogtreecommitdiff
path: root/absl/base/CMakeLists.txt
diff options
context:
space:
mode:
authorGravatar Evan Brown <ezb@google.com>2024-06-24 14:53:09 -0700
committerGravatar Copybara-Service <copybara-worker@google.com>2024-06-24 14:53:59 -0700
commite486af700c822704d24f50a875c0bb0bdda18052 (patch)
treeb3ea58230ca0eefcfc36e55a0cf73d8083de7673 /absl/base/CMakeLists.txt
parenta305e859b6d0abe6d88a3fe12c6891152cc6e859 (diff)
Add an internal API to get a poisoned pointer.
The motivation is to make destroyed/moved-from objects cause crashes when they are accessed. PiperOrigin-RevId: 646229564 Change-Id: I68d9c189b542df0933af08f5ad63dc1f5764d856
Diffstat (limited to 'absl/base/CMakeLists.txt')
-rw-r--r--absl/base/CMakeLists.txt29
1 files changed, 29 insertions, 0 deletions
diff --git a/absl/base/CMakeLists.txt b/absl/base/CMakeLists.txt
index e010efec..4423dace 100644
--- a/absl/base/CMakeLists.txt
+++ b/absl/base/CMakeLists.txt
@@ -739,3 +739,32 @@ absl_cc_test(
absl::optional
GTest::gtest_main
)
+
+absl_cc_library(
+ NAME
+ poison
+ SRCS
+ "internal/poison.cc"
+ HDRS
+ "internal/poison.h"
+ COPTS
+ ${ABSL_DEFAULT_COPTS}
+ LINKOPTS
+ ${ABSL_DEFAULT_LINKOPTS}
+ DEPS
+ absl::config
+ absl::core_headers
+)
+
+absl_cc_test(
+ NAME
+ poison_test
+ SRCS
+ "internal/poison_test.cc"
+ COPTS
+ ${ABSL_TEST_COPTS}
+ DEPS
+ absl::config
+ absl::poison
+ GTest::gtest_main
+)