summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Au <andrewau@microsoft.com>2019-05-17 14:29:00 -0700
committerAndrew Au <cshung@gmail.com>2019-05-17 21:39:24 -0700
commit4d4d411dceb28c89bcd61b1fe41b5fb7a2af896b (patch)
tree7885d4da19f0078a01b7313bac4c083e465ed834
parenta3e43d62917bb542e1adda0a06684061ef77067f (diff)
downloadcoreclr-4d4d411dceb28c89bcd61b1fe41b5fb7a2af896b.tar.gz
coreclr-4d4d411dceb28c89bcd61b1fe41b5fb7a2af896b.tar.bz2
coreclr-4d4d411dceb28c89bcd61b1fe41b5fb7a2af896b.zip
Allow the write when the buffer can fit the event exactly
-rw-r--r--src/vm/eventpipebuffer.cpp2
-rw-r--r--src/vm/eventpipebuffer.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/vm/eventpipebuffer.cpp b/src/vm/eventpipebuffer.cpp
index 091e87e0e1..6d453b19d3 100644
--- a/src/vm/eventpipebuffer.cpp
+++ b/src/vm/eventpipebuffer.cpp
@@ -74,7 +74,7 @@ bool EventPipeBuffer::WriteEvent(Thread *pThread, EventPipeSession &session, Eve
unsigned int eventSize = sizeof(EventPipeEventInstance) + payload.GetSize();
// Make sure we have enough space to write the event.
- if(m_pCurrent + eventSize >= m_pLimit)
+ if(m_pCurrent + eventSize > m_pLimit)
{
return false;
}
diff --git a/src/vm/eventpipebuffer.h b/src/vm/eventpipebuffer.h
index fc0fa62c20..3e6bb7ad40 100644
--- a/src/vm/eventpipebuffer.h
+++ b/src/vm/eventpipebuffer.h
@@ -118,7 +118,7 @@ private:
FORCEINLINE BYTE* GetNextAlignedAddress(BYTE *pAddress)
{
LIMITED_METHOD_CONTRACT;
- _ASSERTE(m_pBuffer <= pAddress && m_pLimit > pAddress);
+ _ASSERTE(m_pBuffer <= pAddress && pAddress <= m_pLimit);
pAddress = (BYTE*)ALIGN_UP(pAddress, AlignmentSize);