Message: Initialize heapIndex to -1
MessageStack.removeMessage expects a zero or positive value here to indicate that the message was inserted into a heap. Without this we were hitting a race where a message could be inserted into the stack after MessageQueue.nextMessage() called MessageHeap.heapSweep() but before the call to MessageHeap.drainFreelist() was made. This would fool MessageHeap.drainFreelist() into thinking the message needed to be removed from a heap when in fact it was never inserted into one. Bug: 421623328 Flag: EXEMPT - bugfix Test: atest CtsOsTestCasesRavenwood:MessageQueueTest#testStressQuit Change-Id: I037111ab1e021d8d734b13756aa6e6a0de619232
Loading
Please register or sign in to comment