lkml.org 
[lkml]   [1996]   [Nov]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: ps -f bug

On Tue, 19 Nov 1996, Mike wrote:

> Hello.. A few days ago in my mad ravings I mentioned that ps was seg faulting
> on me. It was brought to my attention that ps used to seg fault when the
> -f flag was used, and when there were > 64 processes. I have found this
> to still be true. I used "ps -fxaOp" and saw it segfault. I then used
> "ps -xaOp" and it did not segfault. I then immediatly ran ps again with
> it's first arguments, and it seg faulted.

I seem to remember being told there was another similar problem somewhere
else, but here's the one I found -

--- ps.c~ Wed Sep 25 08:22:44 1996
+++ ps.c Wed Sep 25 08:20:01 1996
@@ -515,7 +515,7 @@
node = (struct tree_node *)
malloc(sizeof(struct tree_node) * maxnodes);
}
- if (nodes > maxnodes) {
+ if (nodes >= maxnodes) {
maxnodes *= 2;
node = (struct tree_node *)
realloc(node, sizeof(struct tree_node) * maxnodes);


\
 
 \ /
  Last update: 2005-03-22 13:38    [W:0.060 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site