fix(gui): fix use-after-free crashes on session teardown, controller … #803

Open
Corzcode wants to merge 1 commit from Corzcode/pr/upstream/uaf into main
Corzcode commented 2026-08-26 22:19:40 -05:00 (Migrated from github.com)

…disconnect, and exit

Route every StreamSession teardown through teardownSession(): disconnect signals, drain in-flight frame-thread handlers via a BlockingQueuedConnection barrier, then delete deferred. Fixes a frame-thread UAF on session->GetFfmpegDecoder() during teardown.

UpdateGamepads: capture controller id instead of a raw Controller* in the delayed 1s lambda, re-lookup by id at run time. Fixes a UAF on quick controller disconnect.

Destroy libplacebo user shader hooks before pl_vulkan/pl_opengl teardown, since hook descriptors are freed via the GPU.

…disconnect, and exit Route every StreamSession teardown through teardownSession(): disconnect signals, drain in-flight frame-thread handlers via a BlockingQueuedConnection barrier, then delete deferred. Fixes a frame-thread UAF on session->GetFfmpegDecoder() during teardown. UpdateGamepads: capture controller id instead of a raw Controller* in the delayed 1s lambda, re-lookup by id at run time. Fixes a UAF on quick controller disconnect. Destroy libplacebo user shader hooks before pl_vulkan/pl_opengl teardown, since hook descriptors are freed via the GPU.
This pull request is broken due to missing fork information.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'Corzcode/pr/upstream/uaf:Corzcode/pr/upstream/uaf'
git switch 'Corzcode/pr/upstream/uaf'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'Corzcode/pr/upstream/uaf'
git switch 'Corzcode/pr/upstream/uaf'
git rebase 'main'
git switch 'main'
git merge --ff-only 'Corzcode/pr/upstream/uaf'
git switch 'Corzcode/pr/upstream/uaf'
git rebase 'main'
git switch 'main'
git merge --no-ff 'Corzcode/pr/upstream/uaf'
git switch 'main'
git merge --squash 'Corzcode/pr/upstream/uaf'
git switch 'main'
git merge --ff-only 'Corzcode/pr/upstream/uaf'
git switch 'main'
git merge 'Corzcode/pr/upstream/uaf'
git push origin 'main'
Sign in to join this conversation.
No description provided.