mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-23 10:00:47 +02:00
Syscalls on x86-64 have a gap in the range of [335, 424) where these are defined as returning ENOSYS. This was a decision that the Linux developers decided on so x86-64 can realign its syscall numbers to a common infrastructure. Turns out that Proton Experimental was using a 32-bit only syscall to check if the feature existed and was listening for ENOSYS. They did this unconditionally on both x86 and x86-64 and it hits this gap section. This was introduced in Proton Experimental with commit 563fb0fbe2a49734aede87bedccb20daefc553b0 Message: "ntdll: Use clock_gettime64 if supported." This is technically valid since it falls within this gap section but leaves a bad taste. We can safely ignore this section so set it up with the UnimplementedSyscallSafe handler and also assign it to Syscall MAX so it can go down our fast handler. Not that this is likely to be a performance critical path. Fixes Proton Experimental crashing when run under FEX.