mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
b0933cde7b
Differential Revision: https://phabricator.services.mozilla.com/D152934
15 lines
736 B
Diff
15 lines
736 B
Diff
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_win.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_win.cpp
|
|
index 7c84cdc22ce4..e13fff03489e 100644
|
|
--- a/compiler-rt/lib/sanitizer_common/sanitizer_win.cpp
|
|
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_win.cpp
|
|
@@ -157,7 +157,8 @@ void UnmapOrDie(void *addr, uptr size) {
|
|
static void *ReturnNullptrOnOOMOrDie(uptr size, const char *mem_type,
|
|
const char *mmap_type) {
|
|
error_t last_error = GetLastError();
|
|
- if (last_error == ERROR_NOT_ENOUGH_MEMORY)
|
|
+ if (last_error == ERROR_NOT_ENOUGH_MEMORY ||
|
|
+ last_error == ERROR_COMMITMENT_LIMIT)
|
|
return nullptr;
|
|
ReportMmapFailureAndDie(size, mem_type, mmap_type, last_error);
|
|
}
|