Skip to content
Snippets Groups Projects
  1. Dec 05, 2024
  2. Dec 04, 2024
  3. Dec 03, 2024
    • Luite Stegeman's avatar
      bump version to 9.6.7 · 6a99b45b
      Luite Stegeman authored
      6a99b45b
    • Ben Gamari's avatar
      ghci: Don't rely on Uniques in BRK_FUN · e77a6484
      Ben Gamari authored and Luite Stegeman's avatar Luite Stegeman committed
      This is a partial backport of the treatment given to modules names in
      !10448, removing the dependence of BRK_FUN on the representation of
      `Unique`.
      
      (cherry picked from commit ea2ea2d5)
      e77a6484
    • Jaro Reinders's avatar
      Refactor Unique to be represented by Word64 · 28ddf4cd
      Jaro Reinders authored and Luite Stegeman's avatar Luite Stegeman committed
      In #22010 we established that Int was not always sufficient to store all
      the uniques we generate during compilation on 32-bit platforms. This
      commit addresses that problem by using Word64 instead of Int for
      uniques.
      
      The core of the change is in GHC.Core.Types.Unique and
      GHC.Core.Types.Unique.Supply. However, the representation of uniques is
      used in many other places, so those needed changes too. Additionally, the RTS
      has been extended with an atomic_inc64 operation.
      
      One major change from this commit is the introduction of the Word64Set and
      Word64Map data types. These are adapted versions of IntSet and IntMap
      from the containers package. These are planned to be upstreamed in the
      future.
      
      As a natural consequence of these changes, the compiler will be a bit
      slower and take more space on 32-bit platforms. Our CI tests indicate
      around a 5% residency increase.
      
      Metric Increase:
          CoOpt_Read
          CoOpt_Singletons
          LargeRecord
          ManyAlternatives
          ManyConstructors
          MultiComponentModules
          MultiComponentModulesRecomp
          MultiLayerModulesTH_OneShot
          RecordUpdPerf
          T10421
          T10547
          T12150
          T12227
          T12234
          T12425
          T12707
          T13035
          T13056
          T13253
          T13253-spj
          T13379
          T13386
          T13719
          T14683
          T14697
          T14766
          T15164
          T15703
          T16577
          T16875
          T17516
          T18140
          T18223
          T18282
          T18304
          T18698a
          T18698b
          T18923
          T1969
          T19695
          T20049
          T21839c
          T3064
          T3294
          T4801
          T5030
          T5321FD
          T5321Fun
          T5631
          T5642
          T5837
          T6048
          T783
          T8095
          T9020
          T9198
          T9233
          T9630
          T9675
          T9872a
          T9872b
          T9872b_defer
          T9872c
          T9872d
          T9961
          TcPlugin_RewritePerf
          UniqLoop
          WWRec
          hard_hole_fits
      
      (cherry picked from commit 9edcb1fb)
      28ddf4cd
  4. Dec 02, 2024
  5. Nov 27, 2024
    • Sebastian Graf's avatar
      DmdAnal: Make `prompt#` lazy (#25439) · 38645237
      Sebastian Graf authored and Luite Stegeman's avatar Luite Stegeman committed
      This applies the same treatment to `prompt#` as for `catch#`.
      See `Note [Strictness for mask/unmask/catch/prompt]`.
      
      Fixes #25439.
      
      (cherry picked from commit 00d58ae1)
      38645237
    • Cheng Shao's avatar
      rts: fix pointer overflow undefined behavior in bytecode interpreter · a234c11a
      Cheng Shao authored and Luite Stegeman's avatar Luite Stegeman committed
      This patch fixes an unnoticed undefined behavior in the bytecode
      interpreter. It can be caught by building `rts/Interpreter.c` with
      `-fsanitize=pointer-overflow`, the warning message is something like:
      
      ```
      rts/Interpreter.c:1369:13: runtime error: addition of unsigned offset to 0x004200197660 overflowed to 0x004200197658
      SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1369:13
      rts/Interpreter.c:1265:13: runtime error: addition of unsigned offset to 0x004200197660 overflowed to 0x004200197658
      SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1265:13
      rts/Interpreter.c:1645:13: runtime error: addition of unsigned offset to 0x0042000b22f8 overflowed to 0x0042000b22f0
      SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1645:13
      ```
      
      Whenever we do something like `SpW(-1)`, the negative argument is
      implicitly converted to an unsigned integer type and causes pointer
      arithmetic overflow. It happens to be harmless for most targets since
      overflowing would wrap the result to desired value, but it's still
      coincidental and undefined behavior. Furthermore, it causes real
      damage to the wasm backend, given clang-20 will emit invalid wasm code
      that crashes at run-time for this kind of C code! (see
      https://github.com/llvm/llvm-project/issues/108770)
      
      The fix here is adding some explicit casts to ensure we always use the
      signed `ptrdiff_t` type as right hand operand of pointer arithmetic.
      
      (cherry picked from commit 5bcfefd5)
      a234c11a
    • Simon Peyton Jones's avatar
      Consider Wanteds with rewriters as insoluble · 680d8f5a
      Simon Peyton Jones authored and Luite Stegeman's avatar Luite Stegeman committed
      This MR fixes #25325
      
      See GHC.Tc.Types.Constraint, Note [Insoluble Wanteds], especially (IW2)
      
      There is a small change in the error message for T14172, but it looks
      entirely acceptable to me.
      
      (cherry picked from commit 083703a1)
      680d8f5a
  6. Nov 19, 2024
  7. Jun 30, 2024
  8. Jun 28, 2024
Loading