Resolves: bz 516227

This commit is contained in:
Neil Horman 2009-08-10 14:06:26 +00:00
parent 05de204252
commit ce67020455
2 changed files with 41 additions and 1 deletions

View File

@ -0,0 +1,35 @@
diff -up numactl-2.0.3/libnuma.c.orig numactl-2.0.3/libnuma.c
--- numactl-2.0.3/libnuma.c.orig 2009-08-10 09:59:24.000000000 -0400
+++ numactl-2.0.3/libnuma.c 2009-08-10 10:00:40.000000000 -0400
@@ -95,6 +95,19 @@ numa_init(void)
memset(&numa_no_nodes, 0, sizeof(numa_no_nodes));
}
+void
+numa_fini(void)
+{
+ if (numa_all_cpus_ptr)
+ numa_bitmask_free(numa_all_cpus_ptr);
+ if (numa_all_nodes_ptr)
+ numa_bitmask_free(numa_all_nodes_ptr);
+ if (numa_no_nodes_ptr)
+ numa_bitmask_free(numa_no_nodes_ptr);
+ if (nodes_allowed_list)
+ free(nodes_allowed_list);
+}
+
/*
* The following bitmask declarations, bitmask_*() routines, and associated
* _setbit() and _getbit() routines are:
diff -up numactl-2.0.3/Makefile.orig numactl-2.0.3/Makefile
--- numactl-2.0.3/Makefile.orig 2009-06-10 08:30:03.000000000 -0400
+++ numactl-2.0.3/Makefile 2009-08-10 10:00:00.000000000 -0400
@@ -81,7 +81,7 @@ stream_main.o: stream_main.c
libnuma.so.1: versions.ldscript
libnuma.so.1: libnuma.o syscall.o distance.o
- ${CC} ${LDFLAGS} -shared -Wl,-soname=libnuma.so.1 -Wl,--version-script,versions.ldscript -Wl,-init,numa_init -o libnuma.so.1 $(filter-out versions.ldscript,$^)
+ ${CC} ${LDFLAGS} -shared -Wl,-soname=libnuma.so.1 -Wl,--version-script,versions.ldscript -Wl,-init,numa_init -Wl,-fini,numa_fini -o libnuma.so.1 $(filter-out versions.ldscript,$^)
libnuma.so: libnuma.so.1
ln -sf libnuma.so.1 libnuma.so

View File

@ -1,7 +1,7 @@
Name: numactl Name: numactl
Summary: Library for tuning for Non Uniform Memory Access machines Summary: Library for tuning for Non Uniform Memory Access machines
Version: 2.0.3 Version: 2.0.3
Release: 6%{dist} Release: 7%{dist}
License: LGPLv2/GPLv2 License: LGPLv2/GPLv2
Group: System Environment/Base Group: System Environment/Base
URL: ftp://oss.sgi.com/www/projects/libnuma/download URL: ftp://oss.sgi.com/www/projects/libnuma/download
@ -11,6 +11,7 @@ Buildroot: %{_tmppath}/%{name}-buildroot
Patch0: numactl-2.0.3-rc3-distance_parsing.patch Patch0: numactl-2.0.3-rc3-distance_parsing.patch
Patch1: numactl-2.0.3-rc3-no-nodes-warning.patch Patch1: numactl-2.0.3-rc3-no-nodes-warning.patch
Patch2: numactl-2.0.3-nodes_allowed_list_obo.patch Patch2: numactl-2.0.3-nodes_allowed_list_obo.patch
Patch3: numactl-2.0.3-dso-destructor.patch
ExcludeArch: s390 s390x ExcludeArch: s390 s390x
@ -32,6 +33,7 @@ Provides development headers for numa library calls
%patch0 -p1 %patch0 -p1
%patch1 -p1 %patch1 -p1
%patch2 -p1 %patch2 -p1
%patch3 -p1
%build %build
make CFLAGS="$RPM_OPT_FLAGS -I." make CFLAGS="$RPM_OPT_FLAGS -I."
@ -73,6 +75,9 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man3/*.3* %{_mandir}/man3/*.3*
%changelog %changelog
* Mon Aug 10 2009 Neil Horman <nhorman@redhat.com> - 2.0.3-7
- Add destructor to libnuma.so to free allocated memory (bz 516227)
* Mon Aug 10 2009 Neil Horman <nhorman@redhat.com> - 2.0.3-6 * Mon Aug 10 2009 Neil Horman <nhorman@redhat.com> - 2.0.3-6
- Fix obo in nodes_allowed_list strncpy (bz 516223) - Fix obo in nodes_allowed_list strncpy (bz 516223)