[Git][ghc/ghc][wip/9.6.5-backports] 4 commits: Disable `-fasm-shortcutting` on -O2 and warn about its usage.
Zubin (@wz1000)
gitlab at gitlab.haskell.org
Mon Apr 15 09:05:47 UTC 2024
Zubin pushed to branch wip/9.6.5-backports at Glasgow Haskell Compiler / GHC
Commits:
dd41d36f by Zubin Duggal at 2024-04-15T14:33:41+05:30
Disable `-fasm-shortcutting` on -O2 and warn about its usage.
This flag is known to result in unsound optimisations potentially resulting in
incorrect runtime behaviour (#24507).
(cherry picked from commit 4ae8d89e376d79b4188c61e6469c7f01d8445768)
- - - - -
ea08f128 by Zubin Duggal at 2024-04-15T14:33:41+05:30
Bump Cabal submodule to 3.10.3.0
- - - - -
252188bb by Zubin Duggal at 2024-04-15T14:33:41+05:30
Cherry pick
* Fix some primitives defined in GHC.JS.Prim
from
Base/JS: GHC.JS.Foreign.Callback module (issue 23126)
(cherry picked from commit 27d2978e5412f2bef4448e208182a03137dd5ee8)
- - - - -
650c34ab by Zubin Duggal at 2024-04-15T14:35:36+05:30
Prepare release 9.6.5
Metric Increase:
MultiLayerModulesTH_Make
Metric Decrease:
MultiLayerModulesTH_Make
- - - - -
15 changed files:
- compiler/GHC/Driver/Config/CmmToAsm.hs
- compiler/GHC/Driver/Session.hs
- configure.ac
- docs/users_guide/9.6.3-notes.rst
- docs/users_guide/9.6.4-notes.rst
- + docs/users_guide/9.6.5-notes.rst
- docs/users_guide/bugs.rst
- docs/users_guide/release-notes.rst
- docs/users_guide/using-optimisation.rst
- libraries/Cabal
- libraries/base/GHC/JS/Prim.hs
- libraries/base/base.cabal
- libraries/base/changelog.md
- testsuite/tests/backpack/cabal/bkpcabal02/bkpcabal02.stdout
- testsuite/tests/cabal/t18567/T18567.stderr
Changes:
=====================================
compiler/GHC/Driver/Config/CmmToAsm.hs
=====================================
@@ -66,7 +66,8 @@ initNCGConfig dflags this_mod = NCGConfig
, ncgDwarfSourceNotes = osElfTarget (platformOS (targetPlatform dflags)) && debugLevel dflags > 2 -- We produce GHC-specific source-note DIEs only with -g3
, ncgExposeInternalSymbols = gopt Opt_ExposeInternalSymbols dflags
, ncgCmmStaticPred = gopt Opt_CmmStaticPred dflags
- , ncgEnableShortcutting = gopt Opt_AsmShortcutting dflags
+ -- Disabled due to https://gitlab.haskell.org/ghc/ghc/-/issues/24507
+ , ncgEnableShortcutting = False -- gopt Opt_AsmShortcutting dflags
, ncgComputeUnwinding = debugLevel dflags > 0
, ncgEnableDeadCodeElimination = not (gopt Opt_InfoTableMap dflags)
-- Disable when -finfo-table-map is on (#20428)
=====================================
compiler/GHC/Driver/Session.hs
=====================================
@@ -3363,7 +3363,8 @@ fFlagsDeps = [
-- See Note [Updating flag description in the User's Guide]
-- See Note [Supporting CLI completion]
-- Please keep the list of flags below sorted alphabetically
- flagSpec "asm-shortcutting" Opt_AsmShortcutting,
+ depFlagSpec "asm-shortcutting" Opt_AsmShortcutting
+ "this flag is disabled on this ghc version due to unsoundness concerns (https://gitlab.haskell.org/ghc/ghc/-/issues/24507)",
flagGhciSpec "break-on-error" Opt_BreakOnError,
flagGhciSpec "break-on-exception" Opt_BreakOnException,
flagSpec "building-cabal-package" Opt_BuildingCabalPackage,
@@ -4002,7 +4003,8 @@ optLevelFlags -- see Note [Documenting optimisation flags]
, ([1,2], Opt_CaseMerge)
, ([1,2], Opt_CaseFolding)
, ([1,2], Opt_CmmElimCommonBlocks)
- , ([2], Opt_AsmShortcutting)
+ -- Disabled due to #24507
+ -- , ([2], Opt_AsmShortcutting)
, ([1,2], Opt_CmmSink)
, ([1,2], Opt_CmmStaticPred)
, ([1,2], Opt_CSE)
=====================================
configure.ac
=====================================
@@ -13,7 +13,7 @@ dnl
# see what flags are available. (Better yet, read the documentation!)
#
-AC_INIT([The Glorious Glasgow Haskell Compilation System], [9.6.4], [glasgow-haskell-bugs at haskell.org], [ghc-AC_PACKAGE_VERSION])
+AC_INIT([The Glorious Glasgow Haskell Compilation System], [9.6.5], [glasgow-haskell-bugs at haskell.org], [ghc-AC_PACKAGE_VERSION])
# Version on master must be X.Y (not X.Y.Z) for ProjectVersionMunged variable
# to be useful (cf #19058). However, the version must have three components
# (X.Y.Z) on stable branches (e.g. ghc-9.2) to ensure that pre-releases are
=====================================
docs/users_guide/9.6.3-notes.rst
=====================================
@@ -149,42 +149,3 @@ Included libraries
The package database provided with this distribution also contains a number of
packages other than GHC itself. See the changelogs provided with these packages
for further change information.
-
-.. ghc-package-list::
-
- libraries/array/array.cabal: Dependency of ``ghc`` library
- libraries/base/base.cabal: Core library
- libraries/binary/binary.cabal: Dependency of ``ghc`` library
- libraries/bytestring/bytestring.cabal: Dependency of ``ghc`` library
- libraries/Cabal/Cabal/Cabal.cabal: Dependency of ``ghc-pkg`` utility
- libraries/Cabal/Cabal-syntax/Cabal-syntax.cabal: Dependency of ``ghc-pkg`` utility
- libraries/containers/containers/containers.cabal: Dependency of ``ghc`` library
- libraries/deepseq/deepseq.cabal: Dependency of ``ghc`` library
- libraries/directory/directory.cabal: Dependency of ``ghc`` library
- libraries/exceptions/exceptions.cabal: Dependency of ``ghc`` and ``haskeline`` library
- libraries/filepath/filepath.cabal: Dependency of ``ghc`` library
- compiler/ghc.cabal: The compiler itself
- libraries/ghci/ghci.cabal: The REPL interface
- libraries/ghc-boot/ghc-boot.cabal: Internal compiler library
- libraries/ghc-boot-th/ghc-boot-th.cabal: Internal compiler library
- libraries/ghc-compact/ghc-compact.cabal: Core library
- libraries/ghc-heap/ghc-heap.cabal: GHC heap-walking library
- libraries/ghc-prim/ghc-prim.cabal: Core library
- libraries/haskeline/haskeline.cabal: Dependency of ``ghci`` executable
- libraries/hpc/hpc.cabal: Dependency of ``hpc`` executable
- libraries/integer-gmp/integer-gmp.cabal: Core library
- libraries/libiserv/libiserv.cabal: Internal compiler library
- libraries/mtl/mtl.cabal: Dependency of ``Cabal`` library
- libraries/parsec/parsec.cabal: Dependency of ``Cabal`` library
- libraries/pretty/pretty.cabal: Dependency of ``ghc`` library
- libraries/process/process.cabal: Dependency of ``ghc`` library
- libraries/stm/stm.cabal: Dependency of ``haskeline`` library
- libraries/template-haskell/template-haskell.cabal: Core library
- libraries/terminfo/terminfo.cabal: Dependency of ``haskeline`` library
- libraries/text/text.cabal: Dependency of ``Cabal`` library
- libraries/time/time.cabal: Dependency of ``ghc`` library
- libraries/transformers/transformers.cabal: Dependency of ``ghc`` library
- libraries/unix/unix.cabal: Dependency of ``ghc`` library
- libraries/Win32/Win32.cabal: Dependency of ``ghc`` library
- libraries/xhtml/xhtml.cabal: Dependency of ``haddock`` executable
-
=====================================
docs/users_guide/9.6.4-notes.rst
=====================================
@@ -87,42 +87,3 @@ Included libraries
The package database provided with this distribution also contains a number of
packages other than GHC itself. See the changelogs provided with these packages
for further change information.
-
-.. ghc-package-list::
-
- libraries/array/array.cabal: Dependency of ``ghc`` library
- libraries/base/base.cabal: Core library
- libraries/binary/binary.cabal: Dependency of ``ghc`` library
- libraries/bytestring/bytestring.cabal: Dependency of ``ghc`` library
- libraries/Cabal/Cabal/Cabal.cabal: Dependency of ``ghc-pkg`` utility
- libraries/Cabal/Cabal-syntax/Cabal-syntax.cabal: Dependency of ``ghc-pkg`` utility
- libraries/containers/containers/containers.cabal: Dependency of ``ghc`` library
- libraries/deepseq/deepseq.cabal: Dependency of ``ghc`` library
- libraries/directory/directory.cabal: Dependency of ``ghc`` library
- libraries/exceptions/exceptions.cabal: Dependency of ``ghc`` and ``haskeline`` library
- libraries/filepath/filepath.cabal: Dependency of ``ghc`` library
- compiler/ghc.cabal: The compiler itself
- libraries/ghci/ghci.cabal: The REPL interface
- libraries/ghc-boot/ghc-boot.cabal: Internal compiler library
- libraries/ghc-boot-th/ghc-boot-th.cabal: Internal compiler library
- libraries/ghc-compact/ghc-compact.cabal: Core library
- libraries/ghc-heap/ghc-heap.cabal: GHC heap-walking library
- libraries/ghc-prim/ghc-prim.cabal: Core library
- libraries/haskeline/haskeline.cabal: Dependency of ``ghci`` executable
- libraries/hpc/hpc.cabal: Dependency of ``hpc`` executable
- libraries/integer-gmp/integer-gmp.cabal: Core library
- libraries/libiserv/libiserv.cabal: Internal compiler library
- libraries/mtl/mtl.cabal: Dependency of ``Cabal`` library
- libraries/parsec/parsec.cabal: Dependency of ``Cabal`` library
- libraries/pretty/pretty.cabal: Dependency of ``ghc`` library
- libraries/process/process.cabal: Dependency of ``ghc`` library
- libraries/stm/stm.cabal: Dependency of ``haskeline`` library
- libraries/template-haskell/template-haskell.cabal: Core library
- libraries/terminfo/terminfo.cabal: Dependency of ``haskeline`` library
- libraries/text/text.cabal: Dependency of ``Cabal`` library
- libraries/time/time.cabal: Dependency of ``ghc`` library
- libraries/transformers/transformers.cabal: Dependency of ``ghc`` library
- libraries/unix/unix.cabal: Dependency of ``ghc`` library
- libraries/Win32/Win32.cabal: Dependency of ``ghc`` library
- libraries/xhtml/xhtml.cabal: Dependency of ``haddock`` executable
-
=====================================
docs/users_guide/9.6.5-notes.rst
=====================================
@@ -0,0 +1,111 @@
+.. _release-9.6.5:
+
+Version 9.6.5
+==============
+
+The significant changes to the various parts of the compiler are listed below.
+See the `migration guide
+<https://gitlab.haskell.org/ghc/ghc/-/wikis/migration/9.6>`_ on the GHC Wiki
+for specific guidance on migrating programs to this release.
+
+The :ghc-flag:`LLVM backend <-fllvm>` of this release is to be used with LLVM
+11, 12, 13, 14 or 15.
+
+Significant Changes
+~~~~~~~~~~~~~~~~~~~~
+
+Issues fixed in this release include:
+
+Compiler
+--------
+
+- Disable ``-fasm-shortcutting`` with ``-O2`` as it leads to unsound optimisations
+ (:ghc-ticket:`24462).
+- Fix a typechecker bug resulting in ``TYPE`` and ``CONSTRAINT`` being apart
+ (:ghc-ticket:`24279`).
+- Fix a bug resulting in incorrect runtime results due to a botched simplifier
+ pass (:ghc-ticket:`24295`).
+- Assign correct source spans to nested documentation comments in the AST (:ghc-ticket:`24378`).
+- Fix a bug causing suboptimal error messages for certain invalid cyclic
+ module graphs with hs-boot files (:ghc-ticket:`24196`, :ghc-ticket:`24275`).
+- Fix a bug resulting in infix ``(~)`` and ``(@)`` operators not being usable in
+ TH quotes (:ghc-ticket:`23748`).
+- Fix a bug arising from incorrect parsing of paths containing spaces in the
+ settings file (:ghc-ticket:`24265`).
+- Allow special pragmas to desugar correctly in a few more cases (:ghc-ticket:`24370`).
+
+Runtime system
+--------------
+
+- Fix an off-by-one while writing eventlogs (:ghc-ticket:`24287`).
+- Avoid segfaults with using ``-Dn`` with the non-moving collector (:ghc-ticket:`24393`).
+
+Build system and packaging
+--------------------------
+
+- Fix a bug resulting in the distributed ``hsc2hs`` wrapper using flags from the
+ compiler build environment (:ghc-ticket:`24050`).
+- Better compatibility for newer alex versions in the configure script (:ghc-ticket:`24302`).
+- Handle autotools adding the ``-std`` flag to the ``CC``/``CXX`` variables (:ghc-ticket:`24324`).
+- Fix a typo in the configure script resulting in the target for the linker being set incorrectly
+ when configuring a cross-compiler (:ghc-ticket:`24414`).
+- Do not override existing linker flags in ``FP_LD_NO_FIXUP_CHAINS``.
+- Ensure the ``genapply`` program is built with the write constants when cross compiling (:ghc-ticket:`24347`).
+- Ensure we take ``LDFLAGS`` into account when configuring a linker (:ghc-ticket:`24565`).
+- Fix a segfault with the non-moving GC (:ghc-ticket:`24492`).
+
+Core libraries
+--------------
+
+- Bump ``base`` to 4.18.2.1
+- Bump ``filepath`` to 1.4.300.1
+- Bump ``directory`` to 1.3.8.4
+- Bump ``Cabal`` to 3.10.3.0
+- Bump ``process`` to 1.6.19.0
+- Bump ``libffi-tarballs`` to 3.4.6
+
+Included libraries
+------------------
+
+The package database provided with this distribution also contains a number of
+packages other than GHC itself. See the changelogs provided with these packages
+for further change information.
+
+.. ghc-package-list::
+
+ libraries/array/array.cabal: Dependency of ``ghc`` library
+ libraries/base/base.cabal: Core library
+ libraries/binary/binary.cabal: Dependency of ``ghc`` library
+ libraries/bytestring/bytestring.cabal: Dependency of ``ghc`` library
+ libraries/Cabal/Cabal/Cabal.cabal: Dependency of ``ghc-pkg`` utility
+ libraries/Cabal/Cabal-syntax/Cabal-syntax.cabal: Dependency of ``ghc-pkg`` utility
+ libraries/containers/containers/containers.cabal: Dependency of ``ghc`` library
+ libraries/deepseq/deepseq.cabal: Dependency of ``ghc`` library
+ libraries/directory/directory.cabal: Dependency of ``ghc`` library
+ libraries/exceptions/exceptions.cabal: Dependency of ``ghc`` and ``haskeline`` library
+ libraries/filepath/filepath.cabal: Dependency of ``ghc`` library
+ compiler/ghc.cabal: The compiler itself
+ libraries/ghci/ghci.cabal: The REPL interface
+ libraries/ghc-boot/ghc-boot.cabal: Internal compiler library
+ libraries/ghc-boot-th/ghc-boot-th.cabal: Internal compiler library
+ libraries/ghc-compact/ghc-compact.cabal: Core library
+ libraries/ghc-heap/ghc-heap.cabal: GHC heap-walking library
+ libraries/ghc-prim/ghc-prim.cabal: Core library
+ libraries/haskeline/haskeline.cabal: Dependency of ``ghci`` executable
+ libraries/hpc/hpc.cabal: Dependency of ``hpc`` executable
+ libraries/integer-gmp/integer-gmp.cabal: Core library
+ libraries/libiserv/libiserv.cabal: Internal compiler library
+ libraries/mtl/mtl.cabal: Dependency of ``Cabal`` library
+ libraries/parsec/parsec.cabal: Dependency of ``Cabal`` library
+ libraries/pretty/pretty.cabal: Dependency of ``ghc`` library
+ libraries/process/process.cabal: Dependency of ``ghc`` library
+ libraries/stm/stm.cabal: Dependency of ``haskeline`` library
+ libraries/template-haskell/template-haskell.cabal: Core library
+ libraries/terminfo/terminfo.cabal: Dependency of ``haskeline`` library
+ libraries/text/text.cabal: Dependency of ``Cabal`` library
+ libraries/time/time.cabal: Dependency of ``ghc`` library
+ libraries/transformers/transformers.cabal: Dependency of ``ghc`` library
+ libraries/unix/unix.cabal: Dependency of ``ghc`` library
+ libraries/Win32/Win32.cabal: Dependency of ``ghc`` library
+ libraries/xhtml/xhtml.cabal: Dependency of ``haddock`` executable
+
=====================================
docs/users_guide/bugs.rst
=====================================
@@ -697,6 +697,9 @@ Bugs in GHC
- ``-Wincomplete-record-updates`` does not warn about record updates for records with
partial record fields since GHC 9.6.1. See :ghc-ticket:`23520` for more details.
+- ``-fasm-shortcutting`` may result in unsound optimisations and result in incorrect
+ runtime results. See :ghc-ticket:`24507` for more details.
+
.. _bugs-ghci:
Bugs in GHCi (the interactive GHC)
=====================================
docs/users_guide/release-notes.rst
=====================================
@@ -8,3 +8,4 @@ Release notes
9.6.2-notes
9.6.3-notes
9.6.4-notes
+ 9.6.5-notes
=====================================
docs/users_guide/using-optimisation.rst
=====================================
@@ -250,7 +250,7 @@ by saying ``-fno-wombat``.
generator, merging basic blocks and avoiding jumps right after jumps.
.. ghc-flag:: -fasm-shortcutting
- :shortdesc: Enable shortcutting on assembly. Implied by :ghc-flag:`-O2`.
+ :shortdesc: Enable shortcutting on assembly.
:type: dynamic
:reverse: -fno-asm-shortcutting
:category:
@@ -267,6 +267,9 @@ by saying ``-fno-wombat``.
these. Note that due to platform limitations (:ghc-ticket:`21972`) this flag
does nothing on macOS.
+ This flag is known to result in unsoundness in this version of GHC
+ (:ghc-ticket:`24507`).
+
.. ghc-flag:: -fblock-layout-cfg
:shortdesc: Use the new cfg based block layout algorithm.
:type: dynamic
=====================================
libraries/Cabal
=====================================
@@ -1 +1 @@
-Subproject commit 6c95f3fee3cdee859704b6476646cefd4628a850
+Subproject commit 256f85d735310196d437ede86046f2a86efedc6d
=====================================
libraries/base/GHC/JS/Prim.hs
=====================================
@@ -277,13 +277,13 @@ foreign import javascript unsafe "(($1) => { return ($1 === null); })"
foreign import javascript unsafe "(($1) => { return ($1 === undefined); })"
js_isUndefined :: JSVal -> Bool
-foreign import javascript unsafe "(($1) => { return ($r = typeof($1) === 'number' ? ($1|0) : 0;); })"
+foreign import javascript unsafe "(($1) => { return (typeof($1) === 'number' ? ($1|0) : 0); })"
js_fromJSInt :: JSVal -> Int
-foreign import javascript unsafe "(($1) => { return ($r = $1;); })"
+foreign import javascript unsafe "(($1) => { return $1; })"
js_toJSInt :: Int -> JSVal
-foreign import javascript unsafe "$r = null;"
+foreign import javascript unsafe "(() => { return null; })"
js_null :: JSVal
foreign import javascript unsafe "(($1,$2) => { return $1[h$fromHsString($2)]; })"
@@ -307,7 +307,6 @@ foreign import javascript unsafe "(($1,$2_1,$2_2) => { return $1[h$decodeUtf8z($
foreign import javascript unsafe "(($1_1,$1_2) => { return h$decodeUtf8z($1_1, $1_2); })"
js_unpackJSStringUtf8## :: Addr# -> State# s -> (# State# s, JSVal# #)
-
foreign import javascript unsafe "(($1_1, $1_2) => { return h$decodeUtf8z($1_1,$1_2); })"
js_unsafeUnpackJSStringUtf8## :: Addr# -> JSVal#
=====================================
libraries/base/base.cabal
=====================================
@@ -1,6 +1,6 @@
cabal-version: 3.0
name: base
-version: 4.18.2.0
+version: 4.18.2.1
-- NOTE: Don't forget to update ./changelog.md
license: BSD-3-Clause
=====================================
libraries/base/changelog.md
=====================================
@@ -1,5 +1,8 @@
# Changelog for [`base` package](http://hackage.haskell.org/package/base)
+## 4.18.2.1 *April 2024*
+ * Various documentation improvements
+
## 4.18.2.0 *January 2024*
* Update to [Unicode 15.1.0](https://www.unicode.org/versions/Unicode15.1.0/).
* Improve String & IsString documentation.
=====================================
testsuite/tests/backpack/cabal/bkpcabal02/bkpcabal02.stdout
=====================================
@@ -4,4 +4,4 @@ for bkpcabal01-0.1.0.0..
Preprocessing library 'q' for bkpcabal01-0.1.0.0..
Building library 'q' instantiated with H = <H>
for bkpcabal01-0.1.0.0..
-[2 of 2] Instantiating bkpcabal01-0.1.0.0-1lAnZxoLksL6JibM6aQmCb-p
+[2 of 2] Instantiating bkpcabal01-0.1.0.0-KBjRdbt55q65bC24wEhN1Q-p
=====================================
testsuite/tests/cabal/t18567/T18567.stderr
=====================================
@@ -2,4 +2,4 @@
<no location info>: warning: [GHC-42258] [-Wunused-packages]
The following packages were specified via -package or -package-id flags,
but were not needed for compilation:
- - internal-lib-0.1.0.0 (exposed by flag -package-id internal-lib-0.1.0.0-7jHSByQDwC214cJdttV4hN-sublib-unused)
+ - internal-lib-0.1.0.0 (exposed by flag -package-id internal-lib-0.1.0.0-85MtRTf8HPX4Uo1lkUlkVq-sublib-unused)
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/21ab2c1f09d20b03d9d6feb4ab526adda0a53bc1...650c34ab4e1cefb521209b143ecd75367ec03ee1
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/21ab2c1f09d20b03d9d6feb4ab526adda0a53bc1...650c34ab4e1cefb521209b143ecd75367ec03ee1
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20240415/1bc941cc/attachment-0001.html>
More information about the ghc-commits
mailing list