summaryrefslogtreecommitdiff
path: root/packaging/0007-FIX-fix-No.1-missing-GetImplementedMDs.patch
diff options
context:
space:
mode:
Diffstat (limited to 'packaging/0007-FIX-fix-No.1-missing-GetImplementedMDs.patch')
-rw-r--r--packaging/0007-FIX-fix-No.1-missing-GetImplementedMDs.patch59
1 files changed, 59 insertions, 0 deletions
diff --git a/packaging/0007-FIX-fix-No.1-missing-GetImplementedMDs.patch b/packaging/0007-FIX-fix-No.1-missing-GetImplementedMDs.patch
new file mode 100644
index 0000000..8ea8b47
--- /dev/null
+++ b/packaging/0007-FIX-fix-No.1-missing-GetImplementedMDs.patch
@@ -0,0 +1,59 @@
+From 959e95869f6897afd5c3d9ff25c07318170bfaec Mon Sep 17 00:00:00 2001
+From: Gleb Balykov <g.balykov@samsung.com>
+Date: Wed, 11 Apr 2018 16:10:58 +0300
+Subject: [PATCH 07/32] FIX: fix No.1, missing GetImplementedMDs()
+
+---
+ src/vm/methodtablebuilder.cpp | 6 ++++--
+ src/vm/securitymeta.cpp | 11 +++++++++--
+ 2 files changed, 13 insertions(+), 4 deletions(-)
+
+diff --git a/src/vm/methodtablebuilder.cpp b/src/vm/methodtablebuilder.cpp
+index df31c4a..3162f7c 100644
+--- a/src/vm/methodtablebuilder.cpp
++++ b/src/vm/methodtablebuilder.cpp
+@@ -11909,8 +11909,10 @@ void MethodTableBuilder::VerifyInheritanceSecurity()
+ MethodImpl *pMethodImpl = pMD->GetMethodImpl();
+ for (DWORD iCurImpl = 0; iCurImpl < pMethodImpl->GetSize(); iCurImpl++)
+ {
+- MethodDesc *pDeclMD = pMethodImpl->GetImplementedMDs()[iCurImpl];
+- _ASSERTE(pDeclMD != NULL);
++ RelativePointer<MethodDesc *> *pRelPtrForSlot = pMethodImpl->GetImpMDsNonNull();
++ TADDR base = dac_cast<TADDR>(pRelPtrForSlot) + iCurImpl * sizeof(RelativePointer<MethodDesc *>);
++ MethodDesc *pDeclMD = RelativePointer<MethodDesc *>::GetValueAtPtr(base);
++
+ // We deal with interfaces below, so don't duplicate work
+ if (!pDeclMD->IsInterface())
+ {
+diff --git a/src/vm/securitymeta.cpp b/src/vm/securitymeta.cpp
+index 1374d9f..3f06f05 100644
+--- a/src/vm/securitymeta.cpp
++++ b/src/vm/securitymeta.cpp
+@@ -771,7 +771,10 @@ MethodDesc *MethodSecurityDescriptor::MethodImplementationIterator::Current()
+ _ASSERTE(m_fMethodImplIterationBegun);
+ _ASSERTE(m_pMD->IsMethodImpl());
+ _ASSERTE(m_iMethodImplIndex < m_pMD->GetMethodImpl()->GetSize());
+- return m_pMD->GetMethodImpl()->GetImplementedMDs()[m_iMethodImplIndex];
++
++ RelativePointer<MethodDesc *> *pRelPtrForSlot = m_pMD->GetMethodImpl()->GetImpMDsNonNull();
++ TADDR base = dac_cast<TADDR>(pRelPtrForSlot) + m_iMethodImplIndex * sizeof(RelativePointer<MethodDesc *>);
++ return RelativePointer<MethodDesc *>::GetValueAtPtr(base);
+ }
+ }
+
+@@ -856,7 +859,11 @@ void MethodSecurityDescriptor::MethodImplementationIterator::Next()
+ if (m_iMethodImplIndex < pMethodImpl->GetSize())
+ {
+ // Skip over the interface MethodImpls since we already processed those
+- fFoundImpl = !pMethodImpl->GetImplementedMDs()[m_iMethodImplIndex]->IsInterface();
++ RelativePointer<MethodDesc *> *pRelPtrForSlot = pMethodImpl->GetImpMDsNonNull();
++ TADDR base = dac_cast<TADDR>(pRelPtrForSlot) + m_iMethodImplIndex * sizeof(RelativePointer<MethodDesc *>);
++ MethodDesc *pDeclMD = RelativePointer<MethodDesc *>::GetValueAtPtr(base);
++
++ fFoundImpl = !pDeclMD->IsInterface();
+ }
+ }
+ }
+--
+2.7.4
+