projects
/
platform
/
upstream
/
dotnet
/
runtime.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6c47cf8
)
Qualify `sorted_table` allocation with `nothrow` (#57467)
author
Michal Strehovský
<MichalStrehovsky@users.noreply.github.com>
Mon, 16 Aug 2021 20:49:28 +0000
(
05:49
+0900)
committer
GitHub
<noreply@github.com>
Mon, 16 Aug 2021 20:49:28 +0000
(
05:49
+0900)
It's clearly what we intended, given the following line.
src/coreclr/gc/gc.cpp
patch
|
blob
|
history
diff --git
a/src/coreclr/gc/gc.cpp
b/src/coreclr/gc/gc.cpp
index
36d7359
..
9aada04
100644
(file)
--- 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;