diff options
author | Janne Koskinen <janne.p.koskinen@qt.io> | 2018-09-28 12:15:58 +0200 |
---|---|---|
committer | Janne Koskinen <janne.p.koskinen@qt.io> | 2018-09-28 13:34:08 +0000 |
commit | 039a28468a1812b8f0662aba62c173e572899841 (patch) | |
tree | 72580d61c703268fd8f3acb4c5d316dc4a69fb06 /src/3rdparty/masm/stubs/ExecutableAllocator.h | |
parent | 4441cefd76446a9e464665bd7fb0666f0e2495c3 (diff) |
Fix Integrity OS allocator memory attributes
Correctly set the attributes when allocation is extending to more
than one page. Code spanning multiple pages can now be executed.
Task-number: QTBUG-70350
Change-Id: I02af1add274f80befda5662d9670bfd2052c3c52
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/3rdparty/masm/stubs/ExecutableAllocator.h')
-rw-r--r-- | src/3rdparty/masm/stubs/ExecutableAllocator.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/3rdparty/masm/stubs/ExecutableAllocator.h b/src/3rdparty/masm/stubs/ExecutableAllocator.h index 1ab28588fb..16b17bd3cd 100644 --- a/src/3rdparty/masm/stubs/ExecutableAllocator.h +++ b/src/3rdparty/masm/stubs/ExecutableAllocator.h @@ -123,7 +123,7 @@ struct ExecutableAllocator { } # endif # elif OS(INTEGRITY) - OSAllocator::setMemoryAttributes(addr, /*writable*/ true, /*executable*/ false); + OSAllocator::setMemoryAttributes(addr, size, /*writable*/ true, /*executable*/ false); # else int mode = PROT_READ | PROT_WRITE; if (mprotect(addr, size, mode) != 0) { @@ -159,7 +159,7 @@ struct ExecutableAllocator { } # endif # elif OS(INTEGRITY) - OSAllocator::setMemoryAttributes(addr, /*writable*/ false, /*executable*/ true); + OSAllocator::setMemoryAttributes(addr, size, /*writable*/ false, /*executable*/ true); # else int mode = PROT_READ | PROT_EXEC; if (mprotect(addr, size, mode) != 0) { |