6 Jun
2023
6 Jun
'23
8:04 p.m.
On Tue Jun 6 19:05:59 2023 +0000, Connor McAdams wrote:
Good catch. Yeah, that makes sense. This could use some more work generally the more I think about it. In `uia_raise_event` I hold a reference to the `struct uia_event_map_entry`, which could be freed behind my back if someone called UiaRemoveEvent on the last event in the event list. Holding the critical section for the entirety of `uia_raise_event` sounded plausible, but that'd cause the event release to potentially hang if we hold the last event reference.
I might add something like a reference count to the event map entry, not sure. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/2988#note_34823