| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
When performing GC without work stealing there was no guarantee that
spark pruning was happening after marking of the sparks. This could
cause us to GC live sparks under certain circumstances.
Fixes #22528.
|
|
|
|
|
|
|
| |
0e274c39bf836d5bb846f5fa08649c75f85326ac added an assertion in
`dirty_MUT_VAR` checking that the MUT_VAR being dirtied was clean.
However, this isn't necessarily the case since another thread may have
raced us to dirty the object.
|
|
|
|
|
|
|
| |
The logic here was inverted. Reverting the commit to avoid confusion
when examining the commit history.
This reverts commit b3eacd64fb36724ed6c5d2d24a81211a161abef1.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On Linux, `pthread_setname_np` (or rather, the kernel) only allows for
thread names up to 16 bytes, including the terminating null byte.
This commit adds a note pointing this out in `createOSThread`, and fixes
up two instances where a thread name of more than 15 characters long was
used (in the RTS, and in a test-case).
Fixes: #22366
Fixes: https://gitlab.haskell.org/ghc/ghc/-/issues/22366
See: https://gitlab.haskell.org/ghc/ghc/-/issues/22366#note_460796
|
|
|
|
|
| |
See the brand new Note [Undefined symbols in the RTS] for additional
details.
|
|
|
|
| |
There was previously a comment claiming that the MUT_VAR closure type
had the layout of StgMutArrPtrs.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The bytecode interpreter only has branching instructions for
word-sized values. These are used for pattern matching.
Branching instructions for other types (e.g. Int16# or Word8#)
weren't needed, since unoptimized Core or STG never requires
branching on types like this.
It's now possible for optimized STG to reach the bytecode
generator (e.g. fat interface files or certain compiler flag
combinations), which requires dealing with various sized
literals in branches.
This patch improves support for generating bytecode from
optimized STG by adding the following new bytecode
instructions:
TESTLT_I64
TESTEQ_I64
TESTLT_I32
TESTEQ_I32
TESTLT_I16
TESTEQ_I16
TESTLT_I8
TESTEQ_I8
TESTLT_W64
TESTEQ_W64
TESTLT_W32
TESTEQ_W32
TESTLT_W16
TESTEQ_W16
TESTLT_W8
TESTEQ_W8
Fixes #21945
|
|
|
|
| |
Since these may race with the allocator(s).
|
|
|
|
|
| |
We must use an acquire load to read the info table pointer since if we
find an indirection we must be certain that we see the indirectee.
|
|
|
|
|
| |
Relaxed load is fine here since we will take the lock before looking at
the list.
|
|
|
|
|
|
| |
This is a benign race on any sensible hard since these are byte
accesses. Nevertheless, atomic accesses are necessary to satisfy
TSAN.
|
|
|
|
| |
TSAN complains about this sort of thing.
|
|
|
|
|
|
|
| |
This avoids a lock inversion between the storage manager mutex and
the stable pointer table mutex by not dropping the SM_MUTEX in
nonmovingCollect. This requires quite a bit of rejiggering but it
does seem like a better strategy.
|
| |
|
|
|
|
|
|
| |
Mark a number of accesses to do with tracking of the status of the
concurrent collection thread as atomic. No interesting races here,
merely necessary to satisfy TSAN.
|
| |
|
|
|
|
|
|
|
| |
To ensure that we don't race with a mutator entering a new CAF we take
the SM mutex before touching static_flag. The other option here would be
to instead modify newCAF to use a CAS but the present approach is a bit
safer.
|
|
|
|
| |
Since it may have been mutated by a moving GC.
|
| |
|
|
|
|
|
| |
We must use an acquire-fence when marking to ensure that the indirectee
is visible.
|
|
|
|
|
| |
Previously we would attempt to clear pages which were marked as
read-only. Fix this.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A long time ago we would rely on substitutions from the configure script
to inject paths of the include and library directories of libffi and
libdw. However, now these are instead handled inside Hadrian when
calling Cabal's `configure` (see the uses of `cabalExtraDirs` in
Hadrian's `Settings.Packages.packageArgs`).
While the occurrences in the cabal file were redundant, they did no
harm. However, since b5c714545abc5f75a1ffdcc39b4bfdc7cd5e64b4 they have
no longer been interpolated. @mpickering noticed the suspicious
uninterpolated occurrence of `@FFIIncludeDir@` in #22595,
prompting this commit to finally remove them.
|
|
|
|
|
| |
Workaround for #22255 which showed how treating large/compact regions
as pinned could cause segfaults.
|
|
|
|
| |
error (#22617)
|
|
|
|
|
|
|
|
| |
As noted in #22538, previously some GCC versions warned that various
locals in Libdw.c may be used uninitialized. Although this wasn't
strictly true (since they were initialized in an inline assembler block)
we fix this by providing explicit empty initializers.
Fixes #22538
|
|
|
|
|
|
|
| |
0e274c39bf836d5bb846f5fa08649c75f85326ac added an assertion in
`dirty_MUT_VAR` checking that the MUT_VAR being dirtied was clean.
However, this isn't necessarily the case since another thread may have
raced us to dirty the object.
|
| |
|
| |
|
|
|
|
| |
This is a rather simplistic way of solving #17289.
|
| |
|
| |
|
| |
|
|
|
|
| |
Relaxed ordering is fine here since the later CAS implies a release.
|
| |
|
| |
|
|
|
|
|
| |
This makes it easier to ensure that it is accessed using the necessary
atomic operations.
|
|
|
|
|
|
| |
As noted in #22447, the existence of the pthread-based ITimer
implementation means that we cannot assume that the program is
single-threaded.
|
|
|
|
| |
Since these are modified by the timer handler.
|
|
|
|
|
|
| |
And ensure accesses to n_capabilities are atomic (although with relaxed
ordering). This is necessary as RTS API callers may concurrently call
into the RTS without holding a capability.
|
|
|
|
|
| |
Also introduce MUT_FIELD marker in Closures.h to document mutable
fields.
|
|
|
|
| |
See #22421.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
This doesn't change behavior but makes the code a bit easier to follow.
|
|
|
|
|
| |
This is in general unsafe as they may be clobbered if they are mapped to
caller-saved machine registers. See Note [Register parameter passing].
|
|
|
|
|
|
| |
This introduces a new Cmm pass which instruments the program with
ThreadSanitizer annotations, allowing full tracking of mutator memory
accesses via TSAN.
|
| |
|
| |
|