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:
3977fe9
)
Add assert to GCHeap::ValidateObjectMember (dotnet/coreclr#10591)
author
Steve MacLean
<sdmaclea@qti.qualcomm.com>
Fri, 31 Mar 2017 02:06:23 +0000
(22:06 -0400)
committer
Jan Kotas
<jkotas@microsoft.com>
Fri, 31 Mar 2017 02:06:23 +0000
(19:06 -0700)
In presence of a corrupt heap, objects can contain
null method table. Add assertion to prevent segfault
in checked/debug builds.
Commit migrated from https://github.com/dotnet/coreclr/commit/
07fa3a32336d2da5d2bf652ad01d33f18b2debaf
src/coreclr/src/gc/gc.cpp
patch
|
blob
|
history
diff --git
a/src/coreclr/src/gc/gc.cpp
b/src/coreclr/src/gc/gc.cpp
index
9435357
..
65c6742
100644
(file)
--- a/
src/coreclr/src/gc/gc.cpp
+++ b/
src/coreclr/src/gc/gc.cpp
@@
-33501,6
+33501,7
@@
void GCHeap::ValidateObjectMember (Object* obj)
{
dprintf (3, ("VOM: m: %Ix obj %Ix", (size_t)child_o, o));
MethodTable *pMT = method_table (child_o);
+ assert(pMT);
if (!pMT->SanityCheck()) {
dprintf (3, ("Bad member of %Ix %Ix",
(size_t)oo, (size_t)child_o));