[GHC] #12664: System.Environment.withArgs and friends leak memory
GHC
ghc-devs at haskell.org
Fri Oct 7 10:07:32 UTC 2016
#12664: System.Environment.withArgs and friends leak memory
-------------------------------------+-------------------------------------
Reporter: simonmar | Owner: niteria
Type: bug | Status: new
Priority: normal | Milestone: 8.0.2
Component: libraries/base | Version: 8.0.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Bartosz Nitka <niteria@…>):
In [changeset:"e41b9c614984b63c4660018cecde682453e083e5/ghc" e41b9c6/ghc]:
{{{
#!CommitTicketReference repository="ghc"
revision="e41b9c614984b63c4660018cecde682453e083e5"
Fix memory leak from #12664
This fixes the leak with `setProgArgv`. The problem was
that `setProgArgv` would not free the objects pointed
to by `prog_argc`, `prog_argv` when the globals were
changed resulting in a leak.
The only strictly necessary change is in `rts/RtsFlags.c`, but
the code in `System.Environment` was a bit confusing and not
exception safe, so I refactored it.
Test Plan: ./validate
Reviewers: simonmar, ezyang, austin, hvr, bgamari, erikd
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2576
GHC Trac Issues: #12664
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12664#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list