summaryrefslogtreecommitdiff
path: root/libraries/base/tests/hGetBuf002.hs
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2022-01-13 13:46:36 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-01-18 16:14:01 -0500
commit5a6efd218734dbb5c1350531680cd3f4177690f1 (patch)
tree6a989bc08406afba34acb3657edb49981420012c /libraries/base/tests/hGetBuf002.hs
parent2d205154d3fd565c7f88e07c4c307f48c5ade902 (diff)
downloadhaskell-5a6efd218734dbb5c1350531680cd3f4177690f1.tar.gz
rts/winio: Fix #18382
Here we refactor WinIO's IO completion scheme, squashing a memory leak and fixing #18382. To fix #18382 we drop the special thread status introduced for IoPort blocking, BlockedOnIoCompletion, as well as drop the non-threaded RTS's special dead-lock detection logic (which is redundant to the GC's deadlock detection logic), as proposed in #20947. Previously WinIO relied on foreign import ccall "wrapper" to create an adjustor thunk which can be attached to the OVERLAPPED structure passed to the operating system. It would then use foreign import ccall "dynamic" to back out the original continuation from the adjustor. This roundtrip is significantly more expensive than the alternative, using a StablePtr. Furthermore, the implementation let the adjustor leak, meaning that every IO request would leak a page of memory. Fixes T18382.
Diffstat (limited to 'libraries/base/tests/hGetBuf002.hs')
0 files changed, 0 insertions, 0 deletions