Re: Memory leaks in compiler

2008-01-29 Thread Richard Guenther
On Jan 29, 2008 2:14 PM, Ira Rosen <[EMAIL PROTECTED]> wrote: > > Hi, > > [EMAIL PROTECTED] wrote on 16/01/2008 15:20:00: > > > > When a loop is vectorized, some statements are removed from the basic > > > blocks, but the vectorizer information attached to these BBs is never > > > freed. > > > > Se

Re: Memory leaks in compiler

2008-01-29 Thread Ira Rosen
(I am resending this, since some of the addresses got corrupted. My apologies.) Hi, [EMAIL PROTECTED] wrote on 16/01/2008 15:20:00: > > When a loop is vectorized, some statements are removed from the basic > > blocks, but the vectorizer information attached to these BBs is never > > freed. > >

Re: Memory leaks in compiler

2008-01-29 Thread Ira Rosen
(I am resending this, since some of the addresses got corrupted. My apologies.) Hi, [EMAIL PROTECTED] wrote on 16/01/2008 15:20:00: > > When a loop is vectorized, some statements are removed from the basic > > blocks, but the vectorizer information attached to these BBs is never > > freed. > >

Re: Memory leaks in compiler

2008-01-29 Thread Ira Rosen
Hi, [EMAIL PROTECTED] wrote on 16/01/2008 15:20:00: > > When a loop is vectorized, some statements are removed from the basic > > blocks, but the vectorizer information attached to these BBs is never > > freed. > > Sebastian, thanks for bringing this to our attention. I'll look into this. > I ho

RE: Memory leaks in compiler

2008-01-18 Thread Dave Korn
On 18 January 2008 08:33, Gunther Nikl wrote: > Kai Henningsen wrote: >> On Thu, Jan 17, 2008 at 02:46:12PM -, Dave Korn wrote: >>> On 16 January 2008 22:09, Diego Novillo wrote: >>> On 1/16/08 4:16 PM, Andrew Haley wrote: > Because it's not a bug? You're changing the code to

Re: Memory leaks in compiler

2008-01-18 Thread Gunther Nikl
Kai Henningsen wrote: > On Thu, Jan 17, 2008 at 02:46:12PM -, Dave Korn wrote: >> On 16 January 2008 22:09, Diego Novillo wrote: >> >>> On 1/16/08 4:16 PM, Andrew Haley wrote: >>> Because it's not a bug? You're changing the code to silence a false negative, which this is what we here

Re: Memory leaks in compiler

2008-01-17 Thread Kai Henningsen
On Thu, Jan 17, 2008 at 02:46:12PM -, Dave Korn wrote: > On 16 January 2008 22:09, Diego Novillo wrote: > > > On 1/16/08 4:16 PM, Andrew Haley wrote: > > > >> Because it's not a bug? You're changing the code to silence a false > >> negative, which this is what we here in England call "puttin

Re: Memory leaks in compiler

2008-01-17 Thread Joe Buck
On Thu, Jan 17, 2008 at 11:08:25AM -0500, Ross Ridge wrote: > Diego Novillo wrote: > >I agree. Freeing memory right before we exit is a waste of time. > > Dave Korn writes: > > So, no gcc without an MMU and virtual memory platform ever again? > >Shame, it used to run on Amigas. > > I don't know

Re: Memory leaks in compiler

2008-01-17 Thread Erik Trulsson
On Thu, Jan 17, 2008 at 11:08:25AM -0500, Ross Ridge wrote: > Diego Novillo wrote: > >I agree. Freeing memory right before we exit is a waste of time. > > Dave Korn writes: > > So, no gcc without an MMU and virtual memory platform ever again? > >Shame, it used to run on Amigas. > > I don't know

RE: Memory leaks in compiler

2008-01-17 Thread Ross Ridge
Diego Novillo wrote: >I agree. Freeing memory right before we exit is a waste of time. Dave Korn writes: > So, no gcc without an MMU and virtual memory platform ever again? >Shame, it used to run on Amigas. I don't know if GCC ever freed all of its memory before exiting. An operating system does

