aboutsummaryrefslogtreecommitdiffstats
path: root/src/3rdparty
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2022-11-03 13:25:18 +0100
committerUlf Hermann <ulf.hermann@qt.io>2022-11-08 14:03:52 +0000
commit2034e10c9378364ecc7aa1af27505562d86688de (patch)
tree049a612d1cc8aa00b46bbd04b53100c0db15bfeb /src/3rdparty
parent56371883fc27322b6193d153e5d9614bdc890e52 (diff)
Do not crash if madvise() fails on MADV_WILLNEED
MADV_WILLNEED is only advisory. The kernel may ignore it anyway. Any subsequent access to the pages in question will trigger them to be re-populated. Pick-to: 6.4 6.2 5.15 Fixes: QTBUG-107774 Change-Id: I8d70003502fdeb3e53c169b28ea6826801d47c74 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/3rdparty')
-rw-r--r--src/3rdparty/masm/wtf/OSAllocatorPosix.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/3rdparty/masm/wtf/OSAllocatorPosix.cpp b/src/3rdparty/masm/wtf/OSAllocatorPosix.cpp
index 8ea6d7a3c2..b61782ff82 100644
--- a/src/3rdparty/masm/wtf/OSAllocatorPosix.cpp
+++ b/src/3rdparty/masm/wtf/OSAllocatorPosix.cpp
@@ -236,7 +236,7 @@ void OSAllocator::commit(void* address, size_t bytes, bool writable, bool execut
while (madvise(address, bytes, MADV_WILLNEED)) {
if (errno != EAGAIN)
- CRASH();
+ break; // We don't have to crash here. MADV_WILLNEED is only advisory
}
#elif HAVE(MADV_FREE_REUSE)