[Git][ghc/ghc][ghc-9.12] 39 commits: rts/linker: Fix out-of-bounds mapping logic
Zubin (@wz1000)
gitlab at gitlab.haskell.org
Mon Dec 16 12:07:00 UTC 2024
Zubin pushed to branch ghc-9.12 at Glasgow Haskell Compiler / GHC
Commits:
83377584 by Ben Gamari at 2024-12-13T09:52:25+05:30
rts/linker: Fix out-of-bounds mapping logic
Previously the structure of `mmapInRegion` concealed a subtle bug
concerning handling of `mmap` returning mappings below the beginning of
the desired region. Specifically, we would reset `p = result + bytes`
and then again reset `p = region->start` before looping around for
another iteration. This resulted in an infinite loop on FreeBSD.
Fixes #25492.
(cherry picked from commit 292ed74ea908b64490e91346b890cbebdcde37d0)
- - - - -
194ad792 by Ben Gamari at 2024-12-13T09:53:38+05:30
rts/linker/Elf: Resolve _GLOBAL_OFFSET_TABLE_
(cherry picked from commit 952a1243a77ac73222659a49a642b20e80d77cdb)
- - - - -
f5ed23d9 by Ben Gamari at 2024-12-13T09:53:50+05:30
rts/linker: Clarify debug output
(cherry picked from commit 20912f5bac6fe4146172accc1849d9b762eb45e3)
- - - - -
051d8a37 by Ben Gamari at 2024-12-13T09:54:37+05:30
rts: Allow ExecPage to allocate anywhere in address space
Currently the ExecPage facility has two users:
* GHCi, for constructing info tables, and
* the adjustor allocation path
Despite neither of these have any spatial locality constraints ExecPage
was using the linker's `mmapAnonForLinker`, which tries hard to ensure
that mappings end up nearby the executable image. This makes adjustor
allocation needlessly subject to fragmentation concerns.
We now instead return less constrained mappings, improving the
robustness of the mechanism.
Addresses #25503.
(cherry picked from commit a104508d2ea5bbc61c4a756dca42fc043b329709)
- - - - -
fa0348b8 by Cheng Shao at 2024-12-13T09:54:47+05:30
rts: remove -Wl,-U,___darwin_check_fd_set_overflow hack
This patch bumps macOS minimum SDK version to 11.0 for x86_64-darwin
to align it with aarch64-darwin. This allows us to get rid of the
horrible -Wl,-U,___darwin_check_fd_set_overflow hack, which is causing
linker warnings and testsuite failures on macOS 15. Fixes #25504.
(cherry picked from commit 88c4fe1d8a3bdbedf3972fde12f663a974cc2191)
- - - - -
563a3124 by Ben Gamari at 2024-12-13T09:54:56+05:30
base: Fix incorrect mentions of GHC.Internal.Numeric
These were incorrectly changed by the automated refactoring of the
`ghc-internal` migration.
Fixes #25521.
(cherry picked from commit c3fc9b861fd00a85a4fcbd9960b8242d9fabe04b)
- - - - -
a9e0cfe7 by Ben Gamari at 2024-12-13T09:55:33+05:30
testsuite: Handle division-by-zero more gracefully
Previously we would fail with an ZeroDivisionError.
Fixes #25321
(cherry picked from commit 513775082b89deae3f83896031caf0e89a7ed333)
- - - - -
a2c033cf by Ben Gamari at 2024-12-13T09:55:33+05:30
hadrian: Bump directory bound to >=1.3.9
Earlier versions of `directory` are racy on Windows due to #24382.
Also includes necessary Hadrian bootstrap plan bump.
Fixes #24382.
(cherry picked from commit 7890f2d8526dd90584eaa181ab10bd30d90e6743)
- - - - -
14d80de1 by Brandon Chinn at 2024-12-13T09:56:20+05:30
Fix panic in multiline string with unterminated gap (#25530)
(cherry picked from commit a8ceccf397216f63d609c4f7471506773c98572f)
- - - - -
4ae5ef94 by Brandon Chinn at 2024-12-13T09:56:29+05:30
Add test case for unterminated multiline string
(cherry picked from commit 9e464ad01f5f60f774504fcaf8d0c30bdd291159)
- - - - -
2feb717e by Matthew Pickering at 2024-12-13T09:56:47+05:30
typechecker: Perform type family consistency checks in topological order
Consider a module M importing modules A, B and C.
We can waste a lot of work depending on the order that the modules are
checked for family consistency.
Consider that C imports A and B. When compiling C we must have already
checked A and B for consistency, therefore if C is processed first then
A and B will not need to be checked for consistency again.
If A and B are compared first, then the consistency checks will be
performed against (wasted as we already performed them for C).
At the moment the order which modules are checked is non-deterministic.
Clearly we should engineer that C is checked before B and A, but by what
scheme?
A simple one is to observe that if a module M is in the transitive
closure of X then the size of the consistent family set of M is less
than or equal to size of the consistent family set of X.
Therefore by sorting the imports by the size of the consistent family
set and processing the largest first, you make sure to process modules
in topological order.
In practice we have observed that this strategy has reduced the amount
of consistency checks performed.
One solution to #25554
(cherry picked from commit 13fe48d40004d9cdf3c73300a18f144bdc5191d9)
- - - - -
c0b36c68 by Ben Gamari at 2024-12-13T09:56:55+05:30
testsuite: Add test for #25560
(cherry picked from commit 683115a40fd989a287fa51efe140af9448526098)
- - - - -
74e42943 by Ben Gamari at 2024-12-13T09:57:04+05:30
compiler: Don't attempt to TSAN-instrument SIMD operations
TSAN only provides instrumentation for 8, 16, 32, and 64-bit memory
loads/stores. Don't attempt to instrument wider operations.
Fixes #25563.
(cherry picked from commit e745e3a30670440c9cf65450835d4eddada784eb)
- - - - -
f8b36d9b by Ben Gamari at 2024-12-13T09:57:17+05:30
hadrian: Mitigate mktexfmt race
At least some versions of Texlive's `mktexfmt` utility cannot be invoked
concurrently in their initial run since they fail to handle failure of
`mkdir` due to racing. Specifically, we see
```
| Run Xelatex: users_guide.tex => /tmp/extra-dir-9616886274866
| Run Xelatex: Haddock.tex => /tmp/extra-dir-9616886274869
This is XeTeX, Version 3.14159265-2.6-0.999992 (TeX Live 2020) (preloaded format=xelatex)
restricted \write18 enabled.
kpathsea: Running mktexfmt xelatex.fmt
mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order):
mktexfmt: /usr/share/texlive/texmf-dist/web2c/fmtutil.cnf
mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes:
mktexfmt: /builds/ghc/ghc/tmp-home/.texlive2020/texmf-config/web2c/fmtutil.cnf
/usr/bin/mktexfmt: mkdir(/builds/ghc/ghc/tmp-home/.texlive2020/texmf-var/web2c/) failed for tree /builds/ghc/ghc/tmp-home/.texlive2020/texmf-var/web2c: File exists at /usr/share/texlive/tlpkg/TeXLive/TLUtils.pm line 937.
I can't find the format file `xelatex.fmt'!
```
That is two `mktexfmt` invocations (for the user's guide and haddock
builds) attempted to create `$HOME/texlive2020/texmf-var/web2c` and
raced. One of the two `mkdir`'s consequently failed, bringing down the
entire build.
We avoid this by ensuring that the first `xelatex` invocation is always
performed serially.
Fixes #25564.
(cherry picked from commit 41dae5b86955094aa4c5647f63f1f52f1a8a5519)
- - - - -
ada12a20 by Ben Gamari at 2024-12-13T09:57:41+05:30
rts/CheckUnload: Reset old_objects if unload is skipped
Previously `checkUnload` failed to reset `old_objects` when it decided
not to unload (e.g. due to heap profiling being enabled).
Fixes #24935.
(cherry picked from commit 9efbc51f99118e8f9c3abf2bcb6dc3295893ded6)
- - - - -
f43b1d65 by Ben Gamari at 2024-12-13T09:57:53+05:30
rts/CheckUnload: Don't prepare to unload if we can't unload
Previously `prepareUnloadCheck` would move the `objects` list to
`old_objects` even when profiling (where we cannot unload). This caused
us to vacate the `objects` list during major GCs, losing track of loaded
objects. Fix this by ensuring that `prepareUnloadCheck` and
`checkUnload` both use the same short-cutting logic.
(cherry picked from commit 34d3e8e69b62b92cc438514f7fb8e37ce639efea)
- - - - -
5c9c3e3f by Zubin Duggal at 2024-12-13T10:00:58+05:30
Bump Cabal submodule to 3.14.1.0
- - - - -
89790626 by Zubin Duggal at 2024-12-13T10:16:14+05:30
Bump directory submodule to 0.12.2.0
- - - - -
9321f8b7 by Andreas Klebinger at 2024-12-13T10:24:04+05:30
Document -fmax-forced-spec-args=⟨n⟩ in the 9.12 changelog.
Fixes #25544
(cherry picked from commit e2d2645c01d45149420bb07987b1634e577adc04)
- - - - -
66d66a25 by Andreas Klebinger at 2024-12-13T10:25:30+05:30
Document -fwrite-if-compression in release notes.
(cherry picked from commit 93335a250347ed0591d240701a56ff171a9a5561)
- - - - -
f29620c8 by Adam Gundry at 2024-12-13T10:27:57+05:30
Fix formatting issues and make corrections to 9.12.1 release notes
(cherry picked from commit 6ce3e546083304c4f2da060184b3b73f48dd8fc0)
- - - - -
15c719f3 by Zubin Duggal at 2024-12-13T16:59:48+05:30
Changelog fixes
- - - - -
dc86785e by Zubin Duggal at 2024-12-13T16:59:48+05:30
ghcup metatdata: use fedora33 for redhat
Redhat 9 doesn't have libtinfo.so.5 anymore
- - - - -
fc647a65 by Ben Gamari at 2024-12-13T16:59:48+05:30
testsuite: Introduce req_c_rts
As suggested by @hsyl20, this is intended to mark tests that rely on the
behavior of the C RTS.
(cherry picked from commit 1e84b41108d96cb721dd11281105fdf621105a12)
- - - - -
cbfd0829 by Zubin Duggal at 2024-12-13T16:59:48+05:30
release: copy index.html from correct directory
- - - - -
0ba478fe by Matthew Pickering at 2024-12-13T16:59:48+05:30
configure: Allow happy-2.0.2
happy-2.0.2 can be used to compile GHC.
happy-2.0 and 2.0.1 have bugs which make it unsuitable to use.
The version bound is now == 1.20.* || >= 2.0.2 && < 2.1
Fixes #25276
(cherry picked from commit 0029ca91c845dd4530eb2c4606ad5bd59775cec2)
- - - - -
24b4914a by Cristiano Moraes at 2024-12-13T16:59:48+05:30
configure: Find C++ probing when GCC version is the latest but G++ is old #23118
(cherry picked from commit 78ad81ecef846f73fee0f6c1a86cd6f19aa29b21)
- - - - -
95d35d6c by Ben Gamari at 2024-12-13T16:59:48+05:30
configure: Accept happy-2.1.2
happy-2.1 was released in late Oct 2024. I have confirmed that master
bootstraps with it. Here we teach configure to accept this tool.
Fixes #25438.
(cherry picked from commit 1fd83f865ffb620f4f7c4c59787710206dcadb90)
- - - - -
86f29950 by Ben Gamari at 2024-12-13T16:59:48+05:30
configure: Implement ld override whitelist
Bring `configure` into alignment with `ghc-toolchain`, ensuring that the
ld-override logic will only take effect on Linux and Windows.
Fixes #25501.
(cherry picked from commit 992259962191b0b774dfeeabb46729376c7fe7cf)
- - - - -
dde3796b by Zubin Duggal at 2024-12-13T23:41:56+05:30
hadrian-multi: warn on unused imports
os-string has redundant imports
- - - - -
52b58a66 by Zubin Duggal at 2024-12-13T23:41:56+05:30
ghcup metadata: output metadata fragment in CI
- - - - -
39e4fed1 by Zubin Duggal at 2024-12-13T23:41:56+05:30
rel-eng: ghcup metadata generation: generated yaml anchors with meaningful names
(cherry picked from commit d83f5bd730a8aef37d8a38b3560590d9798f8e45)
(cherry picked from commit 280b627869da55a22b4b9a3458e6115b06b5fff4)
- - - - -
e226fcf0 by Ben Gamari at 2024-12-14T14:47:47+05:30
ghc-internal: Drop GHC.Internal.Data.Enum
This module consists only of reexports and consequently there is no
reason for it to exist.
(cherry picked from commit 55d8304e02000b3ec33d254794e84d159dc93926)
- - - - -
227c86d4 by Ben Gamari at 2024-12-14T14:47:47+05:30
base: Introduce Data.Bounded
As proposed in [CLC#208] but unfortunately `Data.Enum` was already
incorrectly introduced in the `ghc-internal` refactor.
[CLC#208]: https://github.com/haskell/core-libraries-committee/issues/208
(cherry picked from commit 56b9f484fd89b5c2c69045dcd5690f68699ba0b1)
- - - - -
ce8458e9 by Ben Gamari at 2024-12-14T14:47:47+05:30
base: Deprecate export of Bounded from Data.Enum
This begins the process of bringing us into compliance with
[CLC#208].
[CLC#208]: https://github.com/haskell/core-libraries-committee/issues/208
(cherry picked from commit 336d392e417203c492fec15ecf91dd444cb70936)
- - - - -
65c1928d by Ben Gamari at 2024-12-14T14:47:47+05:30
base: Mention incorrect Data.Enum addition in changelog
(cherry picked from commit dd7ca93903eba8c63261656ca3d245f9e8baa662)
- - - - -
032b058c by Ben Gamari at 2024-12-15T21:21:51+05:30
base: Reintroduce {Show,Enum} IoSubSystem
These instances were dropped in !9676 but not approved by the CLC.
Addresses #25549.
(cherry picked from commit dfd1db48aaa1ee6c109e9a05ce34672418f17f59)
- - - - -
dc7c0f85 by Zubin Duggal at 2024-12-15T21:21:51+05:30
RELEASE=YES
- - - - -
daf659b6 by Zubin Duggal at 2024-12-15T21:28:10+05:30
ci: allow test-primops to fail as a workaround to #25582
- - - - -
17 changed files:
- .gitlab-ci.yml
- .gitlab/ci.sh
- .gitlab/generate-ci/gen_ci.hs
- .gitlab/jobs.yaml
- .gitlab/rel_eng/fetch-gitlab-artifacts/fetch_gitlab.py
- .gitlab/rel_eng/mk-ghcup-metadata/mk_ghcup_metadata.py
- compiler/GHC/Builtin/Names.hs
- compiler/GHC/Cmm/ThreadSanitizer.hs
- compiler/GHC/Parser/Lexer.x
- compiler/GHC/Tc/Instance/Family.hs
- compiler/GHC/Tc/Module.hs
- configure.ac
- docs/users_guide/9.12.1-notes.rst
- docs/users_guide/using-optimisation.rst
- hadrian/bootstrap/plan-9_10_1.json
- hadrian/bootstrap/plan-9_6_1.json
- hadrian/bootstrap/plan-9_6_2.json
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/5d938345841e3dff6a1dfa129202ba939a4564c9...daf659b6e3c8f2a84100fbee797cd9d457c00df5
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/5d938345841e3dff6a1dfa129202ba939a4564c9...daf659b6e3c8f2a84100fbee797cd9d457c00df5
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/20241216/7141ad83/attachment-0001.html>
More information about the ghc-commits
mailing list