Fix executor regression.
- Fix executor regression caused by writing sizes as size_t and reading
them back as int via CallQueue.
- Add assert checking each CallQueue consumer consumes all data.
- Keep data sizes as size_t in xeTestLogParser.
Bug: 21515831
Change-Id: I6b56f5ba139f88878b2e5f148b0530d4d939a0b5
diff --git a/executor/xeContainerFormatParser.cpp b/executor/xeContainerFormatParser.cpp
index a15449c..a02d8b8 100644
--- a/executor/xeContainerFormatParser.cpp
+++ b/executor/xeContainerFormatParser.cpp
@@ -62,14 +62,14 @@
throw ContainerParseError(what);
}
-void ContainerFormatParser::feed (const deUint8* bytes, int numBytes)
+void ContainerFormatParser::feed (const deUint8* bytes, size_t numBytes)
{
// Grow buffer if necessary.
- if (m_buf.getNumFree() < numBytes)
- m_buf.resize(getNextBufferSize(m_buf.getSize(), m_buf.getNumElements()+numBytes));
+ if (m_buf.getNumFree() < (int)numBytes)
+ m_buf.resize(getNextBufferSize(m_buf.getSize(), m_buf.getNumElements()+(int)numBytes));
// Append to front.
- m_buf.pushFront(bytes, numBytes);
+ m_buf.pushFront(bytes, (int)numBytes);
// If we haven't parsed complete element, re-try after data feed.
if (m_element == CONTAINERELEMENT_INCOMPLETE)