summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2016-02-20 07:39:34 +0000
committerSimon Marlow <marlowsd@gmail.com>2016-02-20 08:53:20 +0000
commit234048577efc713a0630c58ebe813dafeaf5deeb (patch)
treed2bd9c3b7f11e5450e470007e51b512ea63ce1c8
parent3259bf658662e7052ae91de2fa27baae8c84b7fa (diff)
downloadhaskell-234048577efc713a0630c58ebe813dafeaf5deeb.tar.gz
Fix a double-free bug in -fexternal-interpreter
Originally I planned to make this reference manually managed, but it looks like at some point I gave it a finalizer on the GHC side, but forgot to remove the manual free here. The result is that ghc-iserv could crash in getStablePtr sometimes when using TH.
-rw-r--r--libraries/ghci/GHCi/TH.hs1
1 files changed, 0 insertions, 1 deletions
diff --git a/libraries/ghci/GHCi/TH.hs b/libraries/ghci/GHCi/TH.hs
index 2c7a50172c..00601ba933 100644
--- a/libraries/ghci/GHCi/TH.hs
+++ b/libraries/ghci/GHCi/TH.hs
@@ -132,7 +132,6 @@ finishTH pipe rstate = do
qstateref <- localRef rstate
qstate <- readIORef qstateref
_ <- runGHCiQ runModFinalizers qstate { qsPipe = pipe }
- freeRemoteRef rstate
return ()
runTH