diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2020-12-16 16:45:36 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2020-12-17 10:11:31 +0100 |
commit | 86a595b126bc6794380dc00af80ec4802f7d058c (patch) | |
tree | 7409afe1f0f42c33b65f2316dfc786825fc28934 /src/qml/jsruntime/qv4functiontable_win64.cpp | |
parent | d99d192884608408759492bd656ab99a2f4f23ed (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
Pick-to: 5.15 6.0
Change-Id: I2fb8fb0e1dcc3450b036924463dc1b40d2020c46
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4functiontable_win64.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4functiontable_win64.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4functiontable_win64.cpp b/src/qml/jsruntime/qv4functiontable_win64.cpp index fc13dc2602..0cb98641cd 100644 --- a/src/qml/jsruntime/qv4functiontable_win64.cpp +++ b/src/qml/jsruntime/qv4functiontable_win64.cpp @@ -106,7 +106,7 @@ struct ExceptionHandlerRecord void generateFunctionTable(Function *, JSC::MacroAssemblerCodeRef *codeRef) { ExceptionHandlerRecord *record = reinterpret_cast<ExceptionHandlerRecord *>( - codeRef->executableMemory()->exceptionHandler()); + codeRef->executableMemory()->exceptionHandlerStart()); record->info.Version = 1; record->info.Flags = 0; @@ -136,7 +136,7 @@ void generateFunctionTable(Function *, JSC::MacroAssemblerCodeRef *codeRef) void destroyFunctionTable(Function *, JSC::MacroAssemblerCodeRef *codeRef) { ExceptionHandlerRecord *record = reinterpret_cast<ExceptionHandlerRecord *>( - codeRef->executableMemory()->exceptionHandler()); + codeRef->executableMemory()->exceptionHandlerStart()); if (!RtlDeleteFunctionTable(&record->handler)) { const unsigned int errorCode = GetLastError(); qWarning() << "Failed to remove win64 unwind hook. Error code:" << errorCode; |