projects
/
platform
/
upstream
/
coreclr.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
216d972
)
Add assert to GCHeap::ValidateObjectMember (#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.
src/gc/gc.cpp
patch
|
blob
|
history
diff --git
a/src/gc/gc.cpp
b/src/gc/gc.cpp
index
9435357
..
65c6742
100644
(file)
--- a/
src/gc/gc.cpp
+++ b/
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));