mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-11 02:00:20 +02:00
For atomics that cross the 16-byte or 64-byte granularity, we need to lock a mutex to ensure strict emulation of split-locks. I took another look at these when I found out that Zen3 actually implements split-locks. Not sure which architecture actually added support for from them, but I wanted to ensure we have the ability to handle this. One thing that we can't handle in user-space is cross-process split-locks through shared memory. This requires a kernel SIGBUS handler to ensure a crashing/SIGKILL'd process doesn't lock all FEX processes in the system. This fixes a little split-lock abusing test that I have locally. It's a bit flakey so it isn't viable to run in CI. Considering it is explicitly testing a race problem.