]> git.ipfire.org Git - thirdparty/curl.git/commit
sockfilt: fix race-condition of waiting threads and event handling
authorMarc Hoersken <info@marc-hoersken.de>
Thu, 2 Apr 2020 16:41:11 +0000 (18:41 +0200)
committerMarc Hoersken <info@marc-hoersken.de>
Fri, 3 Apr 2020 10:37:39 +0000 (12:37 +0200)
commit9657ecb15b387ce86421af738045ede8a72aab13
tree954f5426b86c3f45d15b7a70f0f410c0b9139424
parent4506607b44ca15e6de0ad87cf205b0dd3c0a784c
sockfilt: fix race-condition of waiting threads and event handling

Fix race-condition of waiting threads finishing while events are
already being processed which lead to invalid or skipped events.

Use mutex to check for one event at a time or do post-processing.
In addition to mutex-based locking use specific event as signal.

Closes #5156
tests/server/sockfilt.c