mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-09-29 03:10:19 +00:00
[staging] onetbb: fix nullptr deref in hwloc probe (#565075)
This commit is contained in:
15
pkgs/by-name/on/onetbb/fix-hwloc-nullptr-deref.patch
Normal file
15
pkgs/by-name/on/onetbb/fix-hwloc-nullptr-deref.patch
Normal file
@@ -0,0 +1,15 @@
|
||||
diff --git a/src/tbbbind/tbb_bind.cpp b/src/tbbbind/tbb_bind.cpp
|
||||
index 26fa6747..2adccea5 100644
|
||||
--- a/src/tbbbind/tbb_bind.cpp
|
||||
+++ b/src/tbbbind/tbb_bind.cpp
|
||||
@@ -268,7 +268,9 @@ private:
|
||||
// this function calls the interface that is available in the HWLOC 2.5 only.
|
||||
#if HWLOC_API_VERSION >= 0x20500
|
||||
auto some_core = hwloc_get_next_obj_by_type(topology, HWLOC_OBJ_CORE, nullptr);
|
||||
- hwloc_get_obj_with_same_locality(topology, some_core, HWLOC_OBJ_CORE, nullptr, nullptr, 0);
|
||||
+ if (some_core) {
|
||||
+ hwloc_get_obj_with_same_locality(topology, some_core, HWLOC_OBJ_CORE, nullptr, nullptr, 0);
|
||||
+ }
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -44,6 +44,9 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
#
|
||||
# <https://github.com/uxlfoundation/oneTBB/pull/1849>
|
||||
./fix-libtbbmalloc-dlopen.patch
|
||||
|
||||
# <https://github.com/uxlfoundation/oneTBB/pull/2194>
|
||||
./fix-hwloc-nullptr-deref.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
||||
Reference in New Issue
Block a user