1. 03 Nov, 2019 15 commits
    • Ben Gamari's avatar
      Exclude rts.cabal from source distributions · 1c33f5d6
      Ben Gamari authored
      This modifies both the Hadrian and make build systems to avoid included
      the rts.cabal generated by autoconf in the source distribution.
      Fixes #17265.
      (cherry picked from commit e81d4bc7)
    • Ben Gamari's avatar
      rules/haddock: Ensure that RTS stats directory exists · c3fd844c
      Ben Gamari authored
      It may not exist if the source tarball was extracted yet not the
      testsuite tarball.
      (cherry picked from commit 624eb0fc)
    • Ben Gamari's avatar
      rts: Fix CNF dirtying logic · 900fce4e
      Ben Gamari authored
      Previously due to a silly implementation bug CNFs would never have their
      dirty flag set, resulting in their being added again and again to the
      `mut_list`. Fix this.
      Fixes #17297.
      (cherry picked from commit ba27fe74)
    • Stefan Schulze Frielinghaus's avatar
      Extend argument of createIOThread to word size · 822a7f4d
      Stefan Schulze Frielinghaus authored
      Function createIOThread expects its second argument to be of size word.
      The natural size of the second parameter is 32bits. Thus for some 64bit
      architectures, where a write of the lower half of a register does not
      clear the upper half, the value must be zero extended.
      (cherry picked from commit d0924b15)
    • Ben Gamari's avatar
      configure: Determine library versions of template-haskell, et al. · 2c0df863
      Ben Gamari authored
      These are needed by the user guide documentation. Fixes #17260.
      (cherry picked from commit 0c53d0aa)
    • Roland Senn's avatar
      New fix for #11647. Avoid side effects like #17171 · 2fe94000
      Roland Senn authored
      If a main module doesn't contain a header, we omit the check whether the main module is exported.
      With this patch GHC, GHCi and runghc use the same code.
      (cherry picked from commit 93f02b62)
    • Ryan Scott's avatar
      Don't skip validity checks for built-in classes (#17355) · 51036008
      Ryan Scott authored
      Issue #17355 occurred because the control flow for
      `TcValidity.check_valid_inst_head` was structured in such a way that
      whenever it checked a special, built-in class (like `Generic` or
      `HasField`), it would skip the most important check of all:
      `checkValidTypePats`, which rejects nonsense like this:
      instance Generic (forall a. a)
      This fixes the issue by carving out `checkValidTypePats` from
      `check_valid_inst_head` so that `checkValidTypePats` is always
      invoked. `check_valid_inst_head` has also been renamed to
      `check_special_inst_head` to reflect its new purpose of _only_
      checking for instances headed by special classes.
      Fixes #17355.
      (cherry picked from commit f375e3fb)
    • Ben Gamari's avatar
      Bump stm submodule · e8175bed
      Ben Gamari authored
      (cherry picked from commit 8b578e72)
    • ryates@cs.rochester.edu's avatar
      Full abort on validate failure merging `orElse`. · 432a270e
      ryates@cs.rochester.edu authored
      Previously partial roll back of a branch of an `orElse` was attempted
      if validation failure was observed.  Validation here, however, does
      not account for what part of the transaction observed inconsistent
      state.  This commit fixes this by fully aborting and restarting the
      (cherry picked from commit 998f2e18)
    • Ben Gamari's avatar
      Drop duplicate -optl's from GHC invocations · 9c7dde7f
      Ben Gamari authored
      Previously the make build system would pass things like
      `-optl-optl-Wl,-x -optl-optl-Wl,noexecstack` to GHC. This would
      naturally result in mass confusion as GHC would pass `-optl-Wl,-x` to
      GCC. GCC would in turn interpret this as `-o ptl-Wl,-x`, setting the
      output pass of the invocation.
      The problem that `-optl` was added to the command-line in two places in
      the build system. Fix this.
      Fixes #17385.
      (cherry picked from commit 2d12d59e)
    • Ben Gamari's avatar
      base: Add @since on GHC.IO.Handle.Lock.hUnlock · 68dc5b0a
      Ben Gamari authored
      Unfortunately this was introduced in base-4.11.0 (GHC 8.4.1)
      whereas the other locking primitives were added in base-4.10.0 (GHC
      (cherry picked from commit 3ad35f76)
    • Roland Senn's avatar
      Fix #14690 - :steplocal panics after break-on-error · 4c376e30
      Roland Senn authored
      `:steplocal` enables only breakpoints in the current top-level binding.
      When a normal breakpoint is hit, then the module name and the break id from the `BRK_FUN` byte code
      allow us to access the corresponding entry in a ModBreak table. From this entry we then get the SrcSpan
      (see compiler/main/InteractiveEval.hs:bindLocalsAtBreakpoint).
      With this source-span we can then determine the current top-level binding, needed for the steplocal command.
      However, if we break at an exception or at an error, we don't have an BRK_FUN byte-code, so we don't have any source information.
      The function `bindLocalsAtBreakpoint` creates an `UnhelpfulSpan`, which doesn't allow us to determine the current top-level binding.
      To avoid a `panic`, we have to check for `UnhelpfulSpan` in the function `ghc/GHCi/UI.hs:stepLocalCmd`.
      Hence a :steplocal command after a break-on-exception or a break-on-error is not possible.
      (cherry picked from commit 1be9c35c...
    • Ben Gamari's avatar
      testsuite: Add test for #17414 · d04492c0
      Ben Gamari authored
      (cherry picked from commit 1ce3d982)
    • Ben Gamari's avatar
      base: Clamp IO operation size to 2GB on Darwin · 176367f8
      Ben Gamari authored
      As reported in #17414, Darwin throws EINVAL in response to large
      (cherry picked from commit 08810f12)
    • Ömer Sinan Ağacan's avatar
      Fix LLVM version check yet again · 061f7f9b
      Ömer Sinan Ağacan authored
      There were two problems with LLVM version checking:
      - The parser would only parse x and x.y formatted versions. E.g. 1.2.3
        would be rejected.
      - The version check was too strict and would reject x.y formatted
        versions. E.g. when we support version 7 it'd reject 7.0 ("LLVM
        version 7.0") and only accept 7 ("LLVM version 7").
      We now parse versions with arbitrarily deep minor numbering (x.y.z.t...)
      and accept versions as long as the major version matches the supported
      version (e.g. 7.1, 7.1.2, ...).
      (cherry picked from commit bf9dfe1c)
  2. 23 Oct, 2019 2 commits
  3. 09 Oct, 2019 1 commit
  4. 26 Aug, 2019 3 commits
  5. 25 Aug, 2019 2 commits
  6. 22 Aug, 2019 1 commit
  7. 21 Aug, 2019 16 commits
    • Ben Gamari's avatar
      gitlab-ci: Bump Docker images revision · 4ffb18ea
      Ben Gamari authored
    • Ben Gamari's avatar
      SetLevels: Don't set context level when floating cases · a2a0e6f3
      Ben Gamari authored
      When floating a single-alternative case we previously would set the
      context level to the level where we were floating the case. However,
      this is not what FloatOut did: it rather left
    • Ben Gamari's avatar
      testsuite: Add cut-down test for #16978 · 6bd8b6d1
      Ben Gamari authored
    • Matthew Pickering's avatar
      rts: Do not traverse nursery for dead closures in LDV profile · edaa5bd8
      Matthew Pickering authored
      It is important that `heapCensus` and `LdvCensusForDead` traverse the
      same areas.
      `heapCensus` increases the `not_used` counter which tracks how many
      closures are live but haven't been used yet.
      `LdvCensusForDead` increases the `void_total` counter which tracks how
      many dead closures there are.
      The `LAG` is then calculated by substracting the `void_total` from
      `not_used` and so it is essential that `not_used >= void_total`. This
      fact is checked by quite a few assertions.
      However, if a program has low maximum residency but allocates a lot in
      the nursery then these assertions were failing (see #16753 and #15903)
      because `LdvCensusForDead` was observing dead closures from the nursery
      which totalled more than the `not_used`. The same closures were not
      counted by `heapCensus`.
      Therefore, it seems that the correct fix is to make `LdvCensusForDead`
      agree with `heapCensus` and not traverse the nursery for dead closures.
      Fixes #16100 #16753 #15903 #8982
      (cherry picked from commit 1dc61c1a)
    • Matthew Pickering's avatar
      rts: Correct assertion in LDV_recordDead · b802a7b2
      Matthew Pickering authored
      It is possible that void_total is exactly equal to not_used and the
      other assertions for this check for <= rather than <.
      (cherry picked from commit a196d9c3)
    • Matthew Pickering's avatar
      rts: Correct handling of LARGE ARR_WORDS in LDV profiler · 11498aeb
      Matthew Pickering authored
      This implements the correct fix for #11627 by skipping over the slop
      (which is zeroed) rather than adding special case logic for LARGE
      ARR_WORDS which runs the risk of not performing a correct census by
      ignoring any subsequent blocks.
      This approach implements similar logic to that in Sanity.c
      (cherry picked from commit 808a87ff)
    • Simon Peyton Jones's avatar
      Fix erroneous float in CoreOpt · 2428986b
      Simon Peyton Jones authored
      The simple optimiser was making an invalid transformation
      to join points -- yikes.  The fix is easy.
      I also added some documentation about the fact that GHC uses
      a slightly more restrictive version of join points than does
      the paper.
      Fix #16918
      (cherry picked from commit d2e290d3)
    • Ömer Sinan Ağacan's avatar
      Minor refactoring in CoreSimpl · 91d12f4e
      Ömer Sinan Ağacan authored
      When `join_ids` is empty `extendVarSetList existing_joins join_ids` is
      already no-op, so no need to check whether `join_ids` is empty or not
      before extending the joins set.
      (cherry picked from commit 897a59a5)
    • Ben Gamari's avatar
      Release GHC 8.8.1 · 0cc897f4
      Ben Gamari authored
    • Ben Gamari's avatar
      Bump Cabal submodule to 3.0 · 97222759
      Ben Gamari authored
    • Ben Gamari's avatar
      users-guide: Note TTG · 41a9c8ca
      Ben Gamari authored
    • Ben Gamari's avatar
      gitlab-ci: Manually set SPHINXBUILD on Windows · ecf291a3
      Ben Gamari authored
      For some reason configure seems unable to find it on its own. Let's try
      giving it a hint.
      Addresses #16398.
      (cherry picked from commit 7e404afd)
    • Simon Peyton Jones's avatar
      Don't float unlifted join points to top level · 06dc91c1
      Simon Peyton Jones authored
      Ticket #16978 showed that we were floating a recursive,
      unlifted join point to top level.  It's very much a corner
          joinrec j :: Int#
                  j = jump j
          in ...
      But somehow it showed up in a real program.
      For non-recursive bindings in SetLevels.lvlBind we were already
      (correctly) checking for unlifted bindings, but when I wrote
      that code I didn't think that a /recursive/ binding could be
      unlifted but /join-points/ can be!
      Actually I don't think that SetLevels should be floating
      join points at all.  SetLevels really floats things to move
      stuff out of loops and save allocation; but none of that applies
      to join points.  The only reason to float join points is in
      cases like
         join j1 x = join j2 y = ...
                     in ...
      which we might want to swizzle to
         join j2 x y = ... in
         join j1 x = ...
         in ...
      because now j1 looks small and might be inlined away altogether.
      But this is a very local float perhaps better done in the simplifier.
      Still: this patch fixes the crash, and does so in a way that is
      harmless if/when we change our strategy for floating join points.
      (cherry picked from commit 7d8d0012)
    • Ben Gamari's avatar
      testsuite: Add testsuite for #16978 · 489916c6
      Ben Gamari authored
      (cherry picked from commit 3b31a94d)
    • Ömer Sinan Ağacan's avatar
      Add test for #16893 · a1e2f461
      Ömer Sinan Ağacan authored
    • Ben Gamari's avatar
      base: Don't inline eqTypeRep · 220ab887
      Ben Gamari authored
      Issue #16893 reveals that the unsafeCoercion# in eqTypeRep can float in
      a way that compromises type safety. A real solution for this sadly won't
      be ready for 8.10 so this is a stop-gap measure for 8.8.