Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FEXLoader: Allocate first 4GB of the 64-bit address space
Spurred on by FEX-Emu#3421. To ensure that applications don't take advantage of small address wrap around, allocate the first 4GB in the 64-bit space. Some context. Linux always reserves the first 16KB of virtual address space (unless you tinker with some settings which nobody should do). Example of 32-bit code: lea eax, [0xffff_0000] mov ebx, [eax + 0x1_0000] The address calculated by the mov will wrap around to 0x0 which will result in SIGSEGV. If FEX messes up zero extensions then it would try to access 0x1_0000_0000 instead. This could result in a 32-bit application potentially accessing some FEX memory instead of crashing. Add this safety net which will still SIGSEGV and we will be able to see the crash.
- Loading branch information