public inbox for jit@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 00/21] PR 63854: Fix various memory leaks
@ 2014-01-01  0:00 David Malcolm
  2014-01-01  0:00 ` [PATCH 11/21] PR jit/63854: Fix leak of "avail" within tree-ssa-pre.c David Malcolm
                   ` (20 more replies)
  0 siblings, 21 replies; 69+ messages in thread
From: David Malcolm @ 2014-01-01  0:00 UTC (permalink / raw)
  To: gcc-patches, jit; +Cc: David Malcolm

Running the jit testsuite under valgrind showed various memory leaks.

Some are per-invocation of the compiler, and hence only affect
libgccjit.so (although presumably it's useful to cc1 etc to get
valgrind clean).

Others appear to be per-function and hence affect the non-JIT use
cases.

The following patch kit fixes most of the leaks.

It also adds a contrib/valgrind.supp suppressions file, for sparseset
(though I see now that gcc/configure.ac can detect if
valgrind/memcheck.h is available and use it if
  --enable-valgrind-annotations
Should I instead require that option when doing such testing?).

Successfully bootstrapped&regrtested the cumulative effect of the
patches on x86_64-unknown-linux-gnu (Fedora 20).

Are the non-JIT parts OK for trunk?
(Presumably I can give myself approval for the JIT parts)

David Malcolm (21):
  PR jit/63854: Fix memory leak within gcc_options
  PR jit/63854: Fix memory leak of reginfo.c: valid_mode_changes_obstack
  PR jit/63854: Fix memory leaks within
    context/pass_manager/dump_manager
  PR jit/63854: Fix memory leak within bb-reorder.c
  PR jit/63854: Fix memory leak of save_decoded_options
  PR jit/63854: Fix leak of opts_obstack
  PR jit/63854: Fix leak of optimization_summary_obstack
  PR jit/63854: Add ira_costs_c_finalize
  PR jit/63854: Don't leak producer_string in dwarf2out.c
  PR jit/63854: Fix leak of worklist within jit-recording.c
  PR jit/63854: Fix leak of "avail" within tree-ssa-pre.c
  PR jit/63854: Add a valgrind suppresion file
  PR jit/63854: Add support for running "make check-jit" under valgrind
  PR jit/63854: Fix leak of paths within jump threading
  PR jit/63854: lra.c: Fix leak of point_freq_vec's buffer when calling
    lra_inheritance
  PR jit/63854: Add all_late_ipa_passes to GCC_PASS_LISTS
  PR jit/63854: Fix leaking vec in jit
  PR jit/63854: Add "long-term" allocator to gcc::context
  PR jit/63854: Fix leak of ipa hooks
  PR jit/63854: Fix leak in ipa-icf.c
  PR jit/63854: Fix leaks in test-fuzzer.c

 contrib/valgrind.supp              | 11 ++++++
 gcc/bb-reorder.c                   |  2 +-
 gcc/config/alpha/alpha.c           |  4 +-
 gcc/config/i386/i386.c             |  2 +-
 gcc/config/rl78/rl78.c             |  4 +-
 gcc/config/rs6000/rs6000.c         |  2 +-
 gcc/context.c                      | 24 ++++++++++++
 gcc/context.h                      | 47 +++++++++++++++++++++++
 gcc/dumpfile.c                     | 47 +++++++++++++++++------
 gcc/dumpfile.h                     | 11 +++++-
 gcc/dwarf2out.c                    |  2 +
 gcc/ipa-icf.c                      |  1 +
 gcc/ipa-prop.c                     |  3 +-
 gcc/ipa-reference.c                | 17 +++++++-
 gcc/ira-costs.c                    |  6 +++
 gcc/ira.h                          |  3 ++
 gcc/jit/jit-playback.c             | 73 +++++++++++++++++++++++++++++------
 gcc/jit/jit-playback.h             | 27 ++++++++-----
 gcc/jit/jit-recording.c            | 19 +++++----
 gcc/jit/jit-recording.h            | 26 ++++++-------
 gcc/lra.c                          |  1 +
 gcc/opts.c                         |  8 ++++
 gcc/opts.h                         |  1 +
 gcc/pass_manager.h                 |  3 ++
 gcc/passes.c                       | 39 ++++++++++++++++++-
 gcc/reginfo.c                      |  2 +-
 gcc/statistics.c                   |  3 +-
 gcc/testsuite/jit.dg/jit.exp       | 79 +++++++++++++++++++++++++++++++++++++-
 gcc/testsuite/jit.dg/test-fuzzer.c |  6 +++
 gcc/toplev.c                       | 20 ++++++++--
 gcc/tree-ssa-pre.c                 |  2 +-
 gcc/tree-ssa-threadedge.c          |  1 +
 gcc/tree-ssa-threadupdate.c        |  1 +
 gcc/tree.c                         | 17 +++++---
 34 files changed, 434 insertions(+), 80 deletions(-)
 create mode 100644 contrib/valgrind.supp

-- 
1.8.5.3

^ permalink raw reply	[flat|nested] 69+ messages in thread

end of thread, other threads:[~2015-01-16 16:52 UTC | newest]

