Move assert so it doesn't fire for null addresses
authorChris Sienkiewicz <chsienki@microsoft.com>
Thu, 31 May 2018 20:40:11 +0000 (13:40 -0700)
committerGleb Balykov <g.balykov@samsung.com>
Tue, 18 Sep 2018 12:49:14 +0000 (15:49 +0300)
src/debug/ee/functioninfo.cpp

index 56c0726..795e86d 100644 (file)
@@ -1559,7 +1559,6 @@ DebuggerJitInfo *DebuggerMethodInfo::FindOrCreateInitAndAddJitInfo(MethodDesc* f
     CONTRACTL_END;
 
     _ASSERTE(fd != NULL);
-    ARM_ONLY(_ASSERTE((startAddr & THUMB_CODE) == 1));
 
     // The debugger doesn't track Lightweight-codegen methods b/c they have no metadata.
     if (fd->IsDynamicMethod())
@@ -1587,6 +1586,7 @@ DebuggerJitInfo *DebuggerMethodInfo::FindOrCreateInitAndAddJitInfo(MethodDesc* f
     //
     // We haven't got the lock yet so we'll repeat this lookup once
     // we've taken the lock.
+    ARM_ONLY(_ASSERTE((startAddr & THUMB_CODE) == 1));
     DebuggerJitInfo * pResult = FindJitInfo(fd, startAddr);
     if (pResult != NULL)
     {