Skip to content
Snippets Groups Projects
  1. Jun 02, 2024
  2. Jun 01, 2024
  3. May 31, 2024
  4. May 30, 2024
    • Jakob Brünker's avatar
      Add diagrams to Arrows documentation · 1bc66ee4
      Jakob Brünker authored and Marge Bot's avatar Marge Bot committed
      This adds diagrams to the documentation of Arrows, similar to the ones found on
      https://www.haskell.org/arrows/.
      
      It does not add diagrams for ArrowChoice for the time being, mainly because it's
      not clear to me how to visually distinguish them from the ones for Arrow. Ideally,
      you might want to do something like highlight the arrows belonging to the same
      tuple or same Either in common colors, but that's not really possible with unicode.
      1bc66ee4
    • Matthew Pickering's avatar
      ghcup-metadata: Fix metadata generation · 95ef2d58
      Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
      There were some syntax errors in the generation script which were
      preventing it from running.
      
      I have tested this with:
      
      ```
      nix shell --extra-experimental-features nix-command -f .gitlab/rel_eng -c ghcup-metadata --metadata ghcup-0.0.7.yaml --date="2024-05-27" --pipeline-id=95534 --version=9.11.20240525
      ```
      
      which completed successfully.
      95ef2d58
    • Sylvain Henry's avatar
      JS: remove useless h$CLOCK_REALTIME (#23202) · 5ff83bfc
      Sylvain Henry authored and Marge Bot's avatar Marge Bot committed
      5ff83bfc
    • Cheng Shao's avatar
      rts: use __builtin_offsetof to implement STG_FIELD_OFFSET · 05c4fafb
      Cheng Shao authored and Marge Bot's avatar Marge Bot committed
      This patch fixes the STG_FIELD_OFFSET macro definition by using
      __builtin_offsetof, which is what gcc/clang uses to implement offsetof
      in standard C. The previous definition that uses NULL pointer involves
      subtle undefined behavior in C and thus reported by
      UndefinedBehaviorSanitizer as well:
      
      ```
      rts/Capability.h:243:58: runtime error: member access within null pointer of type 'Capability' (aka 'struct Capability_')
      SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Capability.h:243:58
      ```
      05c4fafb
    • Cheng Shao's avatar
      rts: fix an unaligned load in nonmoving gc · c77a48af
      Cheng Shao authored and Marge Bot's avatar Marge Bot committed
      This patch fixes an unaligned load in nonmoving gc by ensuring the
      closure address is properly untagged first before attempting to
      prefetch its header. The unaligned load is reported by
      UndefinedBehaviorSanitizer:
      
      ```
      rts/sm/NonMovingMark.c:921:9: runtime error: member access within misaligned address 0x0042005f3a71 for type 'StgClosure' (aka 'struct StgClosure_'), which requires 8 byte alignment
      0x0042005f3a71: note: pointer points here
       00 00 00  98 43 13 8e 12 7f 00 00  50 3c 5f 00 42 00 00 00  58 17 b7 92 12 7f 00 00  89 cb 5e 00 42
                    ^
      SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/sm/NonMovingMark.c:921:9
      ```
      
      This issue had previously gone unnoticed since it didn't really harm
      runtime correctness, the invalid header address directly loaded from a
      tagged pointer is only used as prefetch address and will not cause
      segfaults. However, it still should be corrected because the prefetch
      would be rendered useless by this issue, and untagging only involves a
      single bitwise operation without memory access so it's cheap enough to
      add.
      c77a48af
    • Cheng Shao's avatar
      rts: ensure gc_thread/gen_workspace is allocated with proper alignment · 7a660042
      Cheng Shao authored and Marge Bot's avatar Marge Bot committed
      gc_thread/gen_workspace are required to be aligned by 64 bytes.
      However, this property has not been properly enforced before, and
      numerous alignment violations at runtime has been caught by
      UndefinedBehaviorSanitizer that look like:
      
      ```
      rts/sm/GC.c:1167:8: runtime error: member access within misaligned address 0x0000027a3390 for type 'gc_thread' (aka 'struct gc_thread_'), which requires 64 byte alignment
      0x0000027a3390: note: pointer points here
       00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00
                    ^
      SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/sm/GC.c:1167:8
      
      rts/sm/GC.c:1184:13: runtime error: member access within misaligned address 0x0000027a3450 for type 'gen_workspace' (aka 'struct gen_workspace_'), which requires 64 byte alignment
      0x0000027a3450: note: pointer points here
       00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00
                    ^
      SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/sm/GC.c:1184:13
      ```
      
      This patch fixes the gc_thread/gen_workspace misalignment issue by
      explicitly allocating them with alignment constraint.
      7a660042
    • Cheng Shao's avatar
      testsuite: bump MultiLayerModulesDefsGhciReload timeout to 10x · e17f2df9
      Cheng Shao authored and Marge Bot's avatar Marge Bot committed
      e17f2df9
    • Andreas Klebinger's avatar
      Reword error resulting from missing -XBangPatterns. · 45a4a5f3
      Andreas Klebinger authored and Marge Bot's avatar Marge Bot committed
      It can be the result of either a bang pattern or strict binding,
      so now we say so instead of claiming it must be a bang pattern.
      
      Fixes #21032
      45a4a5f3
    • Jan Hrček's avatar
      Replace outdated code example · 05f4f142
      Jan Hrček authored and Marge Bot's avatar Marge Bot committed
      05f4f142
    • Jan Hrček's avatar
      Remove no longer relevant reference to comments · 87591368
      Jan Hrček authored and Marge Bot's avatar Marge Bot committed
      87591368
    • Jan Hrček's avatar
      Incorporate review feedback · 77760cd7
      Jan Hrček authored and Marge Bot's avatar Marge Bot committed
      77760cd7
    • Jan Hrček's avatar
      Update exactprint docs · 3c97c74a
      Jan Hrček authored and Marge Bot's avatar Marge Bot committed
      3c97c74a
    • Matthew Pickering's avatar
      ci: Update ci-images commit for fedora38 image · d0401335
      Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
      The fedora38 nightly job has been failing for quite a while because
      `diff` was no longer installed. The ci-images bump explicitly installs
      `diffutils` into these images so hopefully they now pass again.
      d0401335
    • Andreas Klebinger's avatar
      UnliftedFFITypes: Allow `(# #)` as argument when it's the only argument. · e0029e3d
      Andreas Klebinger authored and Marge Bot's avatar Marge Bot committed
      This allows representing functions like:
      
          int foo(void);
      
      to be imported like this:
      
          foreign import ccall "a_number_c"
            c_number :: (# #) -> Int64#
      
      Which can be useful when the imported function isn't implicitly
      stateful.
      e0029e3d
    • Cheng Shao's avatar
      rts: fix missing function prototypes in ClosureMacros.h · 3ca72ad9
      Cheng Shao authored and Marge Bot's avatar Marge Bot committed
      3ca72ad9
  5. May 28, 2024
    • Teo Camarasu's avatar
      testsuite: mark tests broken by #24886 · 62dded28
      Teo Camarasu authored
      Now that `template-haskell` is no longer wired-in.
      These tests are triggering #24886, and so need to be marked broken.
      62dded28
    • Teo Camarasu's avatar
      template-haskell: Move wired-ins to ghc-internal · 228dcae6
      Teo Camarasu authored and Teo Camarasu's avatar Teo Camarasu committed
      Thus we make `template-haskell` reinstallable and keep it as the public
      API for Template Haskell.
      All of the wired-in identifiers are moved to `ghc-internal`.
      This necessitates also moving much of `ghc-boot-th` into `ghc-internal`.
      These modules are then re-exported from `ghc-boot-th` and
      `template-haskell`.
      To avoid a dependency on `template-haskell` from `lib:ghc`, we instead
      depend on the TH ASTs via `ghc-boot-th`.
      
      As `template-haskell` no longer has special status, we can drop the
      logic adding an implicit dependency on `template-haskell` when using TH.
      We can also drop the `template-haskell-next` package, which was
      previously used when bootstrapping.
      
      When bootstrapping, we need to vendor the TH AST modules from
      `ghc-internal` into `ghc-boot-th`. This is controlled by the `bootstrap`
      cabal flag as before. See Note [Bootstrapping Template Haskell].
      
      We split out a GHC.Internal.TH.Lift module resolving #24752.
      This module is only built when not bootstrapping.
      
      Resolves #24703
      
      -------------------------
      Metric Increase:
          ghc_boot_th_dir
          ghc_boot_th_so
      -------------------------
      228dcae6
Loading