diff options
author | Derek Mauro <dmauro@google.com> | 2023-07-26 07:57:53 -0700 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2023-07-26 07:58:37 -0700 |
commit | c108cd0382a3659eaf2981b22392b4d5fbc122db (patch) | |
tree | cc9eba441a839e6c75bfb8b0e7aeb2ce2120e1e3 /absl/container/inlined_vector_test.cc | |
parent | 511ad6492eabb7797910ce8689577c45f57bce40 (diff) | |
download | abseil-c108cd0382a3659eaf2981b22392b4d5fbc122db.tar.gz abseil-c108cd0382a3659eaf2981b22392b4d5fbc122db.tar.bz2 abseil-c108cd0382a3659eaf2981b22392b4d5fbc122db.zip |
InlinedVector: Disable CFI checking on GetInlinedData()
GetInlinedDataUninitialized() is removed. Just use GetInlinedData() in
all cases instead. GetInlinedData() is sometimes used to return
uninitialized memory. In these cases it is immediately constructed.
This is a followup to 511ad64. See also:
https://clang.llvm.org/docs/ControlFlowIntegrity.html#bad-cast-checking.
PiperOrigin-RevId: 551205766
Change-Id: I4ddb45e29a723ccf6fc7dc203e762f4ad559fc83
Diffstat (limited to 'absl/container/inlined_vector_test.cc')
-rw-r--r-- | absl/container/inlined_vector_test.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/absl/container/inlined_vector_test.cc b/absl/container/inlined_vector_test.cc index 07304518..5acad650 100644 --- a/absl/container/inlined_vector_test.cc +++ b/absl/container/inlined_vector_test.cc @@ -1626,6 +1626,12 @@ TEST(DynamicVec, CreateNonEmptyDynamicVec) { EXPECT_EQ(v.size(), 1u); } +TEST(DynamicVec, EmplaceBack) { + DynamicVec v; + v.emplace_back(Dynamic{}); + EXPECT_EQ(v.size(), 1u); +} + TEST(AllocatorSupportTest, Constructors) { using MyAlloc = CountingAllocator<int>; using AllocVec = absl::InlinedVector<int, 4, MyAlloc>; |