Re: [GHC] #7478: setSessionDynFlags does not always work

#7478: setSessionDynFlags does not always work -------------------------------------+------------------------------------ Reporter: edsko | Owner: Type: bug | Status: new Priority: highest | Milestone: 7.8.1 Component: Compiler | Version: 7.7 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: ghc-api/T7478 | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Comment (by bennofs): Replying to [comment:11 MikolajKonarski]:
BTW, right now (I don't know how it was before) calling `setSessionDynFlags` causes significant memory leaks, visible already in tests with a couple hundred modules and calls. If anybody is interested, I can try to extract a test from my code that uses GHC API, but it's GHC version dependent, etc., so I'd rather not do it until anybody is actively looking at this. But it's straightforward: basically, in a loop:
{{{ setSessionDynFlags flags setTargets yetAnotherSIngleModule load LoadAllTargets }}}
Even if we load 100 of modules and then just keep reloading the same module, memory will increase all the time.
I can confirm this. I have a workaround for that problem in https://github.com/bennofs/ghc- server/blob/master/src/Server/Configure.hs#L117, which suggests that the problem is with reloading the package database. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/7478#comment:12 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC