crimson: fix stack-use-after-return in ConfigProxy::parse_argv
ConfigProxy::parse_argv used to take std::vector<const char*>& and capture it by reference in a lambda passed to do_change(), which invokes the lambda on another shard via invoke_on. By the time the target shard ran the lambda, the caller had returned and the referenced vector was destroyed. Fix: take std::vector<std::string> by value and move it into the closure, so the data outlives the call. Convert to vector<const char*> only on the target shard, and return the unrecognized leftover args so callers still see which flags were consumed by md_config_t::parse_argv(). Signed-off-by: Alexander Indenbaum <aindenba@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com>
A
Alexander Indenbaum committed
4af86741f35de4905e1ca6b4e2b757039388e39b
Parent: befcbc6