mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-04-25 22:13:13 +00:00
UserspaceEmulator: Honor the read/write/execute bits in mmap regions
UE will now correctly crash when accessing an mmap memory region in some way it's not supposed to be accessed.
This commit is contained in:
@@ -134,6 +134,12 @@ void SoftCPU::update_code_cache()
|
||||
auto* region = m_emulator.mmu().find_region({ cs(), eip() });
|
||||
ASSERT(region);
|
||||
|
||||
if (!region->is_executable()) {
|
||||
reportln("SoftCPU::update_code_cache: Non-readable region @ {:p}", eip());
|
||||
Emulator::the().dump_backtrace();
|
||||
TODO();
|
||||
}
|
||||
|
||||
m_cached_code_ptr = region->cacheable_ptr(eip() - region->base());
|
||||
m_cached_code_end = region->cacheable_ptr(region->size());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user