[procps/f13/master] fixed procps-3.2.8-threads.patch (SIGABRT) (#670289)

Jan Görig jgorig at fedoraproject.org
Tue Jan 18 14:40:53 UTC 2011


commit 6c01c5c500a3f4009e668fd7294f944c04e86335
Author: Jan Görig <jgorig at redhat.com>
Date:   Tue Jan 18 15:37:11 2011 +0100

    fixed procps-3.2.8-threads.patch (SIGABRT) (#670289)

 procps-3.2.8-threads.patch |    9 ++++-----
 procps.spec                |    5 ++++-
 2 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/procps-3.2.8-threads.patch b/procps-3.2.8-threads.patch
index 2491aa4..4c406d1 100644
--- a/procps-3.2.8-threads.patch
+++ b/procps-3.2.8-threads.patch
@@ -5,18 +5,16 @@ diff -up procps-3.2.8/top.c.threads procps-3.2.8/top.c
  #define ENTsz  sizeof(proc_t)
     static unsigned savmax = 0;          // first time, Bypass: (i)
     proc_t *ptsk = (proc_t *)-1;         // first time, Force: (ii)
-+   proc_t *saved_ptsk;
++   proc_t *saved_ptsk = NULL;
     unsigned curmax = 0;                 // every time  (jeeze)
     PROCTAB* PT;
     static int show_threads_was_enabled = 0; // optimization
-@@ -1172,6 +1173,10 @@ static proc_t **procs_refresh (proc_t **
+@@ -1172,6 +1173,8 @@ static proc_t **procs_refresh (proc_t **
        while (curmax < savmax) {
           proc_t *ttsk;
           if (unlikely(!(ptsk = readproc(PT, NULL)))) break;
 +	 if(!show_threads_was_enabled)
 +             saved_ptsk = ptsk;
-+	 else
-+	     saved_ptsk = NULL;
           show_threads_was_enabled = 1;
           while (curmax < savmax) {
              unsigned idx;
@@ -39,10 +37,11 @@ diff -up procps-3.2.8/top.c.threads procps-3.2.8/top.c
              show_threads_was_enabled = 1;
              while (1) {
                 table = alloc_r(table, (curmax + 1) * PTRsz);
-@@ -1216,6 +1222,7 @@ static proc_t **procs_refresh (proc_t **
+@@ -1216,6 +1222,8 @@ static proc_t **procs_refresh (proc_t **
                 prochlp(ttsk);
                 table[curmax++] = ttsk;
              }
++            if(saved_ptsk != ptsk) free(saved_ptsk);
 +            saved_ptsk = NULL;
              free(ptsk);   // readproc() proc_t not used
           }
diff --git a/procps.spec b/procps.spec
index ed56c1e..83acdb8 100644
--- a/procps.spec
+++ b/procps.spec
@@ -1,7 +1,7 @@
 Summary: System and process monitoring utilities
 Name: procps
 Version: 3.2.8
-Release: 7%{?dist}
+Release: 8%{?dist}
 License: GPLv2+ and LGPLv2+
 Group: Applications/System
 URL: http://procps.sourceforge.net
@@ -195,6 +195,9 @@ rm -rf %{buildroot}
 %attr(0644,root,root) %{_mandir}/man5/*
 
 %changelog
+* Tue Jan 11 2011 Jan Görig <jgorig at redhat.com> 3.2.8-8
+- fixed procps-3.2.8-threads.patch (SIGABRT) (#670289)
+
 * Mon Feb 08 2010 Daniel Novotny <dnovotny at redhat.com> 3.2.8-7
 - fixed the last pmap(1) patch
 


More information about the scm-commits mailing list