diff --git a/numactl-2.0.7-numademo-alloc.patch b/numactl-2.0.7-numademo-alloc.patch new file mode 100644 index 0000000..6445054 --- /dev/null +++ b/numactl-2.0.7-numademo-alloc.patch @@ -0,0 +1,15 @@ +diff -up numactl-2.0.7/numademo.c.orig numactl-2.0.7/numademo.c +--- numactl-2.0.7/numademo.c.orig 2012-02-15 11:47:10.617212257 +0100 ++++ numactl-2.0.7/numademo.c 2012-02-15 11:47:38.570214219 +0100 +@@ -156,6 +156,11 @@ void memtest(char *name, unsigned char * + int i; + char title[128], result[128]; + ++ if (!mem) { ++ fprintf(stderr,"Failed to allocate %lu bytes of memory. Test \"%s\" exits.\n", msize, name); ++ return; ++ } ++ + #ifdef HAVE_STREAM_LIB + if (thistest == STREAM) { + do_stream(name, mem); diff --git a/numactl-2.0.7-numademo-msize-check.patch b/numactl-2.0.7-numademo-msize-check.patch new file mode 100644 index 0000000..952aed1 --- /dev/null +++ b/numactl-2.0.7-numademo-msize-check.patch @@ -0,0 +1,18 @@ +diff -up numactl-2.0.7/numademo.c.orig numactl-2.0.7/numademo.c +--- numactl-2.0.7/numademo.c.orig 2012-02-15 12:35:33.450409388 +0100 ++++ numactl-2.0.7/numademo.c 2012-02-15 12:37:20.094416633 +0100 +@@ -522,7 +522,13 @@ int main(int ac, char **av) + #ifdef HAVE_STREAM_LIB + test(STREAM); + #endif +- test(PTRCHASE); ++ if (msize >= sizeof(union node)) { ++ test(PTRCHASE); ++ } else { ++ fprintf(stderr, "You must set msize at least %lu bytes for ptrchase test.\n", ++ sizeof(union node)); ++ exit(1); ++ } + } else { + int k; + for (k = 2; k < ac; k++) { diff --git a/numactl.spec b/numactl.spec index 6991e8c..e42c377 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.7 -Release: 5%{dist} +Release: 6%{dist} License: LGPLv2/GPLv2 Group: System Environment/Base URL: ftp://oss.sgi.com/www/projects/libnuma/download @@ -10,6 +10,8 @@ Buildroot: %{_tmppath}/%{name}-buildroot Patch1: numactl-2.0.3-rc3-no-nodes-warning.patch Patch2: numactl-2.0.7-manpages.patch +Patch3: numactl-2.0.7-numademo-alloc.patch +Patch4: numactl-2.0.7-numademo-msize-check.patch ExcludeArch: s390 s390x %{arm} @@ -49,6 +51,8 @@ do not reference it or depend on it in any way. %setup -q -n %{name}-%{version} %patch1 -p1 %patch2 -p1 +%patch3 -p1 +%patch4 -p1 %build make CFLAGS="$RPM_OPT_FLAGS -I." @@ -95,6 +99,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man3/*.3* %changelog +* Sat May 19 2012 Petr Holasek - 2.0.7-6 +- numademo segfault fix (bz823124, bz823126) + * Mon Apr 16 2012 Petr Holasek - 2.0.7-5 - Library splitted out of numactl package to numactl-libs