Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Strehovský <michals@microsoft.com>2015-11-06 22:05:32 +0300
committerMichal Strehovský <michals@microsoft.com>2015-11-06 22:05:32 +0300
commitd92ccdd4338d8894b697db95369d5169925b3f16 (patch)
tree94bf0cecb588ec679d9dbd55a9ec018fbd00230c /src/JitInterface
parent7f36652397dabc6e4de27269f8ea9bf5d734ecb7 (diff)
Fill CORINFO_EE_INFO with bogus data on debug
This will ease debugging when JIT generates code that references this.
Diffstat (limited to 'src/JitInterface')
-rw-r--r--src/JitInterface/src/CorInfoImpl.cs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/JitInterface/src/CorInfoImpl.cs b/src/JitInterface/src/CorInfoImpl.cs
index 3ef4f1e61..6831c9d39 100644
--- a/src/JitInterface/src/CorInfoImpl.cs
+++ b/src/JitInterface/src/CorInfoImpl.cs
@@ -1294,6 +1294,13 @@ namespace Internal.JitInterface
{
pEEInfoOut = new CORINFO_EE_INFO();
+#if DEBUG
+ // In debug, write some bogus data to the struct to ensure we have filled everything
+ // properly.
+ fixed (CORINFO_EE_INFO* tmp = &pEEInfoOut)
+ MemoryHelper.FillMemory((byte*)tmp, 0xcc, Marshal.SizeOf<CORINFO_EE_INFO>());
+#endif
+
int pointerSize = this.PointerSize;
pEEInfoOut.offsetOfDelegateInstance = (uint)pointerSize; // Delegate::m_firstParameter