services/pipewire: avoid use-after-free in PwDefaultTracker::reset()#567
Open
bbedward wants to merge 2 commits intoquickshell-mirror:masterfrom
Open
services/pipewire: avoid use-after-free in PwDefaultTracker::reset()#567bbedward wants to merge 2 commits intoquickshell-mirror:masterfrom
bbedward wants to merge 2 commits intoquickshell-mirror:masterfrom
Conversation
…during fatal error
Member
|
Shouldn't this already be handled by the QObject::destroyed connection in SimpleObjectHandle? (I am not particularly proud of that interface, which should probably be replaced by bindables, but it should theoretically work for this) |
Contributor
Author
|
You're right but somehow something causes mDefaultSink to point to freed memory in these crashes, but I dont see a case off hand why the destroyed signal wouldnt work - I'll look more into it. |
…g SimpleObjectHandle with per-handle connections
Contributor
Author
|
Alternative fix pushed with per-handle connections, should still fix the crash - which I believe is caused by the nodes sharing the same destroyed slot. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
relevant to #534
onFatalError()is queued, so by the timereset()runs the PwNode objects may already be destroyed. The setterfunctions go through
setSimpleObjectHandle→QObject::disconnect()on dangling pointers → SIGSEGV.This changes to directly null the pointers and emit signals in
reset(), skipping the disconnect-from-dead-objects path.