Bug 1856663 - Add more chunks for Android mochitest-plain. r=jmaher,taskgraph-reviewe...
[gecko.git] / build / build-clang / win64-ret-null-on-commitment-limit_clang_14.patch
blob23b001bc6878649843fa176dae0bfc0d6e89c623
1 diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_win.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_win.cpp
2 index 7c84cdc22ce4..e13fff03489e 100644
3 --- a/compiler-rt/lib/sanitizer_common/sanitizer_win.cpp
4 +++ b/compiler-rt/lib/sanitizer_common/sanitizer_win.cpp
5 @@ -157,7 +157,8 @@ void UnmapOrDie(void *addr, uptr size) {
6 static void *ReturnNullptrOnOOMOrDie(uptr size, const char *mem_type,
7 const char *mmap_type) {
8 error_t last_error = GetLastError();
9 - if (last_error == ERROR_NOT_ENOUGH_MEMORY)
10 + if (last_error == ERROR_NOT_ENOUGH_MEMORY ||
11 + last_error == ERROR_COMMITMENT_LIMIT)
12 return nullptr;
13 ReportMmapFailureAndDie(size, mem_type, mmap_type, last_error);