| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Modern clang versions are quite picky when it comes to reporting
redundant arguments. In particular, they will warn when -no-pie is
passed when no linking is necessary.
Previously the configure script used a `$CC -Werror -no-pie -E`
invocation to test whether `-no-pie` is necessary. Unfortunately, this
meant that clang would throw a redundant argument warning, causing
configure to conclude that `-no-pie` was not supported. We now rather
use `$CC -Werror -no-pie`, ensuring that linking is necessary and
avoiding this failure mode.
Fixes #20463.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Before we would check for the unused package warning even if the module
graph was compromised due to an error in downsweep. This is easily
fixed by pushing warmUnusedPackages into depanalE, and then returning
the errors like the other downsweep errors.
Fixes #20242
(cherry picked from commit c1acfd210153dc78748904467c6be023c702467a)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Spurious warnings were previously emitted if an import came from a
reexport due to how -Wunused-packages were implemented. Removing the
dependency would cause compilation to fail.
The fix is to reimplement the warning a bit more directly, by searching
for which package each import comes from using the normal module finding
functions rather than consulting the EPS. This has the advantage that
the check could be performed at any time after downsweep rather than
also relying on a populated EPS.
Fixes #19518 and #19777
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before we would get the incorrect error message saying that the
rexporting package was the same as the defining package.
I think this only affects error messages for now.
```
- it is bound as p-0.1.0.0:P2 by a reexport in package p-0.1.0.0
- it is bound as P by a reexport in package p-0.1.0.0
+ it is bound as p-0.1.0.0:P2 by a reexport in package q-0.1.0.0
+ it is bound as P by a reexport in package r-0.1.0.0
```
and the output of `-ddump-mod-map` claimed..
```
Moo moo-0.0.0.1 (hidden package, reexport by moo-0.0.0.1)
```
|
|
|
|
|
|
|
|
|
|
| |
In GHC.Tc.Gen.Splice.tcTopSpliceExpr we were forgetting to
catch exceptions. As a result we missed the kind error
in the unsolved constraints.
This patch has an easy fix, which cures #20179
(cherry picked from commit eff51e2aca978ebd0ca08345fb1790d70f6bb7c8)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In `checkBlockingQueues` we must always untag the `bh` field of an `StgBlockingQueue`.
While at first glance it might seem a sensible assumption that `bh` will
always be a blackhole and therefore never be tagged, the GC could
shortcut the indirection and put a tagged pointer into the indirection.
This blew up on aarch64-darwin with a misaligned access. `bh` pointed
to an address that always ended in 0xa. On architectures that
are a little less strict about alignment, this would have read
a garbage info table pointer, which very, very unlikely would have been equal to
`stg_BLACKHOLE_info` and therefore things accidentally worked. However,
on AArch64, the read of the info table pointer resulted in a SIGBUS due
to misaligned read.
Fixes #20093.
(cherry picked from commit 1832676aba0a5d75ac934a62eff55e35f95587d5)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes a very subtle bug in withEncodedCString where a reference would
be kept to the whole continuation until the continuation had finished
executing. This was because the call to tryFillBufferAndCall could fail,
if the buffer was already full and so the `go` helper would be
recursively called on failure which necessitated keeping a reference to
`act`.
The failure could only happen during the initial checking phase of the
function but not during the call to the continuation. Therefore the fix
is to first perform the size check, potentially recursively and then
finally calling tail calling the continuation.
In the real world, this broke writing lazy bytestrings because a
reference to the head of the bytestring would be retained in the
continuation until the whole string had been written to a file.
Fixes #20107
(cherry picked from commit 509445b5947ce85499672399f5e88b6196af4c5a)
|
|
|
|
|
|
|
|
|
|
|
| |
If libiconv is installed from packages on the build machine, there is a high
chance that the build system will pick up /usr/local/include/iconv.h instead
of base /usr/include/iconv.h
This additional preprocessor define makes package's libiconv header compatible
with system one, fixing the build.
Closes issue #19958
|
|
|
|
|
|
|
|
|
|
| |
bound.
We use a non-inclusive upper bound so that setting the upper bound to 13 for
example means that all 12.x versions are accepted.
(cherry picked from commit 6c783817ef089e85642c3383937117cff9d15f67)
(cherry picked from commit 9b668ca47499b271bffd96d58f696a80a14002c8)
|
|
|
|
|
| |
(cherry picked from commit f926ecfdcdf5468b8539bc8f4aad87404f1e397e)
(cherry picked from commit 8b2554efe0ed942c3861c69963ce3ec1e72eb08e)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The specification is now simple
* On linux, use `-Xlinker -rpath -Xlinker` to set the rpath of the
executable
* On darwin, never use `-Xlinker -rpath -Xlinker`, always inject
the rpath afterwards, see `runInjectRPaths`.
* If `-fno-use-rpaths` is passed then *never* inject anything into the
rpath.
Fixes #20004
(cherry picked from commit 6281a333303a4dbe75a97a87c17c0fbace5268f5)
(cherry picked from commit 827df61afa0ce1f1f0f0dad5e13f43681b05eda8)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Note [fd_set_overflow]
~~~~~~~~~~~~~~~~~~~~~~
In this note is the very sad tale of __darwin_fd_set_overflow.
The 8.10.5 release was broken because it was built in an environment
where the libraries were provided by XCode 12.*, these libraries introduced
a reference to __darwin_fd_set_overflow via the FD_SET macro which is used in
Select.c. Unfortunately, this symbol is not available with XCode 11.* which
led to a linker error when trying to link anything. This is almost certainly
a bug in XCode but we still have to work around it.
Undefined symbols for architecture x86_64:
"___darwin_check_fd_set_overflow", referenced from:
_awaitEvent in libHSrts.a(Select.o)
ld: symbol(s) not found for architecture x86_64
One way to fix this is to upgrade your version of xcode, but this would
force the upgrade on users prematurely. Fortunately it also seems safe to pass
the linker option "-Wl,-U,___darwin_check_fd_set_overflow" because the usage of
the symbol is guarded by a guard to check if it's defined.
__header_always_inline int
__darwin_check_fd_set(int _a, const void *_b)
{
if ((uintptr_t)&__darwin_check_fd_set_overflow != (uintptr_t) 0) {
return __darwin_check_fd_set_overflow(_a, _b, 1);
return __darwin_check_fd_set_overflow(_a, _b, 0);
} else {
return 1;
}
Across the internet there are many other reports of this issue
See: https://github.com/mono/mono/issues/19393
, https://github.com/sitsofe/fio/commit/b6a1e63a1ff607692a3caf3c2db2c3d575ba2320
The issue was originally reported in #19950
Fixes #19950
(cherry picked from commit 2f2b2b82147004b57f45a64b49cdb26c533e87bf)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We now have two darwin flavours. AArch64-Darwin, and
x86_64-darwin, the latter one which has proper custom
adjustor support, the former though relies on libffi.
Mixing both leads to odd crashes, as the closures might
not fit the size of the libffi closures. Hence this
needs to be guarded by the USE_LBFFI_FOR_ADJUSTORS guard.
Original patch by Hamish Mackenzie
(cherry picked from commit e5893c030b7f58c8afaeca350dd9034582ad48bf)
|
|
|
|
|
|
| |
This fixes the performance test tracking for all darwin environments.
(cherry picked from commit 1e2ba8a44b9193d572a98c17f1b22c54db544400)
|
|
|
|
| |
(cherry picked from commit d4c43df13d428b1acee2149618f8503580303486)
|
|
|
|
| |
(cherry picked from commit 5dcb8619f67b8f9a30bde0519a14d3b8c6b4ee1f)
|
|
|
|
|
|
| |
These tests were originally written against the GHC2021 language.
(cherry picked from commit 406b9f6c8296ad60d9123e9d6e234993171918b1)
|
|
|
|
|
|
| |
Signed-off-by: Emily Martins <emily.flakeheart@gmail.com>
(cherry picked from commit 05ae47721d05cd35b7a67dac054f0ab483a4ca28)
(cherry picked from commit 9446f10a56ed69b513dd939ba47c02591138927c)
|
|
|
|
|
|
|
|
|
| |
Fixes #20042
Signed-off-by: Emily Martins <emily.flakeheart@gmail.com>
Signed-off-by: Hécate Moonlight <hecate@glitchbra.in>
(cherry picked from commit d455c39e93881dc3810ecc16a2f1bfd6c4e2fcdd)
(cherry picked from commit d3fac8dd7536248cd4f14c8a55eee74bd3162e7d)
|
|
|
|
|
|
|
| |
Fix #20066
(cherry picked from commit a820f9002d8f75385aaaa141ac3c6f001e8a9874)
(cherry picked from commit a24f61d04f240d7a35ccf84f312eafc00f5428a2)
|
|
|
|
|
| |
(cherry picked from commit 4023d4d96a9492eb686883539153b2be7d23e1c7)
(cherry picked from commit d2c3f71f6549c1943c50b8beee7881477ef13b87)
|
|
|
|
|
| |
(cherry picked from commit 74c874148fbea996cadf1d9fa50f2a44488dd82b)
(cherry picked from commit 3d65c4e3f2aadd4f9c7eb5c421f70247e63c66b2)
|
|
|
|
|
| |
(cherry picked from commit 3f60a7e59dc5e067a3c764799478645dbc37700d)
(cherry picked from commit 5f8aadabb420367807d6846eda3f008bcda1a5cd)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
exprConApp_maybe
For example:
"\0" is encoded to "C0 80", then the rule would correct use a decoding
function to work out the first character was "C0 80" but then just used
BS.tail so the rest of the string was "80". This resulted in
"\0" being transformed into '\C0\80' : unpackCStringUTF8# "80"
Which is obviously bogus.
I rewrote the function to call utf8UnconsByteString directly and avoid
the roundtrip through Faststring so now the head/tail is computed by the
same call.
Fixes #19976
(cherry picked from commit 7f6454fb8cd92b2b2ad4e88fa6d81e34d43edb9a)
(cherry picked from commit a02fbadaf59521b5f1af3f05b45933b245093531)
|
|
|
|
|
|
|
|
|
| |
Previously we branched unnecessarily on
IF_NONMOVING_WRITE_BARRIER_ENABLED on every trip through the array
barrier push loop.
(cherry picked from commit 30f233fe8a0342abbafa2b785a32615bace9492f)
(cherry picked from commit d3951f5910ec51e382e0950857b42401936f30d7)
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously the code generator's logic for invoking the nonmoving write
barrier was inconsistent with the write barrier itself. Namely, the code
generator treated the header size argument as being in words whereas the
barrier expected bytes. This was the cause of #19715.
Fixes #19715.
(cherry picked from commit 221a104f44fdf58e4514d41ae827747c2bf938c8)
(cherry picked from commit e33239fe261414ad1ff7cefcf95dbbf7df336f1f)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Pthread based timer was initialized started while some other parts of
the RTS assume it is initialized stopped, e.g. in hs_init_ghc:
/* Start the "ticker" and profiling timer but don't start until the
* scheduler is up. However, the ticker itself needs to be initialized
* before the scheduler to ensure that the ticker mutex is initialized as
* moreCapabilities will attempt to acquire it.
*/
* after a fork, don't start the timer before the IOManager is
initialized: the timer handler (handle_tick) might call wakeUpRts to
perform an idle GC, which calls wakeupIOManager/ioManagerWakeup
Found while debugging #18033/#20132 but I couldn't confirm if it fixes
them.
(cherry picked from commit d99e76ad3600b4c5051da6923fb7454346ed0b7b)
|
|
|
|
|
|
|
|
|
| |
We need to be careful about the sign bit for BR26 relocation
otherwise we end up encoding a large positive number and reading
back a large negative number.
(cherry picked from commit d6ab9c60288369ec991826b158d751dd4cb3319e)
(cherry picked from commit e0aa6de799463d0868da7e8a5ad29141141e7855)
|
|
|
|
| |
(cherry picked from commit 787ea38afa71f1a128194e846bd609b198094bfe)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change aims to make source files relocatable w.r.t. to the interface files produced by the compiler.
This is so that we can download interface files produced by a cloud build system and then reuse them in a local ghcide session
catch another case of implicit includes
actually use the implicit quote includes
add another missing case
recomp020
test that .hi files are reused even if .hs files are moved to a new location
Added recomp021 to record behaviour with non implicit includes
add a note
additional pointer to the note
Mention #16956 in Note
(cherry picked from commit 9faafb0aaff04e86a58b9e108f84618b12f2057c)
(cherry picked from commit 3c630d737b81ed896b392032aadfae551c42abc7)
|
|
|
|
|
|
|
|
| |
Fixes #19849
Co-authored-by: Krzysztof Gogolewski <krzysztof.gogolewski@tweag.io>
(cherry picked from commit c4099b0908e3f4ae04312ca82af147eb1585cd09)
(cherry picked from commit 066317d688ee09ebfe1e07aa52ff171cde223d15)
|
|
|
|
|
| |
(cherry picked from commit df4a0a53691cd833f54eb443401243dd9c964196)
(cherry picked from commit 697db52044f577b584a04a8aac4cd211983fda61)
|
|
|
|
|
|
|
|
|
| |
This allows to start iserv by passing port 0 to startSlave,
which in turns allows to get an available port when no
port is known to be free a priori.
(cherry picked from commit b39dec86df8106a2bb4770758941572073ad57a2)
(cherry picked from commit 80e6fd527e60028ecc4f7724f2b9c8705bfd9175)
|
|
|
|
|
|
| |
Fixes #19852 and #19609
(cherry picked from commit 6a577cf0edb38577e703c9523a4307ae9fa7576d)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In #19822, we realised that the Simplifier's new habit of floating cases into
`runRW#` continuations inhibits CPR analysis from giving key functions of `text`
the CPR property, such as `singleton`.
This patch fixes that by anticipating part of !5667 (Nested CPR) to give
`runRW#` the proper CPR transformer it now deserves: Namely, `runRW# (\s -> e)`
should have the CPR property iff `e` has it.
The details are in `Note [Simplification of runRW#]` in GHC.CoreToStg.Prep.
The output of T18086 changed a bit: `panic` (which calls `runRW#`) now has
`botCpr`. As outlined in Note [Bottom CPR iff Dead-Ending Divergence], that's
OK.
Fixes #19822.
Metric Decrease:
T9872d
(cherry picked from commit e87b8e108303634af8a7247037d50ab10456c189)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Because the generated `KindRep`s don't have an unfolding, !3230 did not
actually stop to compute, attach and serialise unnecessary CPR
signatures for them. As already said in
`Note [CPR for data structures]`, that leads to bloated interface
files which is ultimately quadratic for Nested CPR.
So we don't attach any CPR signature to bindings that
* Are not thunks (because thunks are not in WHNF)
* Have arity 0 (which means the top-level constructor is not a lambda)
If the data structure has an unfolding, we continue to look through it.
If not (as is the case for `KindRep`s), we look at the unchanged CPR
signature and see `topCprType`, as expected.
(cherry picked from commit e3655f810b4eba1fb7d81a3227a08dae8b85dfc4)
|
|
|
|
|
|
| |
As requested by Michael Snoyman.
(cherry picked from commit 43139064a95220cfa8b633840a76eb75d5affd0d)
|
|
|
|
|
|
|
|
|
|
| |
Somewhere in the course of forward- and back-porting the keepAlive#
branch the Note which described the mechanism was dropped. Reintroduce
it.
Closes #19712.
(cherry picked from commit a5e9e5b601fecef421ec4bfa28e135404986ded0)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously `prepare_build_mk` created a build.mk that was overwritten right
after.
This makes the BIGNUM_BACKEND choice take effect, fixing #19953, and
causing the metric increase below in the integer-simple job.
Metric Increase:
space_leak_001
(cherry picked from commit 87f57ecf2523e83d8dd9cad919a6f2010f630ad0)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch, provoked by regressions in the text package
(#19557), improves sharing of join points. This also fixes
the terrible behaviour in #20049.
See Note [Duplicating join points] in GHC.Core.Opt.Simplify.
* In the StrictArg case of mkDupableContWithDmds, don't
use Plan A for data constructors
* In postInlineUnconditionally, don't inline JoinIds
Avoids inlining join $j x = Just x
in case blah of
A -> $j x1
B -> $j x2
C -> $j x3
* In mkDupableStrictBind and mkDupableStrictAlt, create
join points (much) more often: exprIsTrivial rather than
exprIsDupable. This may be much, but we'll see.
Metric Decrease:
T12545
T13253-spj
T13719
T18140
T18282
T18304
T18698a
T18698b
Metric Increase:
T16577
T18923
T9961
(cherry picked from commit 5b187575dac64e0a202f0700bdb7a1d1604f9438)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As #19668 showed, there was an /asymptotic/ slow-down in zonking in
GHC 9.0, exposed in test T9198. The bug was actually present in earlier
compilers, but by a fluke didn't actually show up in any of our tests;
but adding Quick Look exposed it.
The bug was that in zonkTyVarOcc we
1. read the meta-tyvar-env variable
2. looked up the variable in the env
3. found a 'miss'
4. looked in the variable, found `Indirect ty`
5. zonked `ty`
6. update the env *gotten from step 1* to map the variable
to its zonked type.
The bug is that we thereby threw away all teh work done in step 4.
In T9198 that made an enormous, indeed asymptotic difference.
The fix is easy: use updTcRef.
I commented in `Note [Sharing when zonking to Type]`
-------------------------
Metric Decrease:
T9198
-------------------------
(cherry picked from commit 0a8c14bd5a5438b1d042ad279b8ffff1bc867e7e)
|
|
|
|
|
|
|
|
|
| |
this causes *significant* slowdown on macOS as the linker ends
up looking through all the paths. Slowdown can be as bad as
100% or more.
(cherry picked from commit 820b0766984d42c06c977a6c32da75c429106f7f)
(cherry picked from commit cceb461a8cd8d48a077eabceab1907d874ba4852)
|
|
|
|
|
| |
(cherry picked from commit 07b1af0362beaaf221cbee7b17bbe0a5606fd87d)
(cherry picked from commit ccea61173679b8e26b09fd2d3d1f35cfb078df6c)
|
|
|
|
|
| |
(cherry picked from commit f7062e1b0c91e8aa78e245a3dab9571206fce16d)
(cherry picked from commit 49839322e9569d8449581e75d5613a7818201b96)
|
|
|
|
|
| |
(cherry picked from commit b821fcc7142edff69aa4c47dc1a5bd30b13c1ceb)
(cherry picked from commit 7df44e434e27ff31fb3ed721414ef529b22a1102)
|
|
|
|
|
| |
(cherry picked from commit c3944bc89d062a4850946904133c7a1464d59012)
(cherry picked from commit 582fc5839819cae88df97e14a85bc05a606c747d)
|
|
|
|
|
|
|
|
| |
-Wno-unsupported-llvm-version should suppress the LLVM version
missmatch warning that messes up the output.
(cherry picked from commit 63455300625fc12b2aafc3e339eb307510a6e8bd)
(cherry picked from commit 65440597fe5dae97374bd0a52003ed5c7a9ac87d)
|
|
|
|
|
| |
(cherry picked from commit 4bea83afec009dfd3c6313cac4610d00ba1f9a3d)
(cherry picked from commit 3f09c6f8f81f14aa7d8b9a3ccbebe7aabdb4e374)
|
|
|
|
|
| |
(cherry picked from commit 33c4d497545559a38bd8d1caf6c94e5e2a77647b)
(cherry picked from commit 035f4bb1dc9dfdaed7a22692180ea77021e1121e)
|