Skip to content

Commit 0d37bc9

Browse files
Matan-Bxxhdx1985126
andcommitted
crimson/osd/ops_executer: pass MutFunc by value
Since we now co_await mut_func, we should not pass it by rvalue ref. ``` DEBUG 2024-09-01 15:54:46,212 [shard 0:main] osd - do_osd_ops_execute: object 2:c4c92e5a:::rbd_trash:head submitting txn ================================================================= ==17416==ERROR: AddressSanitizer: stack-use-after-return on address 0x7f590008a430 at pc 0x0000040a367a bp 0x7ffc0b1d5ff0 sp 0x7ffc0b1d5fe0 Address 0x7f590008a430 is located in stack of thread T0 at offset 48 in frame #0 0x40b0a2b in crimson::osd::PG::do_osd_ops_execute ... lambda(std::error_code const&)#1}&&)::{lambda()#1}::operator()() const (/usr/bin/ceph-osd+0x40b0a2b) ``` Co-authored-by: Xuehan Xu <[email protected]> Signed-off-by: Matan Breizman <[email protected]>
1 parent ea89f46 commit 0d37bc9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/crimson/osd/ops_executer.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ class OpsExecuter : public seastar::enable_lw_shared_from_this<OpsExecuter> {
427427
const std::vector<OSDOp>& ops,
428428
SnapMapper& snap_mapper,
429429
OSDriver& osdriver,
430-
MutFunc&& mut_func) &&;
430+
MutFunc mut_func) &&;
431431
std::vector<pg_log_entry_t> prepare_transaction(
432432
const std::vector<OSDOp>& ops);
433433
void fill_op_params(modified_by m);
@@ -513,7 +513,7 @@ OpsExecuter::flush_changes_n_do_ops_effects(
513513
const std::vector<OSDOp>& ops,
514514
SnapMapper& snap_mapper,
515515
OSDriver& osdriver,
516-
MutFunc&& mut_func) &&
516+
MutFunc mut_func) &&
517517
{
518518
const bool want_mutate = !txn.empty();
519519
// osd_op_params are instantiated by every wr-like operation.

0 commit comments

Comments
 (0)