[Bug tree-optimization/79699] small memory leak in MPFR

2017-03-03 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79699

--- Comment #7 from Martin Sebor  ---
Author: msebor
Date: Fri Mar  3 16:35:00 2017
New Revision: 245878

URL: https://gcc.gnu.org/viewcvs?rev=245878=gcc=rev
Log:
PR tree-optimization/79699 - small memory leak in MPFR

gcc/ChangeLog:
* context.c (context::~context): Free MPFR caches to avoid
a memory leak on program exit.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/context.c

[Bug tree-optimization/79699] small memory leak in MPFR

2017-03-03 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79699

Martin Sebor  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #6 from Martin Sebor  ---
Fixed in r245878.

[Bug tree-optimization/79699] small memory leak in MPFR

2017-03-01 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79699

Martin Sebor  changed:

   What|Removed |Added

   Keywords||patch

--- Comment #5 from Martin Sebor  ---
Patch for review:
https://gcc.gnu.org/ml/gcc-patches/2017-03/msg00059.html

[Bug tree-optimization/79699] small memory leak in MPFR

2017-03-01 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79699

Martin Sebor  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2017-03-01
   Assignee|unassigned at gcc dot gnu.org  |msebor at gcc dot 
gnu.org
 Ever confirmed|0   |1

--- Comment #4 from Martin Sebor  ---
Let me fix this in gimple-ssa-sprintf.c for now.

[Bug tree-optimization/79699] small memory leak in MPFR

2017-02-23 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79699

--- Comment #3 from Martin Sebor  ---
Ah, thanks for the reference.  It sounds like GCC should call mpfr_free_cache
before exiting as is recommended in section 4.7 Memory Handling of the MPFR
manual (as I just discovered by searching for the function):

It is strongly advised to do that before terminating a thread, or before
exiting when using tools like ‘valgrind’ (to avoid memory leaks being
reported).

[Bug tree-optimization/79699] small memory leak in MPFR

2017-02-23 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79699

--- Comment #2 from joseph at codesourcery dot com  ---
The only mpfr_free_cache call I see in GCC is in the Fortran front end.  
Without such a call on exit, leaks in MPFR need not be meaningful.

[Bug tree-optimization/79699] small memory leak in MPFR

2017-02-23 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79699

Martin Sebor  changed:

   What|Removed |Added

URL||https://gforge.inria.fr/tra
   ||cker/index.php?func=detail&
   ||aid=21197_id=136
   ||=619

--- Comment #1 from Martin Sebor  ---
I raised MPFR bug report 21197 for this:
https://gforge.inria.fr/tracker/index.php?func=detail=21197_id=136=619