[GHC] #15111: GHCi leaks the first modules loaded
GHC
ghc-devs at haskell.org
Wed May 9 12:45:10 UTC 2018
#15111: GHCi leaks the first modules loaded
-------------------------------------+-------------------------------------
Reporter: simonmar | Owner: simonmar
Type: bug | Status: new
Priority: normal | Milestone: 8.6.1
Component: Compiler | Version: 8.2.2
Resolution: | Keywords: ghci
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D4658
Wiki Page: | Phab:D4659
-------------------------------------+-------------------------------------
Comment (by Simon Marlow <marlowsd@…>):
In [changeset:"5fe6aaa3756cda654374ebfd883fa8f064ff64a4/ghc" 5fe6aaa/ghc]:
{{{
#!CommitTicketReference repository="ghc"
revision="5fe6aaa3756cda654374ebfd883fa8f064ff64a4"
Add -fghci-leak-check to check for space leaks
Summary:
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
Differential Revision: https://phabricator.haskell.org/D4658
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15111#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list