aboutsummaryrefslogtreecommitdiffstats
path: root/src/3rdparty/masm/stubs
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2020-12-16 16:45:36 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2020-12-18 16:35:58 +0000
commit68c3a6128469c435810e319411cceb72992ac6b5 (patch)
tree997f0a1d72032185b4a98585d6838911c826f944 /src/3rdparty/masm/stubs
parent5b69e17405df7d903dd7da9b506cbba74de14147 (diff)
JIT: When making memory writable, include the exception handler
makeWritable() rounds the memory down to the next page boundary. Usually we include the exception handler this way, unless the offset from the page boundary is less than the exception handler size. Make it explicit that we do want the exception handler to be writable, too. Fixes: QTBUG-89513 Change-Id: I2fb8fb0e1dcc3450b036924463dc1b40d2020c46 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 86a595b126bc6794380dc00af80ec4802f7d058c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/3rdparty/masm/stubs')
-rw-r--r--src/3rdparty/masm/stubs/ExecutableAllocator.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/3rdparty/masm/stubs/ExecutableAllocator.h b/src/3rdparty/masm/stubs/ExecutableAllocator.h
index a439c53827..f984704023 100644
--- a/src/3rdparty/masm/stubs/ExecutableAllocator.h
+++ b/src/3rdparty/masm/stubs/ExecutableAllocator.h
@@ -82,9 +82,14 @@ struct ExecutableMemoryHandle : public RefCounted<ExecutableMemoryHandle> {
inline bool isManaged() const { return true; }
- void *exceptionHandler() { return m_allocation->exceptionHandler(); }
- void *start() { return m_allocation->start(); }
- size_t sizeInBytes() { return m_size; }
+ void *memoryStart() { return m_allocation->memoryStart(); }
+ size_t memorySize() { return m_allocation->memorySize(); }
+
+ void *exceptionHandlerStart() { return m_allocation->exceptionHandlerStart(); }
+ size_t exceptionHandlerSize() { return m_allocation->exceptionHandlerSize(); }
+
+ void *codeStart() { return m_allocation->codeStart(); }
+ size_t codeSize() { return m_size; }
QV4::ExecutableAllocator::ChunkOfPages *chunk() const
{ return m_allocator->chunkForAllocation(m_allocation); }