aboutsummaryrefslogtreecommitdiffstats
path: root/src/3rdparty/masm/wtf
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/masm/wtf')
-rw-r--r--src/3rdparty/masm/wtf/OSAllocator.h4
-rw-r--r--src/3rdparty/masm/wtf/OSAllocatorIntegrity.cpp12
-rw-r--r--src/3rdparty/masm/wtf/Platform.h5
3 files changed, 21 insertions, 0 deletions
diff --git a/src/3rdparty/masm/wtf/OSAllocator.h b/src/3rdparty/masm/wtf/OSAllocator.h
index 933b3cda0a..366dd73993 100644
--- a/src/3rdparty/masm/wtf/OSAllocator.h
+++ b/src/3rdparty/masm/wtf/OSAllocator.h
@@ -73,6 +73,10 @@ public:
static T* reallocateCommitted(T*, size_t oldSize, size_t newSize, Usage = UnknownUsage, bool writable = true, bool executable = false);
static bool canAllocateExecutableMemory();
+
+#if defined(Q_OS_INTEGRITY)
+ static void setMemoryAttributes(void* addr, bool writable, bool executable);
+#endif
};
inline void* OSAllocator::reserveAndCommit(size_t reserveSize, size_t commitSize, Usage usage, bool writable, bool executable)
diff --git a/src/3rdparty/masm/wtf/OSAllocatorIntegrity.cpp b/src/3rdparty/masm/wtf/OSAllocatorIntegrity.cpp
index 451ca147d1..7addf9e5c2 100644
--- a/src/3rdparty/masm/wtf/OSAllocatorIntegrity.cpp
+++ b/src/3rdparty/masm/wtf/OSAllocatorIntegrity.cpp
@@ -123,6 +123,12 @@ Error setAttributes(MemoryRegion mr, bool writable, bool executable)
return SetMemoryRegionAttributes(mr, attributes);
}
+void OSAllocator::setMemoryAttributes(void* addr, bool writable, bool executable)
+{
+ const MRPair* pair = memoryRegionsContainer.getMRPair((Address)addr);
+ CheckSuccess(setAttributes(pair->vmr, writable, executable));
+}
+
void* OSAllocator::reserveUncommitted(size_t bytes, Usage usage, bool writable, bool executable)
{
MemoryRegion VMR;
@@ -229,4 +235,10 @@ void OSAllocator::releaseDecommitted(void* address, size_t bytes)
memoryRegionsContainer.deleteMRPair(pair);
}
}
+
+bool OSAllocator::canAllocateExecutableMemory()
+{
+ return true;
+}
+
} // namespace WTF
diff --git a/src/3rdparty/masm/wtf/Platform.h b/src/3rdparty/masm/wtf/Platform.h
index a81ef4589a..edb688923b 100644
--- a/src/3rdparty/masm/wtf/Platform.h
+++ b/src/3rdparty/masm/wtf/Platform.h
@@ -172,6 +172,11 @@
#define WTF_CPU_ARM64 1
#endif
+/* CPU(ARM64) - INTEGRITY */
+#if (defined(__ARM64__))
+#define WTF_CPU_ARM64 1
+#endif
+
/* CPU(ARM) - ARM, any version*/
#define WTF_ARM_ARCH_AT_LEAST(N) (CPU(ARM) && WTF_ARM_ARCH_VERSION >= N)