Re: Memory leaks in compiler

2008-01-17 Thread Tom Tromey
> "Dave" == Dave Korn <[EMAIL PROTECTED]> writes: Dave> So, no gcc without an MMU and virtual memory platform ever Dave> again? Shame, it used to run on Amigas. If you are serious about doing a port like this, then I will recant and support not only this patch, but all the other ones you wil

RE: Memory leaks in compiler

2008-01-17 Thread Dave Korn
On 16 January 2008 22:09, Diego Novillo wrote: > On 1/16/08 4:16 PM, Andrew Haley wrote: > >> Because it's not a bug? You're changing the code to silence a false >> negative, which this is what we here in England call "putting the cart >> before the horse." If we clean up all the memory regions

Re: Memory leaks in compiler

2008-01-16 Thread Nicholas Nethercote
On Wed, 16 Jan 2008, Tom Tromey wrote: Kaveh> A valgrind suppression only silences the error for valgrind. What if Kaveh> someone uses another memory checking tool? Better to fix it for real Kaveh> IMHO. Add suppressions for all of them. Any decent memory checker has to account for the reali

Re: Memory leaks in compiler

2008-01-16 Thread Ian Lance Taylor
"Kaveh R. GHAZI" <[EMAIL PROTECTED]> writes: > For what is to save developer time, which is way more valuable than cpu > time. If you are the only person running the compiler, then developer time is far more valuable than CPU time. But tens of thousands of people run the compiler, and they run i

Re: Memory leaks in compiler

2008-01-16 Thread Diego Novillo
On 1/16/08 4:16 PM, Andrew Haley wrote: Because it's not a bug? You're changing the code to silence a false negative, which this is what we here in England call "putting the cart before the horse." If we clean up all the memory regions on closedown we'll be wasting CPU time. And for what? I

Re: Memory leaks in compiler

2008-01-16 Thread Kaveh R. GHAZI
On Wed, 16 Jan 2008, Andrew Haley wrote: > Kaveh R. Ghazi writes: > > A valgrind suppression only silences the error for valgrind. What if > > someone uses another memory checking tool? Better to fix it for real IMHO. > > Because it's not a bug? You're changing the code to silence a false > n

Re: Memory leaks in compiler

2008-01-16 Thread Kaveh R. Ghazi
From: "Tom Tromey" <[EMAIL PROTECTED]> "Kaveh" == Kaveh R Ghazi <[EMAIL PROTECTED]> writes: Kaveh> A valgrind suppression only silences the error for valgrind. What if Kaveh> someone uses another memory checking tool? Better to fix it for real Kaveh> IMHO. Add suppressions for all of the

Re: Memory leaks in compiler

2008-01-16 Thread Tom Tromey
> "Kaveh" == Kaveh R Ghazi <[EMAIL PROTECTED]> writes: Kaveh> A valgrind suppression only silences the error for valgrind. What if Kaveh> someone uses another memory checking tool? Better to fix it for real Kaveh> IMHO. Add suppressions for all of them. Any decent memory checker has to acc

Re: Memory leaks in compiler

2008-01-16 Thread Andrew Haley
Kaveh R. Ghazi writes: > From: "Tom Tromey" <[EMAIL PROTECTED]> > > >> "Kaveh" == Kaveh R GHAZI <[EMAIL PROTECTED]> writes: > > > > Kaveh> + mpfr_free_cache (); > > > > Why not just add a valgrind suppression for this? > > There's little point in freeing things just before exit. > >

Re: Memory leaks in compiler

2008-01-16 Thread Kaveh R. Ghazi
From: "Tom Tromey" <[EMAIL PROTECTED]> "Kaveh" == Kaveh R GHAZI <[EMAIL PROTECTED]> writes: Kaveh> + mpfr_free_cache (); Why not just add a valgrind suppression for this? There's little point in freeing things just before exit. Tom A valgrind suppression only silences the error for valgrin

Re: Memory leaks in compiler

