Re: [PATCH 04/08] PR jit/63854: Remove xstrdup from ipa/cgraph fprintf calls

2014-11-26 Thread Trevor Saunders
On Wed, Nov 26, 2014 at 09:49:52AM -0500, David Malcolm wrote: > On Wed, 2014-11-26 at 09:13 +0100, Uros Bizjak wrote: > > Hello! > > > > > cgraph*.c and ipa-*.c use xstrdup on strings when dumping them via > > > fprintf, leaking all of the duplicated buffers. > > > > > > Is/was there a reason for

Re: [PATCH 04/08] PR jit/63854: Remove xstrdup from ipa/cgraph fprintf calls

2014-11-26 Thread David Malcolm
On Wed, 2014-11-26 at 09:13 +0100, Uros Bizjak wrote: > Hello! > > > cgraph*.c and ipa-*.c use xstrdup on strings when dumping them via > > fprintf, leaking all of the duplicated buffers. > > > > Is/was there a reason for doing this? > > Yes, please see [1] and PR 53136 [2]. As said in [1]: > >

Re: [PATCH 04/08] PR jit/63854: Remove xstrdup from ipa/cgraph fprintf calls

2014-11-26 Thread Uros Bizjak
Hello! > cgraph*.c and ipa-*.c use xstrdup on strings when dumping them via > fprintf, leaking all of the duplicated buffers. > > Is/was there a reason for doing this? Yes, please see [1] and PR 53136 [2]. As said in [1]: "There is a problem with multiple calls of cgraph_node_name in fprintf dum

[PATCH 04/08] PR jit/63854: Remove xstrdup from ipa/cgraph fprintf calls

2014-11-25 Thread David Malcolm
cgraph*.c and ipa-*.c use xstrdup on strings when dumping them via fprintf, leaking all of the duplicated buffers. Is/was there a reason for doing this? Taking them out fixes these leaks (seen when dumping is enabled): 12 bytes in 1 blocks are definitely lost in loss record 11 of 148 at 0x4A0645