diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2018-05-25 10:11:49 +0200 |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2018-05-25 11:17:39 +0000 |
commit | 4d9e329df599da96927d559931eabd0062bcf147 (patch) | |
tree | a6593cabcc18c4ad0456db8f875ca2a4db6db0ea /src/3rdparty | |
parent | f783aa97c3d8d9df74212b4350203182d2d167f1 (diff) |
android-clang: Fix crash in V4 JIT
We would pick an incompatible code path when compiling with clang,
using an memfd when creating the memory that we later tried to
make executable. This differed from how the memory was made in
the canAllocateExecutableMemory() function, thus the problem was
not detected ahead of time and we crashed in ExecutableAllocator.h
when reaching a Q_UNREACHABLE.
Amends 847dfa77e9b5d93f7dbb6b78665f1f86d4431a02.
The fix is to simply disable this code on Android.
Task-number: QTBUG-67464
Change-Id: Ibab753995d89d35d31340702ab4a3c4756adc332
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/3rdparty')
-rw-r--r-- | src/3rdparty/masm/wtf/OSAllocatorPosix.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/3rdparty/masm/wtf/OSAllocatorPosix.cpp b/src/3rdparty/masm/wtf/OSAllocatorPosix.cpp index 17a5150de5..cc39364007 100644 --- a/src/3rdparty/masm/wtf/OSAllocatorPosix.cpp +++ b/src/3rdparty/masm/wtf/OSAllocatorPosix.cpp @@ -44,6 +44,10 @@ #endif #endif +#if defined(__ANDROID__) && defined(SYS_memfd_create) +# undef SYS_memfd_create +#endif + namespace WTF { #ifdef SYS_memfd_create @@ -149,7 +153,7 @@ void* OSAllocator::reserveAndCommit(size_t bytes, Usage usage, bool writable, bo #if OS(DARWIN) int fd = usage; -#elif OS(LINUX) && defined(SYS_memfd_create) +#elif OS(LINUX) int fd = memfdForUsage(bytes, usage); if (fd != -1) flags &= ~MAP_ANON; |