mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-06 10:00:16 +02: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:
1 file changed
+6
@@ -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.
|
||||
|
||||
Reference in new issue
Block a user