-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix event buffer size boundary check #25234
Fix event buffer size boundary check #25234
Conversation
0893638
to
d75b823
Compare
PR #25234: Size comparison from 30188f5 to d75b823 Increases (2 builds for cc32xx, qpg)
Full report (4 builds for cc32xx, mbed, qpg)
|
PR #25234: Size comparison from 30188f5 to 641a0c2 Increases (10 builds for bl602, bl702, cc32xx, esp32, nrfconnect, psoc6, qpg, telink)
Decreases (8 builds for bl702, cc13x2_26x2, esp32, psoc6, telink)
Full report (43 builds for bl602, bl702, cc13x2_26x2, cc32xx, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
|
In particular, this sounds like someone is calling GetNewBuffer at a point when we just finished writing and the buffer is full. Who is doing that and why? That seems to be the real bug: if we finished writing, why do we need to GetNewBuffer? |
OK, did some debugging and the actual issue is that What we should imo do is:
|
641a0c2
to
e110bcf
Compare
PR #25234: Size comparison from c6cadc8 to e110bcf Increases (1 build for cc32xx)
Decreases (1 build for cc32xx)
Full report (1 build for cc32xx)
|
99e6038
to
cc84c2e
Compare
PR #25234: Size comparison from c6cadc8 to cc84c2e Increases (1 build for cc32xx)
Decreases (1 build for cc32xx)
Full report (1 build for cc32xx)
|
cc84c2e
to
3e57f6d
Compare
PR #25234: Size comparison from c6cadc8 to 3e57f6d Increases (1 build for cc32xx)
Decreases (1 build for cc32xx)
Full report (1 build for cc32xx)
|
* improve event log dump * Fix event buffer size boundary check
In TLVCircularBuffer::GetNewBuffer, it would evict head when mQueueLength == mQueueSize, EventManagement would use this TLVCircularBuffer to store events, once our written data size is equal to this queue size, it would evict head in TLVCircularBuffer, in order to resolve this issue, we need override OnInit on CircularEventBuffer and not evict head in TLVCircularBuffer. We do the below things