diff --git a/numactl-2.0.9-hw-check-segfault.patch b/numactl-2.0.9-hw-check-segfault.patch new file mode 100644 index 0000000..094267c --- /dev/null +++ b/numactl-2.0.9-hw-check-segfault.patch @@ -0,0 +1,15 @@ +diff -up numactl-2.0.9/numactl.c.orig numactl-2.0.9/numactl.c +--- numactl-2.0.9/numactl.c.orig 2014-07-31 15:42:21.474060364 +0200 ++++ numactl-2.0.9/numactl.c 2014-07-31 15:42:32.894085763 +0200 +@@ -242,6 +242,11 @@ void hardware(void) + int prevnode=-1; + int skip=0; + int maxnode = numa_max_node(); ++ ++ if (numa_available() < 0) { ++ printf("No NUMA available on this system\n"); ++ exit(1); ++ } + + for (i=0; i<=maxnode; i++) + if (numa_bitmask_isbitset(numa_nodes_ptr, i)) diff --git a/numactl.spec b/numactl.spec index ad16b15..d08f334 100644 --- a/numactl.spec +++ b/numactl.spec @@ -1,7 +1,7 @@ Name: numactl Summary: Library for tuning for Non Uniform Memory Access machines Version: 2.0.9 -Release: 1%{dist} +Release: 2%{dist} # libnuma is LGPLv2 and GPLv2 # numactl binaries are GPLv2 only License: GPLv2 @@ -12,6 +12,8 @@ Buildroot: %{_tmppath}/%{name}-buildroot ExcludeArch: s390 s390x %{arm} +Patch1: numactl-2.0.9-hw-check-segfault.patch + %description Simple NUMA policy support. It consists of a numactl program to run other programs with a specific NUMA policy. @@ -37,6 +39,7 @@ Provides development headers for numa library calls %prep %setup -q -n %{name}-%{version} +%patch1 -p1 %build make clean @@ -85,6 +88,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man3/*.3* %changelog +* Thu Jul 31 2014 Petr Holasek 2.0.9-2 +- fixed segfault on non-NUMA systems (bz1080421) + * Wed Oct 09 2013 Petr Holasek 2.0.9-1 - rebased to version 2.0.9