MacroFake d17bbc3c48
Merge bitcoin/bitcoin#25060: blockstorage: add LIFETIMEBOUND to GetFirstStoredBlock()::start_time
4cb9d214345550cb0299139b2badb73ba1e53532 blockstorage: add LIFETIMEBOUND to GetFirstStoredBlock()::start_time (Jon Atack)

Pull request description:

  Suggested in https://github.com/bitcoin/bitcoin/pull/25016#discussion_r862330288, 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.

ACKs for top commit:
  MarcoFalke:
    review ACK 4cb9d214345550cb0299139b2badb73ba1e53532

Tree-SHA512: a3f5ef83ebb6f08555d7c89f2437a682071b4ad77a7aa3326b6d2282c909bf9fcf4dac6bf05ee1d9931f2102cad4a02df5468bde1cf377d7126e84e8541604dc
2022-05-04 11:05:57 +02:00
..
2022-04-20 13:51:33 +01:00
2022-04-20 14:29:29 +01:00
2022-03-23 17:36:33 -05:00
2022-04-30 12:53:35 +02:00
2022-03-23 17:36:33 -05:00
2022-03-10 13:05:29 +01:00