fix(DFRuntime): fix make_ready_future compilation with GCC 12+ (wrt. -Werror=use-after-free).

This commit is contained in:
Antoniu Pop
2023-03-09 11:41:02 +00:00
committed by Quentin Bourgerie
parent e41b2bba63
commit 604d993f28
2 changed files with 4 additions and 3 deletions

View File

@@ -91,7 +91,8 @@ install-hpx-from-source: $(HPX_LOCAL_DIR)
-DHPX_WITH_MAX_CPU_COUNT="" \
-DHPX_WITH_FETCH_ASIO=on \
-DHPX_FILESYSTEM_WITH_BOOST_FILESYSTEM_COMPATIBILITY=ON \
-DHPX_WITH_MALLOC=system ..
-DHPX_WITH_MALLOC=system \
$(CXX_COMPILER_OPTION) $(CC_COMPILER_OPTION) ..
cd $(HPX_LOCAL_DIR)/build && make -j2
$(HPX_TARBALL):

View File

@@ -54,9 +54,9 @@ typedef struct dfr_refcounted_future {
// await_future), so we only need to track the references in task
// creation.
void *_dfr_make_ready_future(void *in, size_t memref_clone_p) {
hpx::future<void *> future = hpx::make_ready_future<void *>(in);
return (void *)new dfr_refcounted_future_t(
new hpx::shared_future<void *>(hpx::make_ready_future(in)), 1,
memref_clone_p);
new hpx::shared_future<void *>(std::move(future)), 1, memref_clone_p);
}
void *_dfr_await_future(void *in) {