Bug#102437: dealloc analysis for each server function, more bugs!

2001-06-27 Thread Marcus Brinkmann
Hi, ok, here a detailed analysis. It seems I found four other bugs along the way. ;) On Wed, Jun 27, 2001 at 12:35:25PM +0200, Marcus Brinkmann wrote: > routine proc_getprocinfo ( > process: process_t; > which: pid_t; > inout flags: int; > - out procinfo:

Bug#102437: dealloc analysis for each server function, more bugs!

2001-06-27 Thread Marcus Brinkmann
On Wed, Jun 27, 2001 at 02:52:17PM +0200, Marcus Brinkmann wrote: > So, this should not use dealloc. However, idvec->ids is NOT a mmap'ed > buffer! It is a malloced/realloced buffer (coming from > libshouldbeinlibc/idvec.c). > > Is it correct that this should better use iohelp_return_malloced_b

Bug#102437: dealloc missing on out parameters (was: Re: Bug#102437: proc leaks memory with the bootstrap filesystem entry

2001-06-27 Thread Roland McGrath
You need to look at each individual server function and see what is the right thing for it. There is no generic answer (some things are copying data they hold elsewhere, some should dealloc). Note there is also `dealloc[]' to give an argument the server can fill in. ___

Bug#102437: dealloc missing on out parameters (was: Re: Bug#102437: proc leaks memory with the bootstrap filesystem entry

2001-06-27 Thread Marcus Brinkmann
On Wed, Jun 27, 2001 at 03:59:03AM +0200, Marcus Brinkmann wrote: > this is really a nice obscure bug. Oh man. This is a prime example for what you can read out of data if you want to. The real cause of the bug is the allocation of *piarray, which only happens if the number of threads in the ta

Bug#102437: proc leaks memory with the bootstrap filesystem entry

2001-06-27 Thread Marcus Brinkmann
On Wed, Jun 27, 2001 at 03:59:03AM +0200, Marcus Brinkmann wrote: > To prove that PID 4 is the only process with this > problem, the below program iterates over all pids. If you specify any command > line arguments, it will skip PID 4. In this case, no memory is leaked. #define _GNU_SOURCE #in