From a1eefbb60f2e48b830f7b0b09d14802adda5e07f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Michal=20Strehovsk=C3=BD?= Date: Tue, 17 Aug 2021 05:49:28 +0900 Subject: [PATCH] Qualify `sorted_table` allocation with `nothrow` (#57467) It's clearly what we intended, given the following line. --- src/coreclr/gc/gc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreclr/gc/gc.cpp b/src/coreclr/gc/gc.cpp index 36d7359..9aada04 100644 --- a/src/coreclr/gc/gc.cpp +++ b/src/coreclr/gc/gc.cpp @@ -3299,7 +3299,7 @@ sorted_table::make_sorted_table () size_t size = 400; // allocate one more bk to store the older slot address. - sorted_table* res = (sorted_table*)new char [sizeof (sorted_table) + (size + 1) * sizeof (bk)]; + sorted_table* res = (sorted_table*)new (nothrow) char [sizeof (sorted_table) + (size + 1) * sizeof (bk)]; if (!res) return 0; res->size = size; -- 2.7.4