Skip to content
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

Timer callback spurious calls #1634

Closed
kuznetsss opened this issue Sep 6, 2024 · 0 comments · Fixed by #1700
Closed

Timer callback spurious calls #1634

kuznetsss opened this issue Sep 6, 2024 · 0 comments · Fixed by #1700
Assignees
Labels
bug Something isn't working
Milestone

Comments

@kuznetsss
Copy link
Collaborator

Issue Description

When using a timer from asio there is a possibility for a spurious call with success error code. Such behaviour could lead to UB or a crash by accessing deleted objects if code in timer callback check for error code and if it is a success it will do something with local objects.
https://stackoverflow.com/questions/55200310/can-asio-timer-cancel-call-a-spurious-success

We should check timer usages in our code and fix any possible issue. An example of fixing such issue is in our PR.
Maybe if there are many places to be fixed we should write a wrapper for asio timer.

@kuznetsss kuznetsss added the bug Something isn't working label Sep 6, 2024
@godexsoft godexsoft added this to the 2.3 milestone Sep 23, 2024
@kuznetsss kuznetsss self-assigned this Oct 22, 2024
godexsoft pushed a commit that referenced this issue Nov 11, 2024
Fixes #1634.
I also checked other timers and they don't have the issue.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: ✅ Merged
Development

Successfully merging a pull request may close this issue.

2 participants