[Git][ghc/ghc][wip/various-hadrian-fixes] 53 commits: Fix bounds-checking buglet in Data.Array.Byte
Ben Gamari (@bgamari)
gitlab at gitlab.haskell.org
Wed Dec 14 18:41:59 UTC 2022
Ben Gamari pushed to branch wip/various-hadrian-fixes at Glasgow Haskell Compiler / GHC
Commits:
e902d771 by Matthew Craven at 2022-12-08T08:30:23-05:00
Fix bounds-checking buglet in Data.Array.Byte
...another manifestation of #20851 which
I unfortunately missed in my first pass.
- - - - -
8d36c0c6 by Gergő Érdi at 2022-12-08T08:31:03-05:00
Remove copy-pasted definitions of `graphFromEdgedVertices*`
- - - - -
c5d8ed3a by Gergő Érdi at 2022-12-08T08:31:03-05:00
Add version of `reachableGraph` that avoids loop for cyclic inputs
by building its result connected component by component
Fixes #22512
- - - - -
90cd5396 by Krzysztof Gogolewski at 2022-12-08T08:31:39-05:00
Mark Type.Reflection.Unsafe as Unsafe
This module can be used to construct ill-formed TypeReps, so it should
be Unsafe.
- - - - -
2057c77d by Ian-Woo Kim at 2022-12-08T08:32:19-05:00
Truncate eventlog event for large payload (#20221)
RTS eventlog events for postCapsetVecEvent are truncated if payload
is larger than EVENT_PAYLOAD_SIZE_MAX
Previously, postCapsetVecEvent records eventlog event with payload
of variable size larger than EVENT_PAYLOAD_SIZE_MAX (2^16) without
any validation, resulting in corrupted data.
For example, this happens when a Haskell binary is invoked with very
long command line arguments exceeding 2^16 bytes (see #20221).
Now we check the size of accumulated payload messages incrementally,
and truncate the message just before the payload size exceeds
EVENT_PAYLOAD_SIZE_MAX. RTS will warn the user with a message showing
how many arguments are truncated.
- - - - -
9ec76f61 by Cheng Shao at 2022-12-08T08:32:59-05:00
hadrian: don't add debug info to non-debug ways of rts
Hadrian used to pass -g when building all ways of rts. It makes output
binaries larger (especially so for wasm backend), and isn't needed by
most users out there, so this patch removes that flag. In case the
debug info is desired, we still pass -g3 when building the debug way,
and there's also the debug_info flavour transformer which ensures -g3
is passed for all rts ways.
- - - - -
7658cdd4 by Krzysztof Gogolewski at 2022-12-08T08:33:36-05:00
Restore show (typeRep @[]) == "[]"
The Show instance for TypeRep [] has changed in 9.5 to output "List"
because the name of the type constructor changed.
This seems to be accidental and is inconsistent with TypeReps of saturated
lists, which are printed as e.g. "[Int]".
For now, I'm restoring the old behavior; in the future,
maybe we should show TypeReps without puns (List, Tuple, Type).
- - - - -
216deefd by Matthew Pickering at 2022-12-08T22:45:27-05:00
Add test for #22162
- - - - -
5d0a311f by Matthew Pickering at 2022-12-08T22:45:27-05:00
ci: Add job to test interface file determinism guarantees
In this job we can run on every commit we add a test which builds the
Cabal library twice and checks that the ABI hash and interface hash is
stable across the two builds.
* We run the test 20 times to try to weed out any race conditions due to
`-j`
* We run the builds in different temporary directories to try to weed
out anything related to build directory affecting ABI or interface
file hash.
Fixes #22180
- - - - -
0a76d7d4 by Matthew Pickering at 2022-12-08T22:45:27-05:00
ci: Add job for testing interface stability across builds
The idea is that both the bindists should product libraries with the
same ABI and interface hash.
So the job checks with ghc-pkg to make sure the computed ABI
is the same.
In future this job can be extended to check for the other facets of
interface determinism.
Fixes #22180
- - - - -
74c9bf91 by Matthew Pickering at 2022-12-08T22:45:27-05:00
backpack: Be more careful when adding together ImportAvails
There was some code in the signature merging logic which added together
the ImportAvails of the signature and the signature which was merged
into it. This had the side-effect of making the merged signature depend
on the signature (via a normal module dependency). The intention was to
propagate orphan instances through the merge but this also messed up
recompilation logic because we shouldn't be attempting to load B.hi when
mergeing it.
The fix is to just combine the part of ImportAvails that we intended to
(transitive info, orphan instances and type family instances) rather
than the whole thing.
- - - - -
d122e022 by Matthew Pickering at 2022-12-08T22:45:27-05:00
Fix mk_mod_usage_info if the interface file is not already loaded
In #22217 it was observed that the order modules are compiled in affects
the contents of an interface file. This was because a module dependended
on another module indirectly, via a re-export but the interface file for
this module was never loaded because the symbol was never used in the
file.
If we decide that we depend on a module then we jolly well ought to
record this fact in the interface file! Otherwise it could lead to very
subtle recompilation bugs if the dependency is not tracked and the
module is updated.
Therefore the best thing to do is just to make sure the file is loaded
by calling the `loadSysInterface` function. This first checks the
caches (like we did before) but then actually goes to find the interface
on disk if it wasn't loaded.
Fixes #22217
- - - - -
ea25088d by lrzlin at 2022-12-08T22:46:06-05:00
Add initial support for LoongArch Architecture.
- - - - -
9eb9d2f4 by Bodigrim at 2022-12-08T22:46:47-05:00
Update submodule mtl to 2.3.1, parsec to 3.1.15.1, haddock and Cabal to HEAD
- - - - -
08d8fe2a by Bodigrim at 2022-12-08T22:46:47-05:00
Allow mtl-2.3 in hadrian
- - - - -
3807a46c by Bodigrim at 2022-12-08T22:46:47-05:00
Support mtl-2.3 in check-exact
- - - - -
ef702a18 by Bodigrim at 2022-12-08T22:46:47-05:00
Fix tests
- - - - -
3144e8ff by Sebastian Graf at 2022-12-08T22:47:22-05:00
Make (^) INLINE (#22324)
So that we get to cancel away the allocation for the lazily used base.
We can move `powImpl` (which *is* strict in the base) to the top-level
so that we don't duplicate too much code and move the SPECIALISATION
pragmas onto `powImpl`.
The net effect of this change is that `(^)` plays along much better with
inlining thresholds and loopification (#22227), for example in `x2n1`.
Fixes #22324.
- - - - -
1d3a8b8e by Matthew Pickering at 2022-12-08T22:47:59-05:00
Typeable: Fix module locations of some definitions in GHC.Types
There was some confusion in Data.Typeable about which module certain
wired-in things were defined in. Just because something is wired-in
doesn't mean it comes from GHC.Prim, in particular things like LiftedRep
and RuntimeRep are defined in GHC.Types and that's the end of the story.
Things like Int#, Float# etc are defined in GHC.Prim as they have no
Haskell definition site at all so we need to generate type
representations for them (which live in GHC.Types).
Fixes #22510
- - - - -
0f7588b5 by Sebastian Graf at 2022-12-08T22:48:34-05:00
Make `drop` and `dropWhile` fuse (#18964)
I copied the fusion framework we have in place for `take`.
T18964 asserts that we regress neither when fusion fires nor when it doesn't.
Fixes #18964.
- - - - -
26e71562 by Sebastian Graf at 2022-12-08T22:49:10-05:00
Do not strictify a DFun's parameter dictionaries (#22549)
... thus fixing #22549.
The details are in the refurbished and no longer dead
`Note [Do not strictify a DFun's parameter dictionaries]`.
There's a regression test in T22549.
- - - - -
36093407 by John Ericson at 2022-12-08T22:49:45-05:00
Delete `rts/package.conf.in`
It is a relic of the Make build system. The RTS now uses a
`package.conf` file generated the usual way by Cabal.
- - - - -
b0cc2fcf by Krzysztof Gogolewski at 2022-12-08T22:50:21-05:00
Fixes around primitive literals
* The SourceText of primitive characters 'a'# did not include
the #, unlike for other primitive literals 1#, 1##, 1.0#, 1.0##, "a"#.
We can now remove the function pp_st_suffix, which was a hack
to add the # back.
* Negative primitive literals shouldn't use parentheses, as described in
Note [Printing of literals in Core]. Added a testcase to T14681.
- - - - -
aacf616d by Bryan Richter at 2022-12-08T22:50:56-05:00
testsuite: Mark conc024 fragile on Windows
- - - - -
ed239a24 by Ryan Scott at 2022-12-09T09:42:16-05:00
Document TH splices' interaction with INCOHERENT instances
Top-level declaration splices can having surprising interactions with
`INCOHERENT` instances, as observed in #22492. This patch
resolves #22492 by documenting this strange interaction in the GHC User's
Guide.
[ci skip]
- - - - -
1023b432 by Mike Pilgrem at 2022-12-09T09:42:56-05:00
Fix #22300 Document GHC's extensions to valid whitespace
- - - - -
79b0cec0 by Luite Stegeman at 2022-12-09T09:43:38-05:00
Add support for environments that don't have setImmediate
- - - - -
5b007ec5 by Luite Stegeman at 2022-12-09T09:43:38-05:00
Fix bound thread status
- - - - -
65335d10 by Matthew Pickering at 2022-12-09T20:15:45-05:00
Update containers submodule
This contains a fix necessary for the multi-repl to work on GHC's code
base where we try to load containers and template-haskell into the same
session.
- - - - -
4937c0bb by Matthew Pickering at 2022-12-09T20:15:45-05:00
hadrian-multi: Put interface files in separate directories
Before we were putting all the interface files in the same directory
which was leading to collisions if the files were called the same thing.
- - - - -
8acb5b7b by Matthew Pickering at 2022-12-09T20:15:45-05:00
hadrian-toolargs: Add filepath to allowed repl targets
- - - - -
5949d927 by Matthew Pickering at 2022-12-09T20:15:45-05:00
driver: Set correct UnitId when rehydrating modules
We were not setting the UnitId before rehydrating modules which just led
to us attempting to find things in the wrong HPT. The test for this is
the hadrian-multi command (which is now added as a CI job).
Fixes #22222
- - - - -
ab06c0f0 by Matthew Pickering at 2022-12-09T20:15:45-05:00
ci: Add job to test hadrian-multi command
I am not sure this job is good because it requires booting HEAD with
HEAD, but it should be fine.
- - - - -
fac3e568 by Matthew Pickering at 2022-12-09T20:16:20-05:00
hadrian: Update bootstrap plans to 9.2.* series and 9.4.* series.
This updates the build plans for the most recent compiler versions, as
well as fixing the hadrian-bootstrap-gen script to a specific GHC
version.
- - - - -
195b08b4 by Matthew Pickering at 2022-12-09T20:16:20-05:00
ci: Bump boot images to use ghc-9.4.3
Also updates the bootstrap jobs to test booting 9.2 and 9.4.
- - - - -
c658c580 by Matthew Pickering at 2022-12-09T20:16:20-05:00
hlint: Removed redundant UnboxedSums pragmas
UnboxedSums is quite confusingly implied by UnboxedTuples, alas, just
the way it is.
See #22485
- - - - -
b3e98a92 by Oleg Grenrus at 2022-12-11T12:26:17-05:00
Add heqT, a kind-heterogeneous variant of heq
CLC proposal https://github.com/haskell/core-libraries-committee/issues/99
- - - - -
bfd7c1e6 by Bodigrim at 2022-12-11T12:26:55-05:00
Document that Bifunctor instances for tuples are lawful only up to laziness
- - - - -
5d1a1881 by Bryan Richter at 2022-12-12T16:22:36-05:00
Mark T21336a fragile
- - - - -
c30accc2 by Matthew Pickering at 2022-12-12T16:23:11-05:00
Add test for #21476
This issues seems to have been fixed since the ticket was made, so let's
add a test and move on.
Fixes #21476
- - - - -
e9d74a3e by Sebastian Graf at 2022-12-13T22:18:39-05:00
Respect -XStrict in the pattern-match checker (#21761)
We were missing a call to `decideBangHood` in the pattern-match checker.
There is another call in `matchWrapper.mk_eqn_info` which seems redundant
but really is not; see `Note [Desugaring -XStrict matches in Pmc]`.
Fixes #21761.
- - - - -
884790e2 by Gergő Érdi at 2022-12-13T22:19:14-05:00
Fix loop in the interface representation of some `Unfolding` fields
As discovered in #22272, dehydration of the unfolding info of a
recursive definition used to involve a traversal of the definition
itself, which in turn involves traversing the unfolding info. Hence,
a loop.
Instead, we now store enough data in the interface that we can produce
the unfolding info without this traversal. See Note [Tying the 'CoreUnfolding' knot]
for details.
Fixes #22272
Co-authored-by: Simon Peyton Jones <simon.peytonjones at gmail.com>
- - - - -
9f301189 by Alan Zimmerman at 2022-12-13T22:19:50-05:00
EPA: When splitting out header comments, keep ones for first decl
Any comments immediately preceding the first declaration are no longer
kept as header comments, but attach to the first declaration instead.
- - - - -
8b1f1b45 by Sylvain Henry at 2022-12-13T22:20:28-05:00
JS: fix object file name comparison (#22578)
- - - - -
e9e161bb by Bryan Richter at 2022-12-13T22:21:03-05:00
configure: Bump min bootstrap GHC version to 9.2
- - - - -
14f0bcfb by Matthew Pickering at 2022-12-14T13:39:19-05:00
compiler: Add -f[no-]split-sections flags
Here we add a `-fsplit-sections` flag which may some day replace
`-split-sections`. This has the advantage of automatically providing a
`-fno-split-sections` flag, which is useful for our packaging because we
enable `-split-sections` by default but want to disable it in certain
configurations.
- - - - -
aa06bc73 by Matthew Pickering at 2022-12-14T13:40:45-05:00
hadrian: Fix computation of tables_next_to_code for outOfTreeCompiler
This copy-pasto was introduced in de5fb3489f2a9bd6dc75d0cb8925a27fe9b9084b
- - - - -
2664e5a1 by Matthew Pickering at 2022-12-14T13:40:45-05:00
hadrian: Add test:all_deps to build just testsuite dependencies
Fixes #22534
- - - - -
606b82b4 by Matthew Pickering at 2022-12-14T13:41:37-05:00
hadrian: Add no_split_sections tranformer
This transformer reverts the effect of `split_sections`, which we intend
to use for platforms which don't support split sections.
- - - - -
a3b95d4f by Matthew Pickering at 2022-12-14T13:41:43-05:00
check-exact: Fix build with -Werror
- - - - -
c1e02a64 by Matthew Pickering at 2022-12-14T13:41:43-05:00
ci: Build all test dependencies with in-tree compiler
This means that these executables will honour flavour transformers such
as "werror".
Fixes #22555
- - - - -
d8a6912b by Matthew Pickering at 2022-12-14T13:41:43-05:00
hadrian: Document using GHC environment variable to select boot compiler
Fixes #22340
- - - - -
68220510 by Matthew Pickering at 2022-12-14T13:41:43-05:00
packaging: Build perf builds with -split-sections
In 8f71d958 the make build system was made to use split-sections on
linux systems but it appears this logic never made it to hadrian.
There is the split_sections flavour transformer but this doesn't appear
to be used for perf builds on linux.
This is disbled on deb9 and windows due to #21670
Closes #21135
- - - - -
30 changed files:
- .gitlab-ci.yml
- .gitlab/ci.sh
- .gitlab/gen_ci.hs
- .gitlab/jobs.yaml
- compiler/CodeGen.Platform.h
- compiler/GHC/CmmToAsm.hs
- compiler/GHC/CmmToAsm/Reg/Graph/TrivColorable.hs
- compiler/GHC/CmmToAsm/Reg/Linear.hs
- compiler/GHC/CmmToAsm/Reg/Linear/FreeRegs.hs
- compiler/GHC/CmmToAsm/Reg/Target.hs
- compiler/GHC/Core.hs
- compiler/GHC/Core/Lint.hs
- compiler/GHC/Core/Opt/DmdAnal.hs
- compiler/GHC/Core/Opt/Simplify/Iteration.hs
- compiler/GHC/Core/Opt/Simplify/Utils.hs
- compiler/GHC/Core/Ppr.hs
- compiler/GHC/Core/Seq.hs
- compiler/GHC/Core/SimpleOpt.hs
- compiler/GHC/Core/Tidy.hs
- compiler/GHC/Core/Unfold.hs
- compiler/GHC/Core/Unfold/Make.hs
- compiler/GHC/Core/Utils.hs
- compiler/GHC/CoreToIface.hs
- compiler/GHC/CoreToStg/Prep.hs
- compiler/GHC/Data/Graph/Directed.hs
- compiler/GHC/Data/OrdList.hs
- compiler/GHC/Data/Unboxed.hs
- compiler/GHC/Driver/Make.hs
- compiler/GHC/Driver/Pipeline/Execute.hs
- compiler/GHC/Driver/Session.hs
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/b6659bbeb64540bf783833c5b8f465316ff068e7...6822051009ddb8a98ff99a7ffb85a01121871932
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/b6659bbeb64540bf783833c5b8f465316ff068e7...6822051009ddb8a98ff99a7ffb85a01121871932
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/20221214/b54414be/attachment-0001.html>
More information about the ghc-commits
mailing list