summaryrefslogtreecommitdiff
path: root/utils/lndir
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2022-08-18 12:48:27 -0400
committerBen Gamari <ben@smart-cactus.org>2022-08-19 19:10:26 -0400
commitc895c44911ec44b9506cbe97555753ac402d6acf (patch)
tree453c8d8346707d5c27d424a7fbf0bb6971ca1e89 /utils/lndir
parente293029db0d60852908feaf2312794849194b08c (diff)
downloadhaskell-wip/T22038.tar.gz
compiler: Rework handling of mutator abortingwip/T22038
Previously `-dtag-inference-checks`, `-dcheck-prim-bounds`, and `-falignment-sanitization` all aborted by calling `barf` from the mutator. However, this can lead to deadlocks in the threaded RTS. For instance, in the case of `-dcheck-prim-bounds` the following can happen 1. the mutator takes a capability and begins execution 2. the bounds check fails, calling `barf` 3. `barf` calls `rtsFatalInternalErrorFn`, which in turn calls `endEventLogging` 4. `endEventLogging` calls `flushEventLog`, which it turn initiates a sync to request that all capabilities flush their local event logs 5. we deadlock as the the capability held by the crashing mutator can never join the sync To avoid this we now have a more principled means of aborting: we return to the scheduler setting the thread's return value to ThreadAborting. The scheduler will see this and call `barf`. Fixes #22038.
Diffstat (limited to 'utils/lndir')
0 files changed, 0 insertions, 0 deletions