diff options
author | Simon Marlow <marlowsd@gmail.com> | 2018-05-02 11:01:13 +0100 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2018-05-25 10:07:45 +0100 |
commit | 5b6ef59f99590128394b9dd9717b07fa971f6fc0 (patch) | |
tree | d3180b9e41cbdfda9e70adb532f666258d874278 /testsuite/config | |
parent | 5ca623a5a06b96478efe0ac6e37bae4789c1d1c0 (diff) | |
download | haskell-5b6ef59f99590128394b9dd9717b07fa971f6fc0.tar.gz |
Add -fghci-leak-check to check for space leaks
Summary:
(re-applying this patch now that D4659 is committed)
Space leaks in GHCi emerge from time to time and tend to come back again
after they get fixed. This is an attempt to limit regressions by
* adding a reliable detection for some classes of space leaks in GHCi
* turning on leak checking for all GHCi tests in the test suite, so that
we'll notice if the leak appears again.
The idea for detecting space leaks is quite simple:
* find some data that we expect to be GC'd later, make a weak pointer to it
* when we expect the data to be dead, do a `performGC` and then check
the status of the weak pointer.
It would be nice to apply this trick to lots of things in GHC,
e.g. ensuring that HsSyn is not retained after the desugarer, or
ensuring that CoreSyn from the previous simplifier pass is not retained.
Test Plan: validate
Reviewers: bgamari, simonpj, erikd, niteria
Subscribers: thomie, carter
GHC Trac Issues: #15111
Diffstat (limited to 'testsuite/config')
-rw-r--r-- | testsuite/config/ghc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/testsuite/config/ghc b/testsuite/config/ghc index 6296394197..f41f372cb2 100644 --- a/testsuite/config/ghc +++ b/testsuite/config/ghc @@ -80,7 +80,7 @@ config.way_flags = { 'prof_no_auto' : ['-prof', '-static', '-fasm'], 'profasm' : ['-O', '-prof', '-static', '-fprof-auto'], 'profthreaded' : ['-O', '-prof', '-static', '-fprof-auto', '-threaded'], - 'ghci' : ['--interactive', '-v0', '-ignore-dot-ghci', '-fno-ghci-history', '+RTS', '-I0.1', '-RTS'], + 'ghci' : ['--interactive', '-v0', '-ignore-dot-ghci', '-fno-ghci-history', '-fghci-leak-check', '+RTS', '-I0.1', '-RTS'], 'sanity' : ['-debug'], 'threaded1' : ['-threaded', '-debug'], 'threaded1_ls' : ['-threaded', '-debug'], |