2008-01-16 Thread Tom Tromey
> "Kaveh" == Kaveh R GHAZI <[EMAIL PROTECTED]> writes: Kaveh> + mpfr_free_cache (); Why not just add a valgrind suppression for this? There's little point in freeing things just before exit. Tom

Re: Memory leaks in compiler

2008-01-16 Thread Victor Kaplansky
> When a loop is vectorized, some statements are removed from the basic > blocks, but the vectorizer information attached to these BBs is never > freed. This is because the attached information is freed by walking > the statements of the basic blocks: see tree-vectorizer.c:1750, but > the transfor

Re: Memory leaks in compiler

2008-01-15 Thread Sebastian Pop
Hi, When a loop is vectorized, some statements are removed from the basic blocks, but the vectorizer information attached to these BBs is never freed. This is because the attached information is freed by walking the statements of the basic blocks: see tree-vectorizer.c:1750, but the transformed c

Re: Memory leaks in compiler

2008-01-15 Thread Sebastian Pop
Hi, one more leak, this time in alias analysis that initializes an obstak without freeing it. This is with the testcase of http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23821 valgrind --leak-check=full cc1 -O2 pr23821.c ==16661== 9,244 bytes in 68 blocks are definitely lost in loss record 2 of 5

Re: Memory leaks in compiler

2008-01-15 Thread Jerry DeLisle
Kaveh R. GHAZI wrote: On Fri, 11 Jan 2008, Vincent Lefevre wrote: ==14240==at 0x4A059F6: malloc (vg_replace_malloc.c:149) ==14240==by 0xB2F778: __gmp_default_allocate (in /mnt/sdb2/obj43/gcc/f951) ==14240==by 0x4C2B62D: mpfr_init2 (init2.c:53) ==14240==by 0x4C34424: mpfr_cache (

Re: Memory leaks in compiler

2008-01-15 Thread Kaveh R. GHAZI
On Fri, 11 Jan 2008, Vincent Lefevre wrote: > > ==14240==at 0x4A059F6: malloc (vg_replace_malloc.c:149) > > ==14240==by 0xB2F778: __gmp_default_allocate (in > > /mnt/sdb2/obj43/gcc/f951) > > ==14240==by 0x4C2B62D: mpfr_init2 (init2.c:53) > > ==14240==by 0x4C34424: mpfr_cache (cach

Re: Memory leaks in compiler

2008-01-11 Thread Jerry DeLisle
Bernhard Fischer wrote: On Fri, Jan 11, 2008 at 11:30:12AM -0800, Jerry DeLisle wrote: With the Fortran test case I am using for PR34722. I did a valgrind check with the following command: valgrind --leak-check=full f951 inquire_12.f90 The possible problem in mpfr has been around a while. T

Re: Memory leaks in compiler

2008-01-11 Thread Bernhard Fischer
On Fri, Jan 11, 2008 at 11:30:12AM -0800, Jerry DeLisle wrote: > With the Fortran test case I am using for PR34722. I did a valgrind check > with the following command: > > valgrind --leak-check=full f951 inquire_12.f90 > > The possible problem in mpfr has been around a while. > > The other two p

Re: Memory leaks in compiler

2008-01-11 Thread Vincent Lefevre
On 2008-01-11 11:30:12 -0800, Jerry DeLisle wrote: > With the Fortran test case I am using for PR34722. I did a valgrind > check with the following command: > > valgrind --leak-check=full f951 inquire_12.f90 > > The possible problem in mpfr has been around a while. [...] > I get the following: >

Re: Memory leaks in compiler

2008-01-11 Thread Jerry DeLisle
Jerry DeLisle wrote: With the Fortran test case I am using for PR34722. I did a valgrind check with the following command: valgrind --leak-check=full f951 inquire_12.f90 Here is a reduced test case. I will submit a PR. It has nothing to do with my iostat patch for pr34722. program gamsana

Memory leaks in compiler

2008-01-11 Thread Jerry DeLisle
With the Fortran test case I am using for PR34722. I did a valgrind check with the following command: valgrind --leak-check=full f951 inquire_12.f90 The possible problem in mpfr has been around a while. The other two problems look like middle-end or back-end problems. Does this warrant a PR