<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en">
<head>
<meta content="text/html; charset=US-ASCII" http-equiv="Content-Type">
<title>
GitLab
</title>
<style>img {
max-width: 100%; height: auto;
}
</style>
</head>
<body>
<div class="content">
<h3>
Ben Gamari pushed to branch wip/tsan-ghc-8.10
at <a href="https://gitlab.haskell.org/ghc/ghc">Glasgow Haskell Compiler / GHC</a>
</h3>
<h4>
Commits:
</h4>
<ul>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/43f970499d053098d1928ce3921176192ec07d7a">43f97049</a></strong>
<div>
<span>by Moritz Angermann</span>
<i>at 2020-10-14T13:51:31-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">[macOS] improved runpath handling
In b592bd98ff25730bbe3c13d6f62a427df8c78e28 we started using
-dead_strip_dylib on macOS when lining dynamic libraries and binaries.
The underlying reason being the Load Command Size Limit in macOS
Sierra (10.14) and later.
GHC will produce @rpath/libHS... dependency entries together with a
corresponding RPATH entry pointing to the location of the libHS...
library. Thus for every library we produce two Load Commands. One to
specify the dependent library, and one with the path where to find it.
This makes relocating libraries and binaries easier, as we just need to
update the RPATH entry with the install_name_tool. The dynamic linker
will then subsitute each @rpath with the RPATH entries it finds in the
libraries load commands or the environement, when looking up @rpath
relative libraries.
-dead_strip_dylibs intructs the linker to drop unused libraries. This in
turn help us reduce the number of referenced libraries, and subsequently
the size of the load commands. This however does not remove the RPATH
entries. Subsequently we can end up (in extreme cases) with only a
single @rpath/libHS... entry, but 100s or more RPATH entries in the Load
Commands.
This patch rectifies this (slighly unorthodox) by passing *no* -rpath
arguments to the linker at link time, but -headerpad 8000. The
headerpad argument is in hexadecimal and the maxium 32k of the load
command size. This tells the linker to pad the load command section
enough for us to inject the RPATHs later. We then proceed to link the
library or binary with -dead_strip_dylibs, and *after* the linking
inspect the library to find the left over (non-dead-stripped)
dependencies (using otool). We find the corresponding RPATHs for each
@rpath relative dependency, and inject them into the library or binary
using the install_name_tool. Thus achieving a deadstripped dylib (and
rpaths) build product.
We can not do this in GHC, without starting to reimplement a dynamic
linker as we do not know which symbols and subsequently libraries are
necessary.
Commissioned-by: Mercury Technologies, Inc. (mercury.com)
(cherry picked from commit 4ff93292243888545da452ea4d4c1987f2343591)
Signed-off-by: Moritz Angermann <moritz.angermann@iohk.io>
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/da1b5345119581c4f86dcc0470decdcafaa6e93f">da1b5345</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-10-16T01:10:54+02:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">typecheck: Drop SPECIALISE pragmas when there is no unfolding
Previously the desugarer would instead fall over when it realized that
there was no unfolding for an imported function with a SPECIALISE
pragma. We now rather drop the SPECIALISE pragma and throw a warning.
Fixes #18118.
(cherry picked from commit 708e374a8bf108999c11b6cf59c7d27677ed24a8)
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/f3bc882d4cf7d4e1e46ef8f86f88c4245033d694">f3bc882d</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-10-16T01:13:02+02:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">testsuite: Add test for #18118
(cherry picked from commit 2cdb72a569f6049a390626bca0dd6e362045ed65)
Conflicts:
testsuite/tests/typecheck/should_compile/all.T
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/7e6c6340396508b5c42a656795a9c976f543716e">7e6c6340</a></strong>
<div>
<span>by Moritz Angermann</span>
<i>at 2020-10-16T01:14:57+02:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">[fixup 3433] move debugBelch into IF_DEBUG(linker)
The commit in dff1cb3d9c111808fec60190747272b973547c52 incorrectly left
the `debugBelch` function without a comment or IF_DEBUG(linker,)
decoration. This rectifies it.
Needs at least a 8.10 backport, as it was backported in 6471cc6aff80d5deebbdb1bf7b677b31ed2af3d5
(cherry picked from commit 6189cc04ca6c3d79126744e988b487f75ccef9e2)
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/1ac0a2aa7025b75b5fb5ce68cdbc38d4c2534aff">1ac0a2aa</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-10-16T01:16:06+02:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Add stg_copyArray_barrier to RtsSymbols list
It's incredible that this wasn't noticed until now.
(cherry picked from commit ea1cbb8f2ac9e077ed19530911c3a35c5f46ee8a)
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/1fdadd414bb3a4543444469202d586fc8732bb05">1fdadd41</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-10-16T01:16:38+02:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Fix erroneous usage of vsnprintf
As pointed out in #18685, this should be snprintf not vsnprintf. This
appears to be due to a cut-and-paste error.
Fixes #18658.
(cherry picked from commit ce42e187ebfc81174ed477f247f023ae094c9b24)
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/ec6b31f06d10b1ab259166c38b7006ed4c3df582">ec6b31f0</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-10-16T01:17:08+02:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/nonmoving: Add missing STM write barrier
When updating a TRec for a TVar already part of a transaction we
previously neglected to add the old value to the update remembered set.
I suspect this was the cause of #18587.
(cherry picked from commit 0799b3de3e3462224bddc0e4b6a3156d04a06361)
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/7367ae91d7dfcff2a18bf2f6da312580d0ca57e1">7367ae91</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-10-16T01:17:33+02:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Drop field initializer on thread_basic_info_data_t
This struct has a number of fields and we only care that the value is
initialized with zeros. This eliminates the warnings noted in #17905.
(cherry picked from commit 057db94ce038970b14df1599fe83097c284b9c1f)
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/5b5dde18b2cfb1a8128d2fe89f4513feac2e4ebf">5b5dde18</a></strong>
<div>
<span>by Benjamin Maurer</span>
<i>at 2020-10-16T01:19:50+02:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Workaround for #18623: GHC crashes bc. under rlimit for vmem it will reserve
_all_ of it, leaving nothing for, e.g., thread stacks.
Fix will only allocate 2/3rds and check whether remainder is at least large
enough for minimum amount of thread stacks.
(cherry picked from commit 74c797f6b72c4d01f5e0092dfac1461f3f3dd7a2)
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/8cb4fe2459ab11b9efcc926410cdb356b29d6b22">8cb4fe24</a></strong>
<div>
<span>by Krzysztof Gogolewski</span>
<i>at 2020-10-16T01:20:55+02:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Add a flag to indicate that gcc supports -no-pie
Fixes #17919.
(cherry picked from commit 587c3c514f05f97082952d613695f1186ff3174e)
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/5a4d0c3dcd2d83744293ea82a7e5606ad2038109">5a4d0c3d</a></strong>
<div>
<span>by Krzysztof Gogolewski</span>
<i>at 2020-10-16T01:21:41+02:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Add -pgmlm and -optlm flags
!3798 added documentation and semantics for the flags,
but not parsing.
(cherry picked from commit fd302e938ebf48c73d9f715d67ce8cd990f972ff)
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/658362c68a64f9b999367875ae7d75db07eb2620">658362c6</a></strong>
<div>
<span>by Tamar Christina</span>
<i>at 2020-10-19T23:16:22-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: fix race condition in StgCRun
On windows the stack has to be allocated 4k at a time, otherwise we get
a segfault. This is done by using a helper ___chkstk_ms that is provided
by libgcc. The Haskell side already knows how to handle this but we need
to do the same from STG. Previously we would drop the stack in StgRun
but would only make it valid whenever the scheduler loop ran.
This approach was fundamentally broken in that it falls apart when you
take a signal from the OS. We see it less often because you initially
get allocated a 1MB stack block which you have to blow past first.
Concretely this means we must always keep the stack valid.
Fixes #18601.
(cherry picked from commit fd984d68e5ec4b04bc79395c099434e653eb1060)
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/f60607cfadb59dd4c08fe5cdf86021ba598816cb">f60607cf</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-10-21T22:01:58-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Add __mingw_vsnwprintf to RtsSymbols
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/929e09eddfae14bb55a979f459f11bbcd5f051bd">929e09ed</a></strong>
<div>
<span>by toonn</span>
<i>at 2020-10-22T22:12:43-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Fix typos in 8.10.2 changelog
Replace an "as well" missing "as" with "and" in 4.1 Highlights.
Add missing apostrophe in "user's guide", insert space in "work around"
and dash in "cost-center" in 4.2.2 Runtime system.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/cc085aefd9d72da6aff5c5305a6b864398f95ec3">cc085aef</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-10-31T22:31:33-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Bump Cabal submodule to 3.2.1.0
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/f96d6cd703cbbfb7af62e421c8d48c254a5e8843">f96d6cd7</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-14T06:47:14-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">testsuite: Add test for #18346
This was fixed by 4291bddaea3148908c55f235ee8978e1d9aa6f20.
(cherry picked from commit ee5dcdf95a7c408e9c339aacebf89a007a735f8f)
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/36c1027d8d8e50bf354d5194f2ad7fa2c2349888">36c1027d</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-14T06:47:14-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/linker: Fix relocation overflow in PE linker
Previously the overflow check for the IMAGE_REL_AMD64_ADDR32NB
relocation failed to account for the signed nature of the value.
Specifically, the overflow check was:
uint64_t v;
v = S + A;
if (v >> 32) { ... }
However, `v` ultimately needs to fit into 32-bits as a signed value.
Consequently, values `v > 2^31` in fact overflow yet this is not caught
by the existing overflow check.
Here we rewrite the overflow check to rather ensure that
`INT32_MIN <= v <= INT32_MAX`. There is now quite a bit of repetition
between the `IMAGE_REL_AMD64_REL32` and `IMAGE_REL_AMD64_ADDR32` cases
but I am leaving fixing this for future work.
This bug was first noticed by @awson.
Fixes #15808.
(cherry picked from commit 6d21ecee535782f01dba9947a49e282afee25724)
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/410b43a29576c40f4a65c9558f080a97c194636c">410b43a2</a></strong>
<div>
<span>by Andreas Klebinger</span>
<i>at 2020-11-18T16:22:35-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">NCG: Fix 64bit int comparisons on 32bit x86
We no compare these by doing 64bit subtraction and
checking the resulting flags.
We used to do this differently but the old approach was
broken when the high bits compared equal and the comparison
was one of >= or <=.
The new approach should be both correct and faster.
(cherry picked from commit bb100805337adc666867da300ee5b0b11c18fe00)
(cherry picked from commit fda3e50b559f6f25347f9ad7239e5003e27937b0)
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/ed57c3a9eb9286faa222f98e484a9ef3432b2025">ed57c3a9</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-18T21:39:41-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Refactor foreign export tracking
This avoids calling `libc` in the initializers which are responsible for
registering foreign exports. We believe this should avoid the corruption
observed in #18548.
See Note [Tracking foreign exports] in rts/ForeignExports.c for an
overview of the new scheme.
(cherry picked from commit c492134912e5270180881b7345ee86dc32756bdd)
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/65be3832f3aa48bbde896ee846c18fcba1f16b42">65be3832</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-18T21:39:53-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Refactor unloading of foreign export StablePtrs
Previously we would allocate a linked list cell for each foreign export.
Now we can avoid this by taking advantage of the fact that they are
already broken into groups.
(cherry picked from commit 40dc91069d15bfc1d81f1722b39e06cac8fdddd1)
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/3571cc4137bebf067d7c88ec0206104cb5149676">3571cc41</a></strong>
<div>
<span>by Matthias Andreas Benkard</span>
<i>at 2020-11-19T15:36:22-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">macOS: Load frameworks without stating them first.
macOS Big Sur makes the following change to how frameworks are shipped
with the OS:
> New in macOS Big Sur 11 beta, the system ships with a built-in
> dynamic linker cache of all system-provided libraries. As part of
> this change, copies of dynamic libraries are no longer present on
> the filesystem. Code that attempts to check for dynamic library
> presence by looking for a file at a path or enumerating a directory
> will fail. Instead, check for library presence by attempting to
> dlopen() the path, which will correctly check for the library in the
> cache. (62986286)
https://developer.apple.com/documentation/macos-release-notes/macos-big-sur-11-beta-release-notes/
Therefore, the previous method of checking whether a library exists
before attempting to load it makes GHC.Runtime.Linker.loadFramework
fail to find frameworks installed at /System/Library/Frameworks.
GHC.Runtime.Linker.loadFramework now opportunistically loads the
framework libraries without checking for their existence first,
failing only if all attempts to load a given framework from any of the
various possible locations fail.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/57b5f130a4b0d719b6867a5cea1b1c8a73bbe60f">57b5f130</a></strong>
<div>
<span>by Matthias Andreas Benkard</span>
<i>at 2020-11-19T15:36:22-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">loadFramework: Output the errors collected in all loading attempts.
With the recent change away from first finding and then loading a
framework, loadFramework had no way of communicating the real reason
why loadDLL failed if it was any reason other than the framework
missing from the file system. It now collects all loading attempt
errors into a list and concatenates them into a string to return to
the caller.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/07c5acae150f8b8ed79275ab12774eda58979c69">07c5acae</a></strong>
<div>
<span>by Matthias Andreas Benkard</span>
<i>at 2020-11-19T15:36:22-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Document loadFramework changes. (#18446)
Adds commentary on the rationale for the changes made in merge request
!3689.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/d84ae4d7e497e77d62296664fff404c015501297">d84ae4d7</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:05:59-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">SMP.h: Add C11-style atomic operations
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/d3c57867f0b3c526b0678c1f9b58ff05b69db6d2">d3c57867</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:05:59-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Infrastructure for testing with ThreadSanitizer
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/623090ffb7842c8b675ab0fd8031e173896c820f">623090ff</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:05:59-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/CNF: Initialize all bdescrs in group
It seems wise and cheap to ensure that the whole bdescr of all blocks of
a compact group is valid, even if most cases only look at the flags
field.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/e2b937defcf90b1851383808058c2595b3dc0b00">e2b937de</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:00-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/Capability: Intialize interrupt field
Previously this was left uninitialized.
Also clarify some comments.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/9b5e63e88da453010af5257ecc98b6ef8b3981e3">9b5e63e8</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:00-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/Task: Make comments proper Notes
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/b151680dace075fd45793fc58dab63386895345c">b151680d</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:00-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/SpinLock: Move to proper atomics
This is fairly straightforward; we just needed to use relaxed operations
for the PROF_SPIN counters and a release store instead of a write
barrier.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/1be2beabeccb06a1e747331c4335f2a8b73368dd">1be2beab</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:00-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/OSThreads: Fix data race
Previously we would race on the cached processor count. Avoiding this is
straightforward; just use relaxed operations.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/9cef76a2fda56543098a11cae1ff1b0a96c463a3">9cef76a2</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:00-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/ClosureMaros: Use relaxed atomics
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/62df95f54d273f81cdf25b84ad78eceab422f409">62df95f5</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:00-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">testsuite: Fix thread leak in hs_try_putmvar00[13]
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/8b544487258994e5c5a703d552860b9912c9bf10">8b544487</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:00-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Introduce SET_HDR_RELEASE
Also ensure that we also store the info table pointer last to ensure
that the synchronization covers all stores.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/17b82ff667da7ddce7ca819d8d0d054735c02aa9">17b82ff6</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:00-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Factor out logic to identify a good capability for running a task
Not only does this make the control flow a bit clearer but it also
allows us to add a TSAN suppression on this logic, which requires
(harmless) data races.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/f30971d6adfd92f3515c594941caa7b1767057c7">f30971d6</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:00-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Annotate benign race in waitForCapability
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/2a70c25336d9537df878117e12a3b7ccef529c8a">2a70c253</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:00-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Clarify locking behavior of releaseCapability_
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/9047b48371fb160317f6b9c0c48cec901372ec38">9047b483</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:00-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Add assertions for task ownership of capabilities
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/ca946de2244574034018b161d1fd9a0014452b2f">ca946de2</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:00-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Use relaxed atomics on n_returning_tasks
This mitigates the warning of a benign race on n_returning_tasks in
shouldYieldCapability.
See #17261.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/3336b9ad7a38c79ed629d22acabb37f937a5d983">3336b9ad</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:00-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Mitigate races in capability interruption logic
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/5e7cf74fb98d0705c4f677451dd400f091174542">5e7cf74f</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:00-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/Capability: Use relaxed operations for last_free_capability
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/b6baf63384339f98208c1db93954341627ebdeb3">b6baf633</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:00-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Use relaxed operations for cap->running_task (TODO)
This shouldn't be necessary since only the owning thread of the capability
should be touching this.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/ad72d7a7c15d4faa9e5abeb9b5862c6e37016f68">ad72d7a7</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:00-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/Schedule: Use relaxed operations for sched_state
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/ac23a4b1d62db1cc2f30181727ac3a79cba40b8b">ac23a4b1</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:00-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Accept data race in work-stealing implementation
This race is okay since the task is owned by the capability pushing it.
By Note [Ownership of Task] this means that the capability is free to
write to `task->cap` without taking `task->lock`.
Fixes #17276.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/0f99217629a9a7d0c2f018feb09dcd2db26b591b">0f992176</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:00-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Eliminate data races on pending_sync
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/968e57e83e19f850fec5f29866b2aec7ab9fcc30">968e57e8</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:00-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/Schedule: Eliminate data races on recent_activity
We cannot safely use relaxed atomics here.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/f57d054c99c79365f9cbbb063ce8caacf3ee6199">f57d054c</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:00-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Avoid data races in message handling
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/c087685e1c5f95b582abaeac0f28f13ad8c1d22e">c087685e</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:00-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/Messages: Drop incredibly fishy write barrier
executeMessage previously had a write barrier at the beginning of its
loop apparently in an attempt to synchronize with another thread's
writes to the Message. I would guess that the author had intended to use
a load barrier here given that there are no globally-visible writes done
in executeMessage.
I've removed the redundant barrier since the necessary load barrier is
now provided by the ACQUIRE_LOAD.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/406fb545d971b89639bef866cb6027a33ed483a4">406fb545</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:00-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/ThreadPaused: Avoid data races
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/2f24325d297730c0758d7d00eb275bd4ec968e99">2f24325d</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:00-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/Schedule: Eliminate data races in run queue management
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/d2dad2eb9a8f8f3877acbe0fc17be6be2fd35bbf">d2dad2eb</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:00-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Eliminate shutdown data race on task counters
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/bee14332d376904168a1a70ca2cccc5eec84fbad">bee14332</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:00-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/Threads: Avoid data races (TODO)
Replace barriers with appropriate ordering. Drop redundant barrier in
tryWakeupThread (the RELEASE barrier will be provided by sendMessage's
mutex release).
We use relaxed operations on why_blocked and the stack although it's not
clear to me why this is necessary.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/df937d52b0e2c79a24947ecd374ef8ef33bc849f">df937d52</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:00-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/Messages: Annotate benign race
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/d91a6199c723f0b0bf90a495a4ac7bd13ee67519">d91a6199</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:00-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/RaiseAsync: Synchronize what_next read
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/39b37c110a985013ec877ad46a981bf47178830a">39b37c11</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:00-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/Task: Move debugTrace to avoid data race
Specifically, we need to hold all_tasks_mutex to read taskCount.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/22876a69c911b318068b7713cd7f2231ddb730bc">22876a69</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:00-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Disable flawed assertion
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/d83f867e64772eecb6d40767bad10ea3ad77587a">d83f867e</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:00-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Document schedulePushWork race
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/c02ed4bef0239e1d633c37e8758a0ba115028c9d">c02ed4be</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:01-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Capabiliity: Properly fix data race on n_returning_tasks
There is a real data race but can be made safe by using proper atomic
(but relaxed) accesses.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/cdb3e4d1787fb5d05b2386dd3fb5a2c70f6e95d1">cdb3e4d1</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:01-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Make write of to_cap->inbox atomic
This is necessary since emptyInbox may read from to_cap->inbox without
taking cap->lock.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/54ec6dd6906632996383331c8d15a78439a13fd4">54ec6dd6</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:01-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">gitlab-ci: Add nightly-x86_64-linux-deb9-tsan job
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/1657496477f3d3a4266d6d7cdc2b1bc818328f15">16574964</a></strong>
<div>
<span>by GHC GitLab CI</span>
<i>at 2020-11-24T12:06:01-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">testsuite: Mark setnumcapabilities001 as broken with TSAN
Due to #18808.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/08f636bcf479018c1cd9e6312933ca5239357b78">08f636bc</a></strong>
<div>
<span>by GHC GitLab CI</span>
<i>at 2020-11-24T12:06:01-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">testsuite: Skip divbyzero and derefnull under TSAN
ThreadSanitizer changes the output of these tests.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/c6195ca1a4331c2ac40fa74a2eb159cb5d7a0cb9">c6195ca1</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:01-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">testsuite: Skip high memory usage tests with TSAN
ThreadSanitizer significantly increases the memory footprint of tests,
so much so that it can send machines into OOM.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/6f8204c96d2adb90a935c6959690c863ce2f8601">6f8204c9</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:01-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">testsuite: Mark hie002 as high_memory_usage
This test has a peak residency of 1GByte; this is large enough to
classify as "high" in my book.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/3f64dc6d4a6874087f09084b006454043f7303ad">3f64dc6d</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:01-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">testsuite: Mark T9872[abc] as high_memory_usage
These all have a maximum residency of over 2 GB.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/75cf9779b444783f269e0b6dc90d6994dd33e7aa">75cf9779</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:01-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">gitlab-ci: Disable documentation in TSAN build
Haddock chews through enough memory to cause the CI builders to OOM and
there's frankly no reason to build documentation in this job anyways.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/0616ef3009030f0c9c3dea95f5aadfae53a94f35">0616ef30</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:01-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">TSANUtils: Ensure that C11 atomics are supported
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/1a72b5b7a27886601c6bedc1d49953a1c21fd287">1a72b5b7</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:01-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">testsuite: Mark T3807 as broken with TSAN
Due to #18883.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/b78d9e19015f6100a58866f97b34c7bd27fe97f1">b78d9e19</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:33-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">testsuite: Mark T13702 as broken with TSAN due to #18884
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/454fc2685c5557a8bd6202cbf255b6677963a46c">454fc268</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:39-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/BlockAlloc: Use relaxed operations
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/5b5f95cdd243b43dca96090ed893c54546c74fb6">5b5f95cd</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:39-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Rework handling of mutlist scavenging statistics
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/a491b2bd9437a818a575a16b03793114a8e38190">a491b2bd</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:39-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Avoid data races in StablePtr implementation
This fixes two potentially problematic data races in the StablePtr
implementation:
* We would fail to RELEASE the stable pointer table when enlarging it,
causing other cores to potentially see uninitialized memory.
* We would fail to ACQUIRE when dereferencing a stable pointer.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/9385616fe73036d4b3f6c1f240bf4857743246c5">9385616f</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:39-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/Storage: Use atomics
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/bea6352f4456b8dc9a42a146150f50a9f998c4c1">bea6352f</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:39-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/Updates: Use proper atomic operations
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/b61d42f10e8c4e3bf99ac9aee00d0aff52818a65">b61d42f1</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:39-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/Weak: Eliminate data races
By taking all_tasks_mutex in stat_exit. Also better-document the fact
that the task statistics are protected by all_tasks_mutex.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/e6fb1a23eb2abcb266d4cc561345c15fdf407827">e6fb1a23</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:39-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/GC: Use atomics
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/a961238563d7c304935201dde00ff367ab5e48f1">a9612385</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:39-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Use RELEASE ordering in unlockClosure
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/3dd8d329c946bc471d6aa5b1b6cda953f3eb149e">3dd8d329</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:39-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/Storage: Accept races on heap size counters
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/78c415cb45c67b06ae070328a68ee6f6cab1d681">78c415cb</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:39-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Join to concurrent mark thread during shutdown
Previously we would take all capabilities but fail to join on the thread
itself, potentially resulting in a leaked thread.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/bf7f5836ac22339014c61f6040e2748963b4d29e">bf7f5836</a></strong>
<div>
<span>by GHC GitLab CI</span>
<i>at 2020-11-24T12:06:39-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Fix race in GC CPU time accounting
Ensure that the GC leader synchronizes with workers before calling
stat_endGC.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/fe2f4f8e1cab3f36315374b9dda19abb021a5aa3">fe2f4f8e</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:39-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/SpinLock: Separate out slow path
Not only is this in general a good idea, but it turns out that GCC
unrolls the retry loop, resulting is massive code bloat in critical
parts of the RTS (e.g. `evacuate`).
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/b3094027b060d5549b26b26aef8ca74a19f492e6">b3094027</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:39-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Use relaxed ordering on spinlock counters
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/8ed2b04be10204e53071a70fe9371f03c35ce2a6">8ed2b04b</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:39-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Annotate hopefully "benign" races in freeGroup
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/03c0358e7e38bf0713de7407b06835693b6f1dfc">03c0358e</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:39-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Strengthen ordering in releaseGCThreads
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/859ae2147b15286171c6d8765bdfecef9cd37d83">859ae214</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:39-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/WSDeque: Rewrite with proper atomics
After a few attempts at shoring up the previous implementation, I ended
up turning to the literature and now use the proven implementation,
> N.M. Lê, A. Pop, A.Cohen, and F.Z. Nardelli. "Correct and Efficient
> Work-Stealing for Weak Memory Models". PPoPP'13, February 2013,
> ACM 978-1-4503-1922/13/02.
Note only is this approach formally proven correct under C11 semantics
but it is also proved to be a bit faster in practice.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/d9b2e38142634fec73a4e3e4443b956180a04998">d9b2e381</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:39-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Use relaxed atomics for whitehole spin stats
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/43e44655d5b6e84f801074cdba1e1c5a898f4da5">43e44655</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:39-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Avoid lock order inversion during fork
Fixes #17275.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/90ed40827800511aa97a59949b56a4af12d2f611">90ed4082</a></strong>
<div>
<span>by GHC GitLab CI</span>
<i>at 2020-11-24T12:06:40-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Use proper relaxe operations in getCurrentThreadCPUTime
Here we are doing lazy initialization; it's okay if we do the check more
than once, hence relaxed operation is fine.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/e355d4ab4eb2191f15c201153dd32f20918c1e11">e355d4ab</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:40-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/STM: Use atomics
This fixes a potentially harmful race where we failed to synchronize
before looking at a TVar's current_value.
Also did a bit of refactoring to avoid abstract over management of
max_commits.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/190fc07d123e4df58acbb6ce125551f794892e58">190fc07d</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:40-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/stm: Strengthen orderings to SEQ_CST instead of volatile
Previously the `current_value`, `first_watch_queue_entry`, and
`num_updates` fields of `StgTVar` were marked as `volatile` in an
attempt to provide strong ordering. Of course, this isn't sufficient.
We now use proper atomic operations. In most of these cases I strengthen
the ordering all the way to SEQ_CST although it's possible that some
could be weakened with some thought.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/ca323a84fc821bf10ce2a7c3971102611df1ced3">ca323a84</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:40-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Mitigate data races in event manager startup/shutdown
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/111a1dc061d63163db2ca565273db4ca6f62d05c">111a1dc0</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:40-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Suppress data race due to close
This suppresses the other side of a race during shutdown.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/d2067aed409df4a99acd4a6dcbbdf246dea39d30">d2067aed</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:40-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Accept benign races in Proftimer
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/8082c3e847bb4c02134fedf05ed40b73d4e9663f">8082c3e8</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:40-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Pause timer while changing capability count
This avoids #17289.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/533ac721e2d03747c8b104127cafcdade6f9a2ef">533ac721</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:40-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Fix #17289
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/0c90b600dc70149a3887803fd29001ba9a58bb2a">0c90b600</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:40-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">suppress #17289 (ticker) race
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/952b9069a1e68abb7417a99b0503dfd16a862a29">952b9069</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:40-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Fix timer initialization
Previously `initScheduler` would attempt to pause the ticker and in so
doing acquire the ticker mutex. However, initTicker, which is
responsible for initializing said mutex, hadn't been called
yet.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/c7979d7e0804fa69ede9a2137c0dd8e4ae4ef581">c7979d7e</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:40-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Fix races in Pthread timer backend shudown
We can generally be pretty relaxed in the barriers here since the timer
thread is a loop.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/220bb050c0e76d1c5ff49b2525e2c430e86d1171">220bb050</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:40-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/Stats: Hide a few unused unnecessarily global functions
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/7b7d68bbe12d40ec6c03469d19e0fde2fb4edf8d">7b7d68bb</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:40-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/Stats: Protect with mutex
While on face value this seems a bit heavy, I think it's far better than
enforcing ordering on every access.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/0b4a532a1ce8a02afa5f9eb3672ca86f0ea36c6f">0b4a532a</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-24T12:06:40-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Tear down stats_mutex after exitHeapProfiling
Since the latter wants to call getRTSStats.
</pre>
</li>
</ul>
<h4>30 changed files:</h4>
<ul>
<li class="file-stats">
<a href="#587d266bb27a4dc3022bbed44dfa19849df3044c">
.gitlab-ci.yml
</a>
</li>
<li class="file-stats">
<a href="#9ab3868b23ed5d5a6e12ef902049902556fa4009">
aclocal.m4
</a>
</li>
<li class="file-stats">
<a href="#cf5b233b6ec5c0a6951d1018fee507d2d2d71391">
compiler/deSugar/DsForeign.hs
</a>
</li>
<li class="file-stats">
<a href="#47f4bea1d308dee249030e6063d92071b5aac240">
compiler/ghci/Linker.hs
</a>
</li>
<li class="file-stats">
<a href="#72690aad4036dea6e6e116c30e4d7582f5077db7">
compiler/main/DriverPipeline.hs
</a>
</li>
<li class="file-stats">
<a href="#11e9bfd841c4163c1919b5e07efc84740e02010f">
compiler/main/DynFlags.hs
</a>
</li>
<li class="file-stats">
<a href="#e2d33310ae2b794523e977e3f2b48d7e1aafccae">
compiler/main/Settings.hs
</a>
</li>
<li class="file-stats">
<a href="#63c9d6e17d26bbb7f2d71094f5ffa2c67769ada0">
compiler/main/SysTools.hs
</a>
</li>
<li class="file-stats">
<a href="#9e0814dd04f20d7c1de2538b09f7429e329c8f30">
compiler/main/SysTools/Settings.hs
</a>
</li>
<li class="file-stats">
<a href="#4039dc9c5a155ac264cf84037271eb8259a3f0a7">
compiler/main/SysTools/Tasks.hs
</a>
</li>
<li class="file-stats">
<a href="#07ea27ca7b67f1025ae874e03f39c55610b0bb58">
compiler/main/ToolSettings.hs
</a>
</li>
<li class="file-stats">
<a href="#e08a7f13d9b4dd9216080725eb81bf254597216d">
compiler/nativeGen/X86/CodeGen.hs
</a>
</li>
<li class="file-stats">
<a href="#6097323667f26c24885a1b9207f9ad1d9ac7068d">
compiler/nativeGen/X86/Cond.hs
</a>
</li>
<li class="file-stats">
<a href="#fbf70e5accfb150cd0a2dfa0edb775dad323f4d4">
compiler/nativeGen/X86/Instr.hs
</a>
</li>
<li class="file-stats">
<a href="#341aef35ac370771edf59ec6b9fbb31507fa6f18">
compiler/typecheck/TcSigs.hs
</a>
</li>
<li class="file-stats">
<a href="#87db583be5c13c1f7b3c958b10e03d67b6a2ca06">
configure.ac
</a>
</li>
<li class="file-stats">
<a href="#6fd0e38a7c73b11b9e200c347c4d9fdef99186b3">
docs/users_guide/8.10.2-notes.rst
</a>
</li>
<li class="file-stats">
<a href="#12f1226bde7e9f48203d34d8d857513f2f1f4d75">
docs/users_guide/phases.rst
</a>
</li>
<li class="file-stats">
<a href="#4afc83c1ea6eb6b5e1defab5e25e77fde2847739">
hadrian/cfg/system.config.in
</a>
</li>
<li class="file-stats">
<a href="#2eeb40f0acd6cb433ebe65e34262040b618908a7">
hadrian/hadrian.cabal
</a>
</li>
<li class="file-stats">
<a href="#1655041cfd1add79e4c335c656405ee3eb3bd0dd">
hadrian/src/Flavour.hs
</a>
</li>
<li class="file-stats">
<a href="#dddc9a1e614b7c087fad91f7b89472aa69ecade4">
hadrian/src/Oracles/Setting.hs
</a>
</li>
<li class="file-stats">
<a href="#2d11d70063aa1378e9323caad80c7d9116ef4520">
hadrian/src/Rules/Generate.hs
</a>
</li>
<li class="file-stats">
<a href="#704958036ebddd9058fb1367e440b2ea1abb53e9">
hadrian/src/Settings.hs
</a>
</li>
<li class="file-stats">
<a href="#fbf853844dc48d850085cbef14c0af1e474cb087">
<span class="new-file">
+
hadrian/src/Settings/Flavours/ThreadSanitizer.hs
</span>
</a>
</li>
<li class="file-stats">
<a href="#40f83a2cddcbc1f8190b0551eb572ccf4ea88cc9">
includes/Rts.h
</a>
</li>
<li class="file-stats">
<a href="#75e004ba0ee41712b519d7dbb11188801ddbb722">
includes/ghc.mk
</a>
</li>
<li class="file-stats">
<a href="#456263288343573de99d23371fb69e400889ac65">
<span class="new-file">
+
includes/rts/ForeignExports.h
</span>
</a>
</li>
<li class="file-stats">
<a href="#452d5ee18aa2b91b6486a157ecf550dc84081872">
includes/rts/OSThreads.h
</a>
</li>
<li class="file-stats">
<a href="#397950c6118f4b5a74a10249b6bcc322ab8e2e25">
includes/rts/SpinLock.h
</a>
</li>
</ul>
<h5>The diff was not included because it is too large.</h5>
</div>
<div class="footer" style="margin-top: 10px;">
<p style="font-size: small; color: #666;">
—
<br>
<a href="https://gitlab.haskell.org/ghc/ghc/-/compare/f619ea8faae670bd2afb5545ad8b4a004eced3c7...0b4a532a1ce8a02afa5f9eb3672ca86f0ea36c6f">View it on GitLab</a>.
<br>
You're receiving this email because of your account on gitlab.haskell.org.
If you'd like to receive fewer emails, you can
adjust your notification settings.
</p>
</div>
</body>
</html>