-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SCTP: refactor to fix encoder use-after-free bug
Because of the nature of not having a clear ownership between the association and the elements (encoder or decoder) is not possible to rely on the associations signals to have a valid reference on the encoder. This also applies for the decoder. Since g_signal_connect_object is not thread-safe (more on this in the documentation) and we can't hold the association mutex while emitting a signal, it is completely possible -as our stress tests demonstrate- that we ran into data races. To fix this situation, I introduce proper callback structures per element context and inside the association we always keep a reference to the element while calling the related callback.
- Loading branch information
1 parent
967b574
commit 371c43f
Showing
6 changed files
with
176 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.