Skip to content
Snippets Groups Projects
  1. May 13, 2022
  2. May 12, 2022
    • Matthew Pickering's avatar
      hadrian: Flag cabal flag handling · 7b3c91b8
      Matthew Pickering authored and Zubin's avatar Zubin committed
      This patch basically deletes some ad-hoc handling of Cabal Flags and
      replaces it with a correct query of the LocalBuildInfo. The flags in the
      local build info can be modified by users by passing hadrian options
      
      For example (!4331)
      
      ```
      *.genapply.cabal.configure.opts += --flags=unregisterised
      ```
      
      And all the flags specified by the `Cabal Flags` builder were already
      passed to configure properly using `--flags`.
      
      (cherry picked from commit c832ae93)
      7b3c91b8
  3. May 10, 2022
    • Matthew Pickering's avatar
      bytestring: Bump to 0.11.3.1 · c4d0fd0c
      Matthew Pickering authored
      Updates bytestring submodule
      
      Ticket #21196
      c4d0fd0c
    • Greg Steuck's avatar
      Disable warnings for unused goto labels · 78b56d99
      Greg Steuck authored and Matthew Pickering's avatar Matthew Pickering committed
      Clang on OpenBSD aborts compilation with this diagnostics:
      ```
      % "inplace/bin/ghc-stage1" -optc-Wno-error=unused-label -optc-Wall -optc-Werror -optc-Wall -optc-Wextra -optc-Wstrict-prototypes -optc-Wmissing-prototypes -optc-Wmissing-declarations -optc-Winline -optc-Wpointer-arith -optc-Wmissing-noreturn -optc-Wnested-externs -optc-Wredundant-decls -optc-Wno-aggregate-return -optc-fno-strict-aliasing -optc-fno-common -optc-Irts/dist-install/build/./autogen -optc-Irts/include/../dist-install/build/include -optc-Irts/include/. -optc-Irts/. -optc-DCOMPILING_RTS -optc-DFS_NAMESPACE=rts -optc-Wno-unknown-pragmas -optc-O2 -optc-fomit-frame-pointer -optc-g -optc-DRtsWay=\"rts_v\" -static  -O0 -H64m -Wall -fllvm-fill-undef-with-garbage    -Werror -this-unit-id rts -dcmm-lint     -package-env - -i -irts -irts/dist-install/build -Irts/dist-install/build -irts/dist-install/build/./autogen -Irts/dist-install/build/./autogen -Irts/include/../dist-install/build/include -Irts/include/. -Irts/. -optP-DCOMPILING_RTS -optP-DFS_NAMESPACE=rts        -O2 -Wcpp-undef   -Wnoncanonical-monad-instances  -c rts/linker/Elf.c -o rts/dist-install/build/linker/Elf.o
      
      rts/linker/Elf.c:2169:1: error:
           error: unused label 'dl_iterate_phdr_fail' [-Werror,-Wunused-label]
           |
      2169 | dl_iterate_phdr_fail:
           | ^
      dl_iterate_phdr_fail:
      ^~~~~~~~~~~~~~~~~~~~~
      
      rts/linker/Elf.c:2172:1: error:
           error: unused label 'dlinfo_fail' [-Werror,-Wunused-label]
           |
      2172 | dlinfo_fail:
           | ^
      dlinfo_fail:
      ^~~~~~~~~~~~
      2 errors generated.
      ```
      
      (cherry picked from commit 8961d632)
      78b56d99
    • Greg Steuck's avatar
      Kill a use of %n format specifier · fd5e1bd6
      Greg Steuck authored and Matthew Pickering's avatar Matthew Pickering committed
      This format has been used as a security exploit vector for decades
      now.  Some operating systems (OpenBSD, Android, MSVC). It is targeted
      for removal in C2X standard:
      http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2834.htm
      
      This requires extending the debug message function to return the
      number of bytes written (like printf(3)), to permit %n format
      specifier in one in one invocation of statsPrintf() in
      report_summary().
      
      Implemented by Matthias Kilian (kili<AT>outback.escape.de)
      
      (cherry picked from commit e2c48b98)
      fd5e1bd6
    • Ben Gamari's avatar
      testsuite: Add test for #21465 · 774cef4e
      Ben Gamari authored and Matthew Pickering's avatar Matthew Pickering committed
      (cherry picked from commit 284f33d6)
      774cef4e
    • Ben Gamari's avatar
      rts: Ensure that XMM registers are preserved on Win64 · 3d40b5fa
      Ben Gamari authored and Matthew Pickering's avatar Matthew Pickering committed
      Previously we only preserved the bottom 64-bits of the callee-saved
      128-bit XMM registers, in violation of the Win64 calling convention.
      Fix this.
      
      Fixes #21465.
      
      (cherry picked from commit baac50fb)
      3d40b5fa
    • Hécate Kleidukos's avatar
      Add documentation to the ByteArray# primetype. · 6be905f2
      Hécate Kleidukos authored and Matthew Pickering's avatar Matthew Pickering committed
      close #21417
      
      (cherry picked from commit 60071076)
      6be905f2
  4. May 09, 2022
    • Andreas Klebinger's avatar
      Fix a shadowing issue in StgUnarise. · 8ecdff13
      Andreas Klebinger authored and Zubin's avatar Zubin committed
      For I assume performance reasons we don't record no-op replacements
      during unarise. This lead to problems with code like this:
      
          f = \(Eta_B0 :: VoidType) x1 x2 ->
             ... let foo = \(Eta_B0 :: LiftedType) -> g x y Eta_B0
                 in ...
      
      Here we would record the outer Eta_B0 as void rep, but would not
      shadow Eta_B0 inside `foo` because this arg is single-rep and so
      doesn't need to replaced. But this means when looking at occurence
      sites we would check the env and assume it's void rep based on the
      entry we made for the (no longer in scope) outer `Eta_B0`.
      
      Fixes #21396 and the ticket has a few more details.
      
      (cherry picked from commit 49bd7584)
      8ecdff13
    • Matthew Pickering's avatar
      RTS: Zero gc_cpu_start and gc_cpu_end after accounting · 7109045a
      Matthew Pickering authored and Zubin's avatar Zubin committed
      When passed a combination of `-N` and `-qn` options the cpu time for
      garbage collection was being vastly overcounted because the counters
      were not being zeroed appropiately.
      
      When -qn1 is passed, only 1 of the N avaiable GC threads is chosen to
      perform work, the rest are idle. At the end of the GC period, stat_endGC
      traverses all the GC threads and adds up the elapsed time from each of
      them. For threads which didn't participate in this GC, the value of the
      cpu time should be zero, but before this patch, the counters were not
      zeroed and hence we would count the same elapsed time on many subsequent
      iterations (until the thread participated in a GC again).
      
      The most direct way to zero these fields is to do so immediately after
      the value is added into the global counter, after which point they are
      never used again.
      
      We also tried another approach where we would zero the counter in
      yieldCapability but there are some (undiagnosed) siations where a
      capbility would not pass through yieldCapability before the GC ended and
      the same double counting problem would occur.
      
      Fixes #21082
      
      (cherry picked from commit 840a6811)
      7109045a
    • ARATA Mizuki's avatar
      bitReverse functions in GHC.Word are since base-4.14.0.0, not 4.12.0.0 · 6da799a4
      ARATA Mizuki authored and Zubin's avatar Zubin committed
      They were added in 33173a51, which constitutes GHC 8.10.1 / base-4.14.0.0
      
      (cherry picked from commit 16d86b97)
      6da799a4
    • sheaf's avatar
      List GHC.Event.Internal in base.cabal on Windows · bb7e0333
      sheaf authored and Zubin's avatar Zubin committed
      GHC.Event.Internal was not listed in base.cabal on Windows. This caused
      undefined reference errors. This patch adds it back, by moving it out
      of the OS-specific logic in base.cabal.
      
      Fixes #21245.
      
      (cherry picked from commit 244da9eb)
      bb7e0333
    • Richard Eisenberg's avatar
      Make inert_cycle_breakers into a stack. · fb979c8b
      Richard Eisenberg authored and Zubin's avatar Zubin committed
      Close #20231.
      
      (cherry picked from commit 1617fed3)
      fb979c8b
    • Simon Peyton Jones's avatar
      Fix bug in weak loop-breakers in OccurAnal · 7fa56ee2
      Simon Peyton Jones authored and Zubin's avatar Zubin committed
      Note [Weak loop breakers] explains why we need to track variables free
      in RHS of rules.  But we need to do this for /inactive/ rules as well
      as active ones, unlike the rhs_fv_env stuff.
      
      So we now have two fields in node Details, one for free vars of
      active rules, and one for free vars of all rules.
      
      This was shown up by #20820, which is now fixed.
      
      (cherry picked from commit ad835531)
      7fa56ee2
    • vdukhovni's avatar
      Use POSIX shell syntax to redirect stdout/err · de5e1651
      vdukhovni authored and Zubin's avatar Zubin committed
      FreeBSD (and likely NetBSD) /bin/sh does not support '>& word' to
      redirect stdout + stderr.  (Also the preferred syntax in bash would
      be '&> word' to avoid surprises when `word` is "-" or a number).
      
      Resolves: #20760
      (cherry picked from commit d3c7f9be)
      de5e1651
    • John Ericson's avatar
      Let LLVM and C handle > native size arithmetic · 8105bbb0
      John Ericson authored and Zubin's avatar Zubin committed
      NCG needs to call slow FFI functions where we "borrow" the C compiler's
      implementation, but there is no reason why we need to do that for LLVM,
      or the unregisterized backend where everything is via C anyways!
      
      (cherry picked from commit beef6135)
      (cherry picked from commit ebf9d471)
      8105bbb0
    • Sergei Trofimovich's avatar
      UNREG: implement 64-bit mach ops for 32-bit targets · ef09e16b
      Sergei Trofimovich authored and Zubin's avatar Zubin committed
      
      Noticed build failures like
      ```
      ghc-stage1: panic! (the 'impossible' happened)
        GHC version 9.3.20210721:
              pprCallishMachOp_for_C: MO_x64_Ne not supported!
      ```
      on `--tagget=hppa2.0-unknown-linux-gnu`.
      
      The change does not fix all 32-bit unreg target problems,
      but at least allows linking final ghc binaries.
      
      Signed-off-by: default avatarSergei Trofimovich <slyfox@gentoo.org>
      (cherry picked from commit 20173629)
      (cherry picked from commit 1f914ce7)
      ef09e16b
    • Ryan Scott's avatar
      Hadrian: Allow building with GHC 9.2 · 78abeb10
      Ryan Scott authored and Zubin's avatar Zubin committed
      A separate issue is the fact that many of `hadrian`'s modules produce
      `-Wincomplete-uni-patterns` warnings under 9.2, but that is probably best left
      to a separate patch.
      
      (cherry picked from commit 724df9c3)
      (cherry picked from commit db881a97)
      78abeb10
    • Ben Gamari's avatar
      gitlab-ci: Add release job for armv7-deb10 · a1f66c83
      Ben Gamari authored and Zubin's avatar Zubin committed
      (cherry picked from commit de772f89)
      a1f66c83
    • sheaf's avatar
      GHCi: don't normalise partially instantiated types · 509ed1a9
      sheaf authored and Zubin's avatar Zubin committed
        This patch skips performing type normalisation when we haven't
        fully instantiated the type. That is, in tcRnExpr
        (used only for :type in GHCi), skip normalisation if
        the result type responds True to isSigmaTy.
      
        Fixes #20974
      
      (cherry picked from commit 4ad8ce0b)
      509ed1a9
  5. Apr 06, 2022
  6. Mar 05, 2022
  7. Mar 04, 2022
    • Robert Hensing's avatar
      Add test case for C++ exception handling · ddf209f3
      Robert Hensing authored and Ben Gamari's avatar Ben Gamari committed
      (cherry picked from commit 2133ab18)
      ddf209f3
    • Robert Hensing's avatar
      Add -fcompact-unwind · 1831d9eb
      Robert Hensing authored and Ben Gamari's avatar Ben Gamari committed
      This gives users the choice to enable __compact_unwind sections
      when linking. These were previously hardcoded to be removed.
      
      This can be used to solved the problem "C++ does not catch
      exceptions when used with Haskell-main and linked by ghc",
      ghc/ghc#11829
      
      It does not change the default behavior, because I can not
      estimate the impact this would have.
      
      When Apple first introduced the compact unwind ABI, a number of
      open source projects have taken the easy route of disabling it,
      avoiding errors or even just warnings shortly after its
      introduction.
      
      Since then, about a decade has passed, so it seems quite possible
      that Apple itself, and presumably many programs with it, have
      successfully switched to the new format, to the point where the
      old __eh_frame section support is in disrepair. Perhaps we should
      get along with the program, but for now we can test the waters
      with this flag, and use it to fix packages that need it.
      
      (cherry picked from commit 1496a2a7)
      1831d9eb
    • Tamar Christina's avatar
      windows: include aux lib dir path explicitly so e.g. cabal can't override it. · b3d7230e
      Tamar Christina authored and Ben Gamari's avatar Ben Gamari committed
      (cherry picked from commit 557db332)
      b3d7230e
    • Matthew Pickering's avatar
      Change lookupIdSubst panic back to a warning · 0438cc2e
      Matthew Pickering authored
      We don't want to backport the number of commits which were necessary to
      fix this issue for the 9.2.2 release so for now just turn it back into a
      warning.
      
      Partially reverts 0e5236ad
      0438cc2e
    • Ben Gamari's avatar
      Bump Cabal submodule to 3.6.3.0 · fbab2328
      Ben Gamari authored and Matthew Pickering's avatar Matthew Pickering committed
      fbab2328
    • Ben Gamari's avatar
      Ensure that wired-in exception closures aren't GC'd · e49057c5
      Ben Gamari authored and Matthew Pickering's avatar Matthew Pickering committed
      As described in Note [Wired-in exceptions are not CAFfy], a small set of
      built-in exception closures get special treatment in the code generator,
      being declared as non-CAFfy despite potentially containing CAF
      references. The original intent of this treatment for the RTS to then
      add StablePtrs for each of the closures, ensuring that they are not
      GC'd. However, this logic was not applied consistently and eventually
      removed entirely in 951c1fb0. This lead to #21141.
      
      Here we fix this bug by reintroducing the StablePtrs and document the
      status quo.
      
      Closes #21141.
      
      (cherry picked from commit 2ac45ba0)
      e49057c5
Loading