Resolves: bz823124, bz823126
This commit is contained in:
parent
03fcf4e795
commit
24afa71f92
15
numactl-2.0.7-numademo-alloc.patch
Normal file
15
numactl-2.0.7-numademo-alloc.patch
Normal file
@ -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);
|
18
numactl-2.0.7-numademo-msize-check.patch
Normal file
18
numactl-2.0.7-numademo-msize-check.patch
Normal file
@ -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++) {
|
@ -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 <pholasek@redhat.com> - 2.0.7-6
|
||||
- numademo segfault fix (bz823124, bz823126)
|
||||
|
||||
* Mon Apr 16 2012 Petr Holasek <pholasek@redhat.com> - 2.0.7-5
|
||||
- Library splitted out of numactl package to numactl-libs
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user