From 9b649444803bc95423035eba335a1e11c1871793 Mon Sep 17 00:00:00 2001 From: lizzie Date: Mon, 14 Sep 2026 00:39:07 +0200 Subject: [PATCH] [video_core/control] Fix SIGBUS due to uninit channel_state (#4406) Some homebrew don't properly initialize the GPU but seemingly try to use it, this is meant to be benign, yet triggers a SIGBUS due to garbage data being on the pointer after ctor(), so the fix is to make it nullptr on construction. Signed-off-by: lizzie - [x] I have read and followed the [Contribution Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CONTRIBUTING.md#code-contributions). - [x] I have read and followed the [AI Policy](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/AI.md) - [x] I have read and followed the [Coding Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/Coding.md) to the best of my ability. ------------------- Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4406 Reviewed-by: Maufeat Reviewed-by: MaranBr --- src/video_core/control/channel_state_cache.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video_core/control/channel_state_cache.h b/src/video_core/control/channel_state_cache.h index 6d70e9be55..cb7cc891f5 100644 --- a/src/video_core/control/channel_state_cache.h +++ b/src/video_core/control/channel_state_cache.h @@ -78,7 +78,7 @@ public: protected: static constexpr size_t UNSET_CHANNEL{(std::numeric_limits::max)()}; - P* channel_state; + P* channel_state = nullptr; size_t current_channel_id{UNSET_CHANNEL}; size_t current_address_space{}; Tegra::Engines::Maxwell3D* maxwell3d{};