1. 03 Nov, 2019 7 commits
    • 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
      transaction.
      
      (cherry picked from commit 998f2e18)
      432a270e
    • 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)
      9c7dde7f
    • 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
      8.2.1).
      
      (cherry picked from commit 3ad35f76)
      68dc5b0a
    • 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...
      4c376e30
    • Ben Gamari's avatar
      testsuite: Add test for #17414 · d04492c0
      Ben Gamari authored
      (cherry picked from commit 1ce3d982)
      d04492c0
    • 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
      writes.
      
      (cherry picked from commit 08810f12)
      176367f8
    • Ö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, 7.1.2.3 ...).
      
      (cherry picked from commit bf9dfe1c)
      061f7f9b
  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
      4ffb18ea
    • 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
      a2a0e6f3
    • Ben Gamari's avatar
      testsuite: Add cut-down test for #16978 · 6bd8b6d1
      Ben Gamari authored
      6bd8b6d1
    • 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)
      edaa5bd8
    • 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)
      b802a7b2
    • 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)
      11498aeb
    • 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)
      2428986b
    • Ö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)
      91d12f4e
    • Ben Gamari's avatar
      Release GHC 8.8.1 · 0cc897f4
      Ben Gamari authored
      0cc897f4
    • Ben Gamari's avatar
      Bump Cabal submodule to 3.0 · 97222759
      Ben Gamari authored
      97222759
    • Ben Gamari's avatar
      users-guide: Note TTG · 41a9c8ca
      Ben Gamari authored
      41a9c8ca
    • 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)
      ecf291a3
    • 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
      case:
      
          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)
      06dc91c1
    • Ben Gamari's avatar
      testsuite: Add testsuite for #16978 · 489916c6
      Ben Gamari authored
      (cherry picked from commit 3b31a94d)
      489916c6
    • Ömer Sinan Ağacan's avatar
      Add test for #16893 · a1e2f461
      Ömer Sinan Ağacan authored
      a1e2f461
    • 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.
      220ab887
  8. 09 Aug, 2019 1 commit
  9. 06 Aug, 2019 1 commit
  10. 05 Aug, 2019 3 commits
    • Moritz Angermann's avatar
      Add _GLOBAL_OFFSET_TABLE_ support · aa23a017
      Moritz Angermann authored
      This adds lookup logic for _GLOBAL_OFFSET_TABLE_ as well as
      relocation logic for R_ARM_BASE_PREL and R_ARM_GOT_BREL which
      the gnu toolchain (gas, gcc, ...) prefers to produce.  Apparently
      recent llvm toolchains will produce those as well.
      
      (cherry picked from commit 82693938)
      aa23a017
    • Roland Senn's avatar
      Fix #8487: Debugger confuses variables · e3870705
      Roland Senn authored
      To display the free variables for a single breakpoint, GHCi pulls out the
      information from the fields `modBreaks_breakInfo` and `modBreaks_vars`
      of the `ModBreaks` data structure. For a specific breakpoint this gives 2
      lists of types 'Id` (`Var`) and `OccName`. They are used to create the Id's
      for the free variables and must be kept in sync:
      If we remove an element from the Names list, then we also must remove the
      corresponding element from the OccNames list.
      
      (cherry picked from commit 32be4461)
      e3870705
    • Ben Gamari's avatar
      Bump text submodule to 1.2.4.0-rc · 0acb171c
      Ben Gamari authored
      0acb171c
  11. 04 Aug, 2019 1 commit
  12. 02 Aug, 2019 1 commit
  13. 23 Jul, 2019 1 commit
    • Ivan Kasatenko's avatar
      Fix T16916 CI failures (#16966) · a5a0d717
      Ivan Kasatenko authored
      1. Slightly increased the waiting time for the tested effect to be more
         profound.
      
      2. Introduced measuring of the actual time spent waiting and adjusing
         CPU time by it to compensate for threadDelay waiting time
         inconsistencies.
      a5a0d717