aboutsummaryrefslogtreecommitdiffstats
path: root/util/memory/segmented_string_pool.cpp
diff options
context:
space:
mode:
authorswarmer <swarmer@yandex-team.com>2025-03-11 20:17:27 +0300
committerswarmer <swarmer@yandex-team.com>2025-03-11 20:34:27 +0300
commit1d27939449612e7fc287df4599bc3f1fc5132ea6 (patch)
treea226fc576d13be4a2b92dae264beae2bf35042ac /util/memory/segmented_string_pool.cpp
parent23da12b948bb8eddf000625913119101f91ab1ea (diff)
downloadydb-1d27939449612e7fc287df4599bc3f1fc5132ea6.tar.gz
check lifetimes of TStringBuf constructed from TString without taking into account copy-on-write semantics
`TString` is a copy-on-write type, which means that in some cases the valid lifetime of its data might extend beyond the lifetime of an individual `TString` (if it was copied). However, there are practically no cases where this behaviour is appropriate, and leaving around an "owning" `TString` is undesirable. Due to this behaviour we have previously refrained from enabling `[[clang::lifetimebound]]` for `TStringBuf` constructors, because some cases of view construction from a temporary `TString` were in fact valid. This commit enables the check, as all existing related bugs in Arcadia have been fixed. Please see the related ticket and the announcement on Этушка (link will be in the post-commit comments) for more information. commit_hash:b2b6831ac3106a4e76064b85ec2d748b415ed67c
Diffstat (limited to 'util/memory/segmented_string_pool.cpp')
0 files changed, 0 insertions, 0 deletions