diff options
author | Moritz Angermann <moritz.angermann@gmail.com> | 2021-07-23 21:20:26 +0800 |
---|---|---|
committer | Zubin Duggal <zubin.duggal@gmail.com> | 2021-09-21 22:28:30 +0530 |
commit | d94243f71035c4129c90bd328ac71bb0dc7d88ac (patch) | |
tree | a8f0eb2e1a150e2bac63fecb7c437d569e64cc21 /rules/c-sources.mk | |
parent | 8cd962bf2575f9eceb0f723acee0124481ff3324 (diff) | |
download | haskell-d94243f71035c4129c90bd328ac71bb0dc7d88ac.tar.gz |
[rts] Untag bq->bh prior to reading the info table
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)
Diffstat (limited to 'rules/c-sources.mk')
0 files changed, 0 insertions, 0 deletions