]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
test/objectstore: hold split_blob cache shards in unique_ptr 69457/head
authorKefu Chai <k.chai@proxmox.com>
Sun, 14 Jun 2026 08:47:59 +0000 (16:47 +0800)
committerKefu Chai <k.chai@proxmox.com>
Tue, 16 Jun 2026 10:10:21 +0000 (18:10 +0800)
commitcdb37469b09e178b78c0ca161d0073f0842c034b
tree4a8c06beeefe61c859e75e55594ca764fa32f846
parent2286265c0a847f111529178d9a2405621449ad40
test/objectstore: hold split_blob cache shards in unique_ptr

ExtentMap.split_blob, added in be93e121a98, creates the onode and buffer cache
shards as raw pointers and never frees them. once we build with ASan,
LeakSanitizer reports them (and the structures they own):

  Direct leak of 9928 byte(s) ... BlueStore::OnodeCacheShard::create
  Direct leak of 224 byte(s) ... BlueStore::BufferCacheShard::create
  SUMMARY: AddressSanitizer: 10288 byte(s) leaked in 8 allocation(s).

every other test in this file already wraps these shards in a unique_ptr,
declared before the collection that borrows them so they outlive it. do
the same here.

Signed-off-by: Kefu Chai <k.chai@proxmox.com>
src/test/objectstore/test_bluestore_types.cc