mirror of https://github.com/c-ares/c-ares.git
Rework WinAFD event code (#811)
We've had reports of user-after-free type crashes in Windows cleanup code for the Event Thread. In evaluating the code, it appeared there were some memory leaks on per-connection handles that may have remained open during shutdown, while trying to resolve that it became apparent the methodology chosen may not have been the right one for interfacing with the Windows AFD system as stability issues were seen during this debugging process. Since this system is completely undocumented, there was no clear resolution path other than to switch to the *other* methodology which involves directly opening `\Device\Afd`, rather than spawning a "peer socket" to use to queue AFD operations. The original methodology chosen more closely resembled what is employed by [libuv](https://github.com/libuv/libuv) and given its widespread use was the reason it was used. The new methodology more closely resembles [wepoll](https://github.com/piscisaureus/wepoll). Its not clear if there are any scalability or performance advantages or disadvantages for either method. They both seem like different ways to do the same thing, but this current way does seem more stable. Fixes #798 Fix By: Brad House (@bradh352)v1.29
parent
9582812952
commit
76d09afd1d
6 changed files with 673 additions and 242 deletions
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue