From 205f968dad8bc138e6377d59f52f5572a6f6ae88 Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Tue, 20 Feb 2024 16:43:16 -0800 Subject: [PATCH] crimson/.../shard_services.cc: pass by reference from do_with Capturing the value passed by do_with by value causes later captures by reference to be invalid past the lifetime of the lambda frame. Fixes: https://tracker.ceph.com/issues/64513 Signed-off-by: Samuel Just (cherry picked from commit e03495dca75be80f642453782ab7793c3c72712e) --- src/crimson/osd/shard_services.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/crimson/osd/shard_services.cc b/src/crimson/osd/shard_services.cc index e20e310dc2cc7..8140ca3f91d54 100644 --- a/src/crimson/osd/shard_services.cc +++ b/src/crimson/osd/shard_services.cc @@ -808,7 +808,7 @@ seastar::future> OSDSingletonState::build_incremental_map_msg( crimson::make_message( monc.get_fsid(), osdmap->get_encoding_features()), - [this, &first, FNAME, last](unsigned int map_message_max, + [this, &first, FNAME, last](auto &map_message_max, auto &m) { m->cluster_osdmap_trim_lower_bound = superblock.cluster_osdmap_trim_lower_bound; m->newest_map = superblock.get_newest_map(); -- 2.39.5