After trying for quite a while to find the source of some hard-to-reproduce fuzz bugs, this PR seems the best fix. While I was unable to find the exact cause, commit 8b30a36 did indeed trigger threadsanitizer, so it seemed the semaphores sometimes work in ways I do not understand.
Mutexes, while needing more syscalls, are easier to comprehend. While I haven't yet run local fuzzing for long enough to be able to assume the bug has been fixed, I am creating this PR to run CI and CI-Fuzz.
After trying for quite a while to find the source of some hard-to-reproduce fuzz bugs, this PR seems the best fix. While I was unable to find the exact cause, commit 8b30a36 did indeed trigger threadsanitizer, so it seemed the semaphores sometimes work in ways I do not understand.
Mutexes, while needing more syscalls, are easier to comprehend. While I haven't yet run local fuzzing for long enough to be able to assume the bug has been fixed, I am creating this PR to run CI and CI-Fuzz.