Skip to content
Snippets Groups Projects
  1. Jun 04, 2019
  2. Jun 03, 2019
  3. Jun 01, 2019
    • Ömer Sinan Ağacan's avatar
      rts: Remove unused decls from CNF.h · 2e297b36
      Ömer Sinan Ağacan authored and Marge Bot's avatar Marge Bot committed
      2e297b36
    • Ömer Sinan Ağacan's avatar
      Fix rewriting invalid shifts to errors · 1503da32
      Ömer Sinan Ağacan authored and Marge Bot's avatar Marge Bot committed
      Fixes #16449.
      
      5341edf3 removed a code in rewrite rules for bit shifts, which broke the
      "silly shift guard", causing generating invalid bit shifts or heap
      overflow in compile time while trying to evaluate those invalid bit
      shifts.
      
      The "guard" is explained in Note [Guarding against silly shifts] in
      PrelRules.hs.
      
      More specifically, this was the breaking change:
      
          --- a/compiler/prelude/PrelRules.hs
          +++ b/compiler/prelude/PrelRules.hs
          @@ -474,12 +474,11 @@ shiftRule shift_op
                  ; case e1 of
                      _ | shift_len == 0
                        -> return e1
          -             | shift_len < 0 || wordSizeInBits dflags < shift_len
          -             -> return (mkRuntimeErrorApp rUNTIME_ERROR_ID wordPrimTy
          -                                        ("Bad shift length" ++ show shift_len))
      
      This patch reverts this change.
      
      Two new tests added:
      
      - T16449_1: The original reproducer in #16449. This was previously
        casing a heap overflow in compile time when CmmOpt tries to evaluate
        the large (invalid) bit shift in compile time, using `Integer` as the
        result type. Now it builds as expected. We now generate an error for
        the shift as expected.
      
      - T16449_2: Tests code generator for large (invalid) bit shifts.
      1503da32
    • Ryan Scott's avatar
      Fix space leaks in dynLoadObjs (#16708) · 76e58890
      Ryan Scott authored and Marge Bot's avatar Marge Bot committed
      When running the test suite on a GHC built with the `quick` build
      flavour, `-fghci-leak-check` noticed some space leaks. Careful
      investigation led to `Linker.dynLoadObjs` being the culprit.
      Pattern-matching on `PeristentLinkerState` and a dash of `$!` were
      sufficient to fix the issue. (ht to mpickering for his suggestions,
      which were crucial to discovering a fix)
      
      Fixes #16708.
      76e58890
    • Ryan Scott's avatar
      Reject nested foralls in foreign imports (#16702) · 45f88494
      Ryan Scott authored and Marge Bot's avatar Marge Bot committed
      This replaces a panic observed in #16702 with a simple error message
      stating that nested `forall`s simply aren't allowed in the type
      signature of a `foreign import` (at least, not at present).
      
      Fixes #16702.
      45f88494
    • Nathan Collins's avatar
      Improve ThreadId Show instance · 1d43d4a3
      Nathan Collins authored and Marge Bot's avatar Marge Bot committed
      By making it include parens when a derived instance would. For example, this changes the (hypothetical) code `show (Just (ThreadId 3))` to produce `"Just (ThreadId 3)"` instead of the current `"Just ThreadId 3"`.
      1d43d4a3
  4. May 31, 2019
  5. May 30, 2019
Loading