Skip to content
Snippets Groups Projects
  1. Oct 19, 2024
  2. Oct 18, 2024
    • Matthew Craven's avatar
      Revert "CI: Disable the test-cabal-reinstall job" · b3c00c62
      Matthew Craven authored and Cheng Shao's avatar Cheng Shao committed
      This reverts commit 38c3afb6.
      b3c00c62
    • Matthew Craven's avatar
      Repair the 'build-cabal' hadrian target · dbe27152
      Matthew Craven authored and Cheng Shao's avatar Cheng Shao committed
      Fixes #23117. Fixes #23281. Fixes #23490.
      
      This required:
       * Updating the bit-rotted compiler/Setup.hs and its setup-depends
       * Listing a few recently-added libraries and utilities
         in cabal.project-reinstall
       * Setting allow-boot-library-installs to 'True' since Cabal
         now considers the 'ghc' package itself a boot library for
         the purposes of this flag
      
      Additionally, the allow-newer block in cabal.project-reinstall
      was removed.  This block was probably added because when the
      libraries/Cabal submodule is too new relative to the cabal-install
      executable, solving the setup-depends for any package with a custom
      setup requires building an old Cabal (from Hackage) against the
      in-tree version of base, and this can fail un-necessarily due to
      tight version bounds on base.  However, the blind allow-newer can
      also cause the solver to go berserk and choose a stupid build plan
      that has no business succeeding, and the failures when this happens
      are dreadfully confusing. (See #23281 and #24363.)
      
      Why does setup-depends solving insist on an old version of Cabal? See:
        https://github.com/haskell/cabal/blob/0a0b33983b0f022b9697f7df3a69358ee9061a89/cabal-install/src/Distribution/Client/ProjectPlanning.hs#L1393-L1410
      
      The right solution here is probably to use the in-tree cabal-install
      from libraries/Cabal/cabal-install with the build-cabal target rather
      than whatever the environment happens to provide.  But this is left
      for future work.
      dbe27152
    • Matthew Craven's avatar
      Move tests T11462 and T11525 into tests/tcplugins · 826852e9
      Matthew Craven authored and Cheng Shao's avatar Cheng Shao committed
      826852e9
    • Matthew Craven's avatar
      Remove reference to non-existent file in haddock.cabal · 366a1109
      Matthew Craven authored and Cheng Shao's avatar Cheng Shao committed
      366a1109
    • Matthew Craven's avatar
      Bump transformers submodule · eb67875f
      Matthew Craven authored and Cheng Shao's avatar Cheng Shao committed
      The svg image files mentioned in transformers.cabal were
      previously not checked in, which broke sdist generation.
      eb67875f
    • Cheng Shao's avatar
      rts: fix pointer overflow undefined behavior in bytecode interpreter · 5bcfefd5
      Cheng Shao authored and Marge Bot's avatar Marge Bot 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.
      5bcfefd5
    • Cheng Shao's avatar
      Revert "compiler: start deprecating cmmToRawCmmHook" · 525d451e
      Cheng Shao authored and Marge Bot's avatar Marge Bot committed
      This reverts commit 1c064ef1. Turns
      out the GHC-WPC project does use it to observe Cmm in the pipeline,
      see #25363.
      525d451e
  3. Oct 17, 2024
Loading