summaryrefslogtreecommitdiff
path: root/src/vm/codeman.cpp
diff options
context:
space:
mode:
authorJan Kotas <jkotas@microsoft.com>2017-12-14 16:15:49 -0500
committerGitHub <noreply@github.com>2017-12-14 16:15:49 -0500
commit5d91c4d2cc8fe60bad20cdfdf2e5f239bc024061 (patch)
tree3e0876f0720be5d0842780301339dfc33e7a99f1 /src/vm/codeman.cpp
parent7f8496d99627f2a8bf9d7bbbc07d601c431a1a6c (diff)
downloadcoreclr-5d91c4d2cc8fe60bad20cdfdf2e5f239bc024061.tar.gz
coreclr-5d91c4d2cc8fe60bad20cdfdf2e5f239bc024061.tar.bz2
coreclr-5d91c4d2cc8fe60bad20cdfdf2e5f239bc024061.zip
Change non-exclusive Check postconditions to null checks (#15523)
The Check macro is trying to be helpful and trigger DebugBreak when the condition is false and debugger is attached. It makes it hard to exercise the recent jump stub changes with debugger attached. The fix is to change the non-exclusive Check postconditions to a simple null check.
Diffstat (limited to 'src/vm/codeman.cpp')
-rw-r--r--src/vm/codeman.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/vm/codeman.cpp b/src/vm/codeman.cpp
index b1e67469ff..2fe8b140ef 100644
--- a/src/vm/codeman.cpp
+++ b/src/vm/codeman.cpp
@@ -2099,7 +2099,7 @@ HeapList* LoaderCodeHeap::CreateCodeHeap(CodeHeapRequestInfo *pInfo, LoaderHeap
CONTRACT(HeapList *) {
THROWS;
GC_NOTRIGGER;
- POSTCONDITION(CheckPointer(RETVAL) || !pInfo->getThrowOnOutOfMemoryWithinRange());
+ POSTCONDITION((RETVAL != NULL) || !pInfo->getThrowOnOutOfMemoryWithinRange());
} CONTRACT_END;
size_t * pPrivatePCLBytes = NULL;
@@ -2303,7 +2303,7 @@ HeapList* EEJitManager::NewCodeHeap(CodeHeapRequestInfo *pInfo, DomainCodeHeapLi
THROWS;
GC_NOTRIGGER;
PRECONDITION(m_CodeHeapCritSec.OwnedByCurrentThread());
- POSTCONDITION(CheckPointer(RETVAL) || !pInfo->getThrowOnOutOfMemoryWithinRange());
+ POSTCONDITION((RETVAL != NULL) || !pInfo->getThrowOnOutOfMemoryWithinRange());
} CONTRACT_END;
size_t initialRequestSize = pInfo->getRequestSize();
@@ -2422,7 +2422,7 @@ void* EEJitManager::allocCodeRaw(CodeHeapRequestInfo *pInfo,
THROWS;
GC_NOTRIGGER;
PRECONDITION(m_CodeHeapCritSec.OwnedByCurrentThread());
- POSTCONDITION(CheckPointer(RETVAL) || !pInfo->getThrowOnOutOfMemoryWithinRange());
+ POSTCONDITION((RETVAL != NULL) || !pInfo->getThrowOnOutOfMemoryWithinRange());
} CONTRACT_END;
pInfo->setRequestSize(header+blockSize+(align-1)+pInfo->getReserveForJumpStubs());
@@ -2897,7 +2897,7 @@ JumpStubBlockHeader * EEJitManager::allocJumpStubBlock(MethodDesc* pMD, DWORD n
GC_NOTRIGGER;
PRECONDITION(loAddr < hiAddr);
PRECONDITION(pLoaderAllocator != NULL);
- POSTCONDITION(CheckPointer(RETVAL) || !throwOnOutOfMemoryWithinRange);
+ POSTCONDITION((RETVAL != NULL) || !throwOnOutOfMemoryWithinRange);
} CONTRACT_END;
_ASSERTE((sizeof(JumpStubBlockHeader) % CODE_SIZE_ALIGN) == 0);