Duncan Coutts pushed to branch wip/dcoutts/issue-26717 at Glasgow Haskell Compiler / GHC
Commits:
-
40f43b89
by Duncan Coutts at 2026-05-06T14:45:56+01:00
1 changed file:
Changes:
| 1 | +section: rts
|
|
| 2 | +synopsis: Fix a use-after-free bug in the poll I/O manager
|
|
| 3 | +issues: #26716 #26717
|
|
| 4 | +mrs: !15519
|
|
| 5 | +description: {
|
|
| 6 | + Experimental work on ASAN support for GHC (MR !15168) revealed a
|
|
| 7 | + use-after-free bug when using the combination of the new poll I/O
|
|
| 8 | + manager with the compacting GC. The ultimate cause is that a TSO's
|
|
| 9 | + `block_info` (used by I/O managers and many other parts of the RTS)
|
|
| 10 | + is sometimes a GC pointer and sometimes not, but without a consistent
|
|
| 11 | + and easy-to-follow rule for when this is the case. The solution has
|
|
| 12 | + been to clean up and enforce that the TSO's `why_blocked` enumeration
|
|
| 13 | + is a proper tag for the `block_info`, and to use an encoding that
|
|
| 14 | + determines precisely when the `block_info` is a pointer or not.
|
|
| 15 | +} |