Thread overview: 69+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-01  0:00 [PATCH 00/21] PR 63854: Fix various memory leaks David Malcolm
2014-01-01  0:00 ` [PATCH 11/21] PR jit/63854: Fix leak of "avail" within tree-ssa-pre.c David Malcolm
2014-01-01  0:00   ` Richard Biener
2014-01-01  0:00 ` [PATCH 06/21] PR jit/63854: Fix leak of opts_obstack David Malcolm
2014-01-01  0:00   ` Richard Biener
2014-01-01  0:00 ` [PATCH 15/21] PR jit/63854: lra.c: Fix leak of point_freq_vec's buffer when calling lra_inheritance David Malcolm
2014-01-01  0:00   ` Jeff Law
2014-01-01  0:00 ` [PATCH 03/21] PR jit/63854: Fix memory leaks within context/pass_manager/dump_manager David Malcolm
2014-01-01  0:00   ` Jeff Law
2014-01-01  0:00 ` [PATCH 17/21] PR jit/63854: Fix leaking vec in jit David Malcolm
2014-01-01  0:00   ` Jeff Law
2014-01-01  0:00 ` [PATCH 16/21] PR jit/63854: Add all_late_ipa_passes to GCC_PASS_LISTS David Malcolm
2014-01-01  0:00   ` Richard Biener
2014-01-01  0:00 ` [PATCH 10/21] PR jit/63854: Fix leak of worklist within jit-recording.c David Malcolm
2014-01-01  0:00   ` Jeff Law
2014-01-01  0:00     ` David Malcolm
2014-01-01  0:00       ` Richard Biener
2014-01-01  0:00         ` Jeff Law
2014-01-01  0:00 ` [PATCH 18/21] PR jit/63854: Add "long-term" allocator to gcc::context David Malcolm
2014-01-01  0:00   ` Joseph Myers
2015-01-01  0:00     ` PING: " David Malcolm
2015-01-01  0:00       ` Joseph Myers
2014-01-01  0:00 ` [PATCH 01/21] PR jit/63854: Fix memory leak within gcc_options David Malcolm
2014-01-01  0:00   ` Richard Biener
2014-01-01  0:00 ` [PATCH 12/21] PR jit/63854: Add a valgrind suppresion file David Malcolm
2014-01-01  0:00   ` Richard Biener
2014-01-01  0:00     ` Jeff Law
2014-01-01  0:00       ` David Malcolm
2015-01-01  0:00         ` Hans-Peter Nilsson
2014-01-01  0:00 ` [PATCH 20/21] PR jit/63854: Fix leak in ipa-icf.c David Malcolm
2014-01-01  0:00   ` Richard Biener
2014-01-01  0:00 ` [PATCH 13/21] PR jit/63854: Add support for running "make check-jit" under valgrind David Malcolm
2014-01-01  0:00   ` Jeff Law
2014-01-01  0:00     ` [PATCH 00/05] Fixes to jit.exp David Malcolm
2014-01-01  0:00     ` [PATCH 13/21] PR jit/63854: Add support for running "make check-jit" under valgrind David Malcolm
2014-01-01  0:00       ` Jeff Law
2014-01-01  0:00     ` [PATCH 00/05] Fixes to jit.exp David Malcolm
2014-01-01  0:00       ` [PATCH 01/05] jit.exp: Avoid embedding full paths into test results David Malcolm
2014-01-01  0:00         ` Mike Stump
2014-01-01  0:00       ` [PATCH 03/05] jit.exp: fix timeout bug inherited from dejagnu.exp David Malcolm
2014-01-01  0:00       ` [PATCH 04/05] jit.exp: Verify the exit status of the spawnee David Malcolm
2014-01-01  0:00       ` [PATCH 02/05] PR jit/63854: Add support for running "make check-jit" under valgrind David Malcolm
2014-01-01  0:00       ` [PATCH 05/05] Add command-line option-parsing to jit testcases David Malcolm
2014-01-01  0:00         ` PING: " David Malcolm
2014-01-01  0:00           ` Mike Stump
2014-01-01  0:00             ` David Malcolm
2014-01-01  0:00               ` Mike Stump
2014-01-01  0:00     ` Running cc1 etc under valgrind (was Re: [PATCH 13/21] PR jit/63854: Add support for running "make check-jit" under valgrind) David Malcolm
2014-01-01  0:00       ` David Malcolm
2014-01-01  0:00 ` [PATCH 21/21] PR jit/63854: Fix leaks in test-fuzzer.c David Malcolm
2014-01-01  0:00   ` Jeff Law
2014-01-01  0:00 ` [PATCH 14/21] PR jit/63854: Fix leak of paths within jump threading David Malcolm
2014-01-01  0:00   ` Richard Biener
2014-01-01  0:00 ` [PATCH 09/21] PR jit/63854: Don't leak producer_string in dwarf2out.c David Malcolm
2014-01-01  0:00   ` Richard Biener
2014-01-01  0:00 ` [PATCH 04/21] PR jit/63854: Fix memory leak within bb-reorder.c David Malcolm
2014-01-01  0:00   ` Richard Biener
2014-01-01  0:00 ` [PATCH 08/21] PR jit/63854: Add ira_costs_c_finalize David Malcolm
2014-01-01  0:00   ` Richard Biener
2014-01-01  0:00 ` [PATCH 07/21] PR jit/63854: Fix leak of optimization_summary_obstack David Malcolm
2014-01-01  0:00   ` Richard Biener
2014-01-01  0:00 ` [PATCH 02/21] PR jit/63854: Fix memory leak of reginfo.c: valid_mode_changes_obstack David Malcolm
2014-01-01  0:00   ` Richard Biener
2014-01-01  0:00 ` [PATCH 19/21] PR jit/63854: Fix leak of ipa hooks David Malcolm
2014-01-01  0:00   ` Jeff Law
2014-01-01  0:00     ` PING " David Malcolm
2014-01-01  0:00       ` Jan Hubicka
2014-01-01  0:00 ` [PATCH 05/21] PR jit/63854: Fix memory leak of save_decoded_options David Malcolm
2014-01-01  0:00   ` Richard Biener

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).