address_space: Fix order of operations (#4288)

This commit is contained in:
squidbus 2026-04-19 14:26:14 -07:00 committed by GitHub
parent 3400bdf4b1
commit 90b75eadec
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -717,7 +717,7 @@ struct AddressSpace::Impl {
int fd = -1) {
m_free_regions.subtract({virtual_addr, virtual_addr + size});
#ifdef __APPLE__
if (prot & PROT_EXEC != 0) {
if ((prot & PROT_EXEC) != 0) {
ASSERT_MSG(fd == -1, "Requested execute permissions for file mapping");
phys_addr = -1;
}