-
Notifications
You must be signed in to change notification settings - Fork 229
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
Crash when network failure while sending a message #103
Comments
Added a few debug messages. Only the arrows are added afterwards:
So in the event of a network failure (which is momentarily happening quite often as Telegram has a few issues), a messages is not properly moved from the |
These are the messages seen in vysheng#103 (comment)
It seems to be caused in
So there's a message in both
However, One could make a dirty workaround where However, I'd rather fix the underlying logic. But in order to do so, I'd need to know what the intended behavior is, and what the lifecycle of a message is supposed to be. Help? @majn |
Steps to reproduce:
Expected behavior: Not a crash
Actual behavior and gdb backtrace:
Thus,
structures.c:2471
tries to do free a message inTLS->message_unsent_tree
that already was freed.Note that this bug was discovered in majn@bec66c2 , but there have been no changes to
TLS->message_unsent_tree
since then.The text was updated successfully, but these errors were encountered: