summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/ios/qioseventdispatcher.mm
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/ios/qioseventdispatcher.mm')
-rw-r--r--src/plugins/platforms/ios/qioseventdispatcher.mm4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/platforms/ios/qioseventdispatcher.mm b/src/plugins/platforms/ios/qioseventdispatcher.mm
index 6148338000..3de7c996f5 100644
--- a/src/plugins/platforms/ios/qioseventdispatcher.mm
+++ b/src/plugins/platforms/ios/qioseventdispatcher.mm
@@ -148,8 +148,10 @@ namespace
// Add memory guard at the end of the reserved stack, so that any stack
// overflow during the user's main will trigger an exception at that point,
// and not when we return and find that the current stack has been smashed.
+ // We allow read though, so that garbage-collection can pass through our
+ // stack in its mark phase without triggering access violations.
uintptr_t memoryGuardStart = qAlignUp(memoryStart, kPageSize);
- if (mprotect((void*)memoryGuardStart, kPageSize, PROT_NONE))
+ if (mprotect((void*)memoryGuardStart, kPageSize, PROT_READ))
qWarning() << "Failed to add memory guard:" << strerror(errno);
// We don't consider the memory guard part of the usable stack space