Re: Double free() in libc or gdb ?

2012-03-27 Thread Konstantin Belousov
On Tue, Mar 13, 2012 at 01:40:12PM +0100, Alexandre Martins wrote: > Two other thing > - The process consume memory, but there is no allocation in my code. Maybe a > leak in the libc ? No, this is a leak in rtld. I fixed it in r233546. > - My kernel have crashed after some minute of leak (i hav

Re: Double free() in libc or gdb ?

2012-03-14 Thread Alexandre Martins
On Tuesday 13 March 2012 20:44:43 you wrote: > On 2012-03-13 11:08, Alexandre Martins wrote: > > On Monday 12 March 2012 18:55:55 Konstantin Belousov wrote: > >> On Mon, Mar 12, 2012 at 05:50:33PM +0100, Alexandre Martins wrote: > ... > > >>> I have the libc compilled with "MALLOC_DEBUG" flag to d

Re: Double free() in libc or gdb ?

2012-03-13 Thread Dimitry Andric
On 2012-03-13 11:08, Alexandre Martins wrote: > On Monday 12 March 2012 18:55:55 Konstantin Belousov wrote: >> On Mon, Mar 12, 2012 at 05:50:33PM +0100, Alexandre Martins wrote: ... >>> I have the libc compilled with "MALLOC_DEBUG" flag to detect double free. >>> When i run this piece of code (atta

Re: Double free() in libc or gdb ?

2012-03-13 Thread Alexandre Martins
Dear, On Tuesday 13 March 2012 15:18:31 jb wrote: > Alexandre Martins netasq.com> writes: > > ... > > first.c: > > ... > > second.c > > ... > > main.c > > ... > > > > while(42) > > How do you exit that loop ? It's just a sample. There is no exit here, you have to kill the process. >

Re: Double free() in libc or gdb ?

2012-03-13 Thread jb
Alexandre Martins netasq.com> writes: > ... > first.c: > ... > second.c > ... > main.c > ... > while(42) How do you exit that loop ? > ... > Compilation and execution : > > gcc -shared -O0 -g second.c -o second.so > gcc -shared -O0 -g first.c -o libfirst.so > gcc -O0 -g toto.c -lfirst

Re: Double free() in libc or gdb ?

2012-03-13 Thread Alexandre Martins
On Tuesday 13 March 2012 13:17:52 Konstantin Belousov wrote: > On Tue, Mar 13, 2012 at 11:08:40AM +0100, Alexandre Martins wrote: > > On Monday 12 March 2012 18:55:55 Konstantin Belousov wrote: > > > On Mon, Mar 12, 2012 at 05:50:33PM +0100, Alexandre Martins wrote: > > > > Dear all, > > > > > > >

Re: Double free() in libc or gdb ?

2012-03-13 Thread Konstantin Belousov
On Tue, Mar 13, 2012 at 11:08:40AM +0100, Alexandre Martins wrote: > On Monday 12 March 2012 18:55:55 Konstantin Belousov wrote: > > On Mon, Mar 12, 2012 at 05:50:33PM +0100, Alexandre Martins wrote: > > > Dear all, > > > > > > I'm currently having some trouble with the dynamic loader. > > > > >

Re: Double free() in libc or gdb ?

2012-03-13 Thread Alexandre Martins
On Monday 12 March 2012 18:55:55 Konstantin Belousov wrote: > On Mon, Mar 12, 2012 at 05:50:33PM +0100, Alexandre Martins wrote: > > Dear all, > > > > I'm currently having some trouble with the dynamic loader. > > > > I have the libc compilled with "MALLOC_DEBUG" flag to detect double free. > > W

Re: Double free() in libc or gdb ?

2012-03-12 Thread Konstantin Belousov
On Mon, Mar 12, 2012 at 05:50:33PM +0100, Alexandre Martins wrote: > Dear all, > > I'm currently having some trouble with the dynamic loader. > > I have the libc compilled with "MALLOC_DEBUG" flag to detect double free. > When i run this piece of code (attached file) thought GDB, i have this > a