In getfileinfo() in search.c, it does:
while ((c = fgetc (fp)) != 0);
which should really be:
while ((c = fgetc (fp)) != 0 && c != EOF);
It probably shouldn't ever hit the EOF, but you never know. The same
thing is true of the for() loop this is enclosed in, and you probably
want to change the "if (c == 0)" below the for loop to be "if (c == 0 ||
c == EOF)".
This should at least prevent it from getting stuck in a loop. I can't
guarantee that something else odd won't happen. (I haven't traced back
up to see what the callers of getfileinfo() do with any results.)
Jim
On Nov 29, Jonathan Roy wrote:
>
> FInally found a runaway process with swish-e. However, I didn't realize
> the bin was striped so no debugging symbols. I recompiled and installed a
> -g version and removed the strip command, so if it happens again I might
> have a better stack trace for you.
>
> PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND
> 8283 nobody -3 0 1448K 736K run 199:46 23.70% 23.94% swish-e
>
> (gdb) where
> #0 0xef6b8884 in _read ()
> #1 0xef6eb628 in __filbuf ()
> #2 0xef6ef3b8 in getc_unlocked ()
> #3 0x16b18 in getfileinfo ()
> #4 0x16a1c in operate ()
>
>
> Indexing happens under a user account, so it wasn't an indexing run.
>
> -Jonathan
>
>
> --
> Jonathan Roy - roy@idle.com - Idle Communications, Inc.
Received on Sat Nov 29 13:39:34 1997