1. 27 Jun, 2015 1 commit
  2. 26 Jun, 2015 5 commits
    • Simon Marlow's avatar
      Fix deadlock (#10545) · a6ef59cd
      Simon Marlow authored
      yieldCapability() was not prepared to be called by a Task that is not
      either a worker or a bound Task.  This could happen if we ended up in
      yieldCapability via this call stack:
      
      performGC()
      scheduleDoGC()
      requestSync()
      yieldCapability()
      
      and there were a few other ways this could happen via requestSync.
      The fix is to handle this case in yieldCapability(): when the Task is
      not a worker or a bound Task, we put it on the returning_workers
      queue, where it will be woken up again.
      
      Summary of changes:
      
      * `yieldCapability`: factored out subroutine waitForWorkerCapability`
      * `waitForReturnCapability` renamed to `waitForCapability`, and
        factored out subroutine `waitForReturnCapability`
      * `releaseCapabilityAndQueue` worker renamed to `enqueueWorker`, does
        not take a lock and no longer tests if `!isBoundTask()`
      * `yieldCapability` adjusted for refactorings, only change in behavior
        is when it is not a worker or bound task.
      
      Test Plan:
      * new test concurrent/should_run/performGC
      * validate
      
      ...
      a6ef59cd
    • Simon Marlow's avatar
      Fix for crash in setnumcapabilities001 · 6de9b6eb
      Simon Marlow authored
      getNewNursery() was unconditionally incrementing next_nursery, which
      is normally fine but it broke an assumption in
      storageAddCapabilities().  This manifested as an occasional crash in
      the setnumcapabilities001 test.
      
      (cherry picked from commit be0ce871)
      6de9b6eb
    • rwbarton's avatar
      Comments only · 0d939ca1
      rwbarton authored
      (cherry picked from commit a7eee0d8)
      0d939ca1
    • rwbarton's avatar
      Make enum01/enum02/enum03 tests clang-compatible · c6f8d11b
      rwbarton authored
      ... by entirely replacing the use of CPP by a custom preprocessor;
      clang -E -traditional has no stringification mechanism at all.
      
      Reviewed By: thomie, austin
      
      Differential Revision: https://phabricator.haskell.org/D957
      
      GHC Trac Issues: #9399
      
      (cherry picked from commit b98ca17e)
      c6f8d11b
    • rwbarton's avatar
      Be aware of overlapping global STG registers in CmmSink (#10521) · 7707e54c
      rwbarton authored
      Summary:
      On x86_64, commit e2f6bbd3 assigned
      the STG registers F1 and D1 the same hardware register (xmm1), and
      the same for the registers F2 and D2, etc. When mixing calls to
      functions involving Float#s and Double#s, this can cause wrong Cmm
      optimizations that assume the F1 and D1 registers are independent.
      
      Reviewers: simonpj, austin
      
      Reviewed By: austin
      
      Subscribers: simonpj, thomie, bgamari
      
      Differential Revision: https://phabricator.haskell.org/D993
      
      GHC Trac Issues: #10521
      
      (cherry picked from commit a2f828a3)
      7707e54c
  3. 23 Jun, 2015 2 commits
  4. 19 Jun, 2015 1 commit
    • Alan Zimmerman's avatar
      Parser: commas_tup_tail duplicate SrcSpan on "Missing" value · 6520dbfb
      Alan Zimmerman authored
      Summary:
      Parsing
      
          {-# LANGUAGE TupleSections #-}
      
          baz = (1, "hello", 6.5,,) 'a' (Just ())
      
      Results in the following AST fragment
      
          (L tests/examples/Tuple.hs:3:7-25
             (ExplicitTuple
                [ L tests/examples/Tuple.hs:3:8
                    (Present
                       (L tests/examples/Tuple.hs:3:8
                          (HsOverLit
                             (OverLit
                                (HsIntegral [ '1' ] 1)
                                PlaceHolder
                                (HsLit
                                   (HsString
                                      []
                                      {abstract:FastString}))
                                PlaceHolder))))
                , L tests/examples/Tuple.hs:3:11-17
                    (Present
                       (L tests/examples/Tuple.hs:3:11-17
                          (HsLit
                             (HsString
                                [ '"'
                                , 'h'
                                , 'e'
                                , 'l'
                                , 'l'
                                , 'o'
                                , '"'
                                ]
                                {abstract:FastString}))))
                , L tests/examples/Tuple.hs:3:20-22
                    (Present
                       (L tests/examples/Tuple.hs:3:20-22
                          (HsOverLit
                             (OverLit
                                (HsFractional
                                   (FL
                                      [ '6' , '.' , '5' ]
                                      (:% 13 2)))
                                PlaceHolder
                                (HsLit
                                   (HsString
                                      []
                                      {abstract:FastString}))
                                PlaceHolder))))
                , L tests/examples/Tuple.hs:3:24
                    (Missing PlaceHolder)
                , L tests/examples/Tuple.hs:3:24
                    (Missing PlaceHolder)
                ]
      
      The final `Missing PlaceHolder` has a duplicated `SrcSpan`
      
      Test Plan: ./validate
      
      Reviewers: austin, hvr, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie, bgamari, mpickering
      
      Differential Revision: https://phabricator.haskell.org/D995
      
      GHC Trac Issues: #10537
      
      (cherry picked from commit 72b21c39)
      6520dbfb
  5. 18 Jun, 2015 2 commits
    • Austin Seipp's avatar
      Revert "Look inside synonyms for foralls when unifying" · 8fb101e4
      Austin Seipp authored
      As discussed in #10194, this patch - while fixing a bug - also causes a
      minor regression when compiling certain in-the-wild programs, meaning
      some extant programs now failed with 7.10.2 RC1. Womp womp.
      
      This reverts commit 681d82c0.
      8fb101e4
    • Simon Peyton Jones's avatar
      Care with impossible-cons in combineIdenticalAlts · 558eb050
      Simon Peyton Jones authored
      This was a nasty, long-standing bug exposed in Trac #10538.
      Symptoms were that we had an empty case
         case (x :: Either a) of {}
      Core Lint correctly picked this bogus code up.
      
      Here is what happened
      
      * In SimplUtils.prepareAlts, we call
              filterAlts
        then
              combineIdenticalAlts
      
      * We had    case x of { Left _ -> e1; Right _ -> e1 }
      
      * filterAlts did nothing, but correctly retuned imposs_deflt_cons
        saying that 'x' cannot be {Left, Right} in the DEFAULT branch,
        if any (there isn't one.)
      
      * combineIdentialAlts correctly combines the identical alts, to give
           case x of { DEFAULT -> e1 }
      
      * BUT combineIdenticalAlts did no adjust imposs_deft_cons
      
      * Result: when compiling e1 we did so in the belief that 'x'
        could not be {Left,Right}.  Disaster.
      
      Easily fixed.
      
      (It is hard to trigger; I can't construct a simple test case.)
      
      (cherry picked from commit 023a0ba9)
      558eb050
  6. 17 Jun, 2015 2 commits
    • thomie's avatar
      Fix ghc-pkg reports cache out date (#10205) · 4a87fe4d
      thomie authored
      See Note [writeAtomic leaky abstraction].
      
      GHC on Linux already received a patch for this bug in
      e0801a0f. On Windows several cabal tests
      were hitting the bug, causing validate failures, but we never noticed
      because of all the other tests that were failing on Windows. And it
      didn't start happening till `getModificationTime` received sub-second
      resolution support on Windows in
      5cf76186.
      
      Since there are regression tests already, I am not adding another one.
      But for good measure, here is a script that shows the bug without
      needing to do a full validate run:
      
        DB=/tmp/package.conf.d.test
        GHC_PKG=ghc-pkg #utils/ghc-pkg/dist/build/tmp/ghc-pkg
        LOCAL_GHC_PKG="${GHC_PKG} --no-user-package-db --global-package-db=${DB}"
        while true; do
          rm -rf ${DB}
          ${LOCAL_GHC_PKG} init "${DB}"
          ${LOCAL_GHC_PKG} list
        done
      
      If you see "WARNING: cache is out of date" after a few seconds, the bug
      is not fixed.
      
      Reviewed By: austin
      
      Differential Revision: https://phabricator.haskell.org/D990
      
      GHC Trac Issues: #10205
      
      (cherry picked from commit f0636562)
      4a87fe4d
    • Herbert Valerio Riedel's avatar
      Update Cabal submodule to Cabal-v1.22.4.0 rls tag · 007274e4
      Herbert Valerio Riedel authored
      This only fixes the version number, no code is changed
      007274e4
  7. 16 Jun, 2015 1 commit
  8. 15 Jun, 2015 4 commits
  9. 12 Jun, 2015 11 commits
  10. 09 Jun, 2015 11 commits