diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2022-11-03 13:25:18 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-11-09 07:20:20 +0000 |
commit | 7901a44a0efa8ef6b779bd5366ac87973015f899 (patch) | |
tree | 02c172cf363bfb6f6c203e2ffec5d3de68e66c30 | |
parent | 524da9ca5f2bde11c7879e8fb479700e4bbe3734 (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.
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>
(cherry picked from commit 2034e10c9378364ecc7aa1af27505562d86688de)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | src/3rdparty/masm/wtf/OSAllocatorPosix.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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) |