-
Notifications
You must be signed in to change notification settings - Fork 19
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 undefined behavior in log #62
Conversation
Signed-off-by: Michael X. Grey <grey@openrobotics.org>
Signed-off-by: Michael X. Grey <grey@openrobotics.org>
Signed-off-by: Michael X. Grey <grey@openrobotics.org>
Codecov Report
@@ Coverage Diff @@
## main #62 +/- ##
==========================================
+ Coverage 36.21% 36.48% +0.27%
==========================================
Files 65 65
Lines 2491 2557 +66
Branches 1366 1416 +50
==========================================
+ Hits 902 933 +31
+ Misses 552 550 -2
- Partials 1037 1074 +37
Flags with carried forward coverage won't be shown. Click here to find out more.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Thanks for adding the test.
I don't believe it should be a concern, but just a random note, testing locally I see that it spins up to about 1GB of RAM during those 5 second tests.
Signed-off-by: Michael X. Grey <grey@openrobotics.org>
Signed-off-by: Michael X. Grey <grey@openrobotics.org>
@aaronchongth 5s and 1GB is admittedly pretty extreme. I've dialed it down to 1s, but unfortunately that made your review stale. |
Signed-off-by: Michael X. Grey <grey@openrobotics.org>
This PR fixes a case of undefined behavior that can happen in the task logging system.
Previously, when a log was read twice in a row without any new entries being written, the flawed logic in the reader would increment an iterator past the end of its container, which leads to undefined behavior. This PR fixes that logic and prevents the iterators from going past the end.
This branch builds off of the branch for #61 so we should merge that PR first.