From 7901a44a0efa8ef6b779bd5366ac87973015f899 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Thu, 3 Nov 2022 13:25:18 +0100 Subject: 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. Fixes: QTBUG-107774 Change-Id: I8d70003502fdeb3e53c169b28ea6826801d47c74 Reviewed-by: Qt CI Bot Reviewed-by: Fabian Kosmale (cherry picked from commit 2034e10c9378364ecc7aa1af27505562d86688de) Reviewed-by: Qt Cherry-pick Bot --- src/3rdparty/masm/wtf/OSAllocatorPosix.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3rdparty/masm/wtf/OSAllocatorPosix.cpp b/src/3rdparty/masm/wtf/OSAllocatorPosix.cpp index ec8e030b14..5b5c0b23bb 100644 --- a/src/3rdparty/masm/wtf/OSAllocatorPosix.cpp +++ b/src/3rdparty/masm/wtf/OSAllocatorPosix.cpp @@ -234,7 +234,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) -- cgit v1.2.3