1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 02:07:36 +00:00

UserspaceEmulator: Exclude special ranges from RangeAllocator

If we do not mark these ranges as reserved, RangeAllocator might later
give us addresses that overlap these, which then causes an assertion
failure in the SoftMMU.  This behavior led to recurring CI failures, and
sometimes made programs as simple as `/bin/true` fail.

Fixes "Crash 1" reported in #9104
This commit is contained in:
Daniel Bertalan 2021-12-24 22:54:26 +01:00 committed by Idan Horowitz
parent 979f300337
commit 4e1898df99
4 changed files with 20 additions and 3 deletions

View file

@ -22,6 +22,8 @@ public:
Optional<Range> allocate_randomized(size_t, size_t alignment);
void deallocate(const Range&);
void reserve_user_range(VirtualAddress, size_t);
void dump() const;
bool contains(const Range& range) const { return m_total_range.contains(range); }