- Dec 07, 2020
-
-
Ben Gamari authored
(cherry picked from commit a3b8375e)
-
GHC GitLab CI authored
The mark thread is not joinable as we detach from it on creation. (cherry picked from commit ca1ef0e7)
-
GHC GitLab CI authored
pthread_join returns its error code and apparently doesn't set errno. (cherry picked from commit c488ac73)
-
GHC GitLab CI authored
Ensure that the the free variables have been pushed to the update remembered set before we zero the slop. (cherry picked from commit 134f7599)
-
GHC GitLab CI authored
(cherry picked from commit 35c22991)
-
GHC GitLab CI authored
After a THROWTO message has been handle the message closure is overwritten by a NULL message. We must ensure that the original closure's pointers continue to be visible to the nonmoving GC. (cherry picked from commit 6c2faf15)
-
GHC GitLab CI authored
The TSAN rework (specifically aad1f803) introduced a subtle regression in GC.c, swapping `g0` in place of `gen`. Whoops! Fixes #18997. (cherry picked from commit 21c807df)
-
Ben Gamari authored
See Note [Racing weak pointer evacuation] for all of the gory details.
-
- Dec 04, 2020
-
-
Ben Gamari authored
When fixing #17962 I neglected to consider that --export-dynamic is only supported on ELF platforms. (cherry picked from commit 35799dda)
-
- Dec 01, 2020
-
-
Ben Gamari authored
Fix the previous backport; this function was dead code in master but is still needed due to ProfHeap.c in ghc-8.10.
-
Ben Gamari authored
Since the latter wants to call getRTSStats.
-
Ben Gamari authored
While on face value this seems a bit heavy, I think it's far better than enforcing ordering on every access.
-
Ben Gamari authored
-
Ben Gamari authored
We can generally be pretty relaxed in the barriers here since the timer thread is a loop.
-
Ben Gamari authored
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.
-
Ben Gamari authored
-
Ben Gamari authored
-
Ben Gamari authored
This avoids #17289.
-
Ben Gamari authored
-
Ben Gamari authored
This suppresses the other side of a race during shutdown.
-
Ben Gamari authored
-
Ben Gamari authored
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.
-
Ben Gamari authored
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.
-
Here we are doing lazy initialization; it's okay if we do the check more than once, hence relaxed operation is fine.
-
Ben Gamari authored
Fixes #17275.
-
Ben Gamari authored
-
Ben Gamari authored
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.
-
Ben Gamari authored
-
Ben Gamari authored
-
Ben Gamari authored
-
Ben Gamari authored
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`).
-
Ensure that the GC leader synchronizes with workers before calling stat_endGC.
-
Ben Gamari authored
Previously we would take all capabilities but fail to join on the thread itself, potentially resulting in a leaked thread.
-
Ben Gamari authored
-
Ben Gamari authored
-
Ben Gamari authored
-
Ben Gamari authored
By taking all_tasks_mutex in stat_exit. Also better-document the fact that the task statistics are protected by all_tasks_mutex.
-
Ben Gamari authored
-
Ben Gamari authored
-
Ben Gamari authored
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.
-