Skip to content

fixes for rc4 #696

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,21 @@ elseif(WINDOWS AND NOT UMF_DISABLE_HWLOC)
set(HWLOC_ENABLE_TESTING OFF)
set(HWLOC_SKIP_LSTOPO ON)
set(HWLOC_SKIP_TOOLS ON)
set(HWLOC_PATCH
git
apply
${PROJECT_SOURCE_DIR}/cmake/fix_coverity_issues.patch
||
true)

message(STATUS "Will fetch hwloc from ${UMF_HWLOC_REPO}")

FetchContent_Declare(
hwloc_targ
GIT_REPOSITORY ${UMF_HWLOC_REPO}
GIT_TAG ${UMF_HWLOC_TAG}
SOURCE_SUBDIR contrib/windows-cmake/ FIND_PACKAGE_ARGS)
PATCH_COMMAND ${HWLOC_PATCH} SOURCE_SUBDIR contrib/windows-cmake/
FIND_PACKAGE_ARGS)

FetchContent_GetProperties(hwloc_targ)
if(NOT hwloc_targ_POPULATED)
Expand All @@ -153,12 +160,20 @@ elseif(WINDOWS AND NOT UMF_DISABLE_HWLOC)
message(STATUS " LIBHWLOC_LIBRARY_DIRS = ${LIBHWLOC_LIBRARY_DIRS}")
elseif(NOT UMF_DISABLE_HWLOC)
include(FetchContent)
set(HWLOC_PATCH
git
apply
${PROJECT_SOURCE_DIR}/cmake/fix_coverity_issues.patch
||
true)

message(STATUS "Will fetch hwloc from ${UMF_HWLOC_REPO}")

FetchContent_Declare(
hwloc_targ
GIT_REPOSITORY ${UMF_HWLOC_REPO}
GIT_TAG ${UMF_HWLOC_TAG})
GIT_TAG ${UMF_HWLOC_TAG}
PATCH_COMMAND ${HWLOC_PATCH})

FetchContent_GetProperties(hwloc_targ)
if(NOT hwloc_targ_POPULATED)
Expand Down
14 changes: 14 additions & 0 deletions cmake/fix_coverity_issues.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/hwloc/topology-x86.c b/hwloc/topology-x86.c
index 7aabd168f..b01e44557 100644
--- a/hwloc/topology-x86.c
+++ b/hwloc/topology-x86.c
@@ -1375,6 +1375,9 @@ look_procs(struct hwloc_backend *backend, struct procinfo *infos, unsigned long
hwloc_bitmap_t set = NULL;
unsigned i;

+ if(!get_cpubind||!set_cpubind)
+ return -1;
+
if (!data->src_cpuiddump_path) {
orig_cpuset = hwloc_bitmap_alloc();
if (get_cpubind(topology, orig_cpuset, HWLOC_CPUBIND_STRICT)) {
Loading