From 2047dbef595bf77635d99d97327d5da4477154d7 Mon Sep 17 00:00:00 2001 From: Dennis Klein Date: Thu, 7 Feb 2019 04:02:00 +0100 Subject: [PATCH] Fix pmix::info copy ctor --- fairmq/plugins/PMIx/PMIx.hpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/fairmq/plugins/PMIx/PMIx.hpp b/fairmq/plugins/PMIx/PMIx.hpp index 5332b79d..cbebdb45 100644 --- a/fairmq/plugins/PMIx/PMIx.hpp +++ b/fairmq/plugins/PMIx/PMIx.hpp @@ -124,7 +124,15 @@ struct info : pmix_info_t { (void)strncpy(key, k.c_str(), PMIX_MAX_KEYLEN); flags = 0; - value = pmix::value(std::forward(args)...); + + pmix::value rhs(std::forward(args)...); + auto lhs(&value); + status rc; + PMIX_VALUE_XFER(rc, lhs, static_cast(&rhs)); + + if (rc != PMIX_SUCCESS) { + throw runtime_error("pmix::info ctor failed: rc=" + rc); + } } };