Suggested in #25016 (review), the lifetimebound attribute here indicates that a resource owned by the start_block
param of CBlockIndex* BlockManager::GetFirstStoredBlock()
can be retained by the method’s return value, which enables detecting the use of out-of-scope stack memory (ASan stack-use-after-scope
) at compile time.
See https://releases.llvm.org/12.0.0/tools/clang/docs/AttributeReference.html#lifetimebound and #22278 for related discussion, and #25040 for a similar example.