mirror of
https://github.com/FEX-Emu/FEX.git
synced 2024-12-16 02:17:20 +00:00
Allocator: Early return if past the end of the allocation range
Fixes a bug where it would eventually hit the stack region and remap the range as RW even for ranges that don't overlap the stack.
This commit is contained in:
parent
66feea9e8e
commit
3d671cba10
@ -297,6 +297,12 @@ namespace FEXCore::Allocator {
|
||||
if (c == ' ') {
|
||||
STEAL_LOG("[%d] ParseEnd; RegionBegin: %016lX RegionEnd: %016lX\n", __LINE__, RegionBegin, RegionEnd);
|
||||
|
||||
if (RegionEnd >= End) {
|
||||
// Early return if we are completely beyond the allocation space.
|
||||
close(MapsFD);
|
||||
return Regions;
|
||||
}
|
||||
|
||||
State = ScanEnd;
|
||||
|
||||
// If the previous map's ending and the region we just parsed overlap the stack then we need to save the stack mapping.
|
||||
|
Loading…
Reference in New Issue
Block a user