diff options
author | Evan Brown <ezb@google.com> | 2024-06-24 14:53:09 -0700 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2024-06-24 14:53:59 -0700 |
commit | e486af700c822704d24f50a875c0bb0bdda18052 (patch) | |
tree | b3ea58230ca0eefcfc36e55a0cf73d8083de7673 /absl/base/CMakeLists.txt | |
parent | a305e859b6d0abe6d88a3fe12c6891152cc6e859 (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.txt | 29 |
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 